this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Kill the obsolete CFF directory

-245
-22
src/CFF/CFStringConst.h
··· 1 - #ifndef CFSTRING_CONST_H 2 - #define CFSTRING_CONST_H 3 - #include <CoreFoundation/CFString.h> 4 - #include <CoreFoundation/CFRuntime.h> 5 - #include <stddef.h> 6 - 7 - struct __CFConstantString 8 - { 9 - CFRuntimeBase _parent; 10 - void *_contents; 11 - CFIndex _count; 12 - CFHashCode _hash; 13 - CFAllocatorRef _deallocator; 14 - }; 15 - 16 - #define CONST_STRING_DECL(var, str) \ 17 - static struct __CFConstantString __ ## var ## __ = \ 18 - { {0, 0, {1, 0, 0}}, (void*)str, sizeof(str) - 1, 0, NULL }; \ 19 - const CFStringRef var = (CFStringRef) & __ ## var ## __; 20 - 21 - #endif 22 -
-100
src/CFF/CFUtilities.c
··· 1 - 2 - #include "CoreFoundation/CFPriv.h" 3 - #include "CoreFoundation/CFLogUtilities.h" 4 - #include <CoreFoundation/CFString.h> 5 - #include <CoreFoundation/CFData.h> 6 - #include <CoreFoundation/CFPropertyList.h> 7 - #include <stddef.h> 8 - #include "CFStringConst.h" 9 - #include <stdbool.h> 10 - #include "darling-config.h" 11 - 12 - CONST_STRING_DECL(_kCFSystemVersionProductNameKey, "ProductName"); 13 - CONST_STRING_DECL(_kCFSystemVersionProductCopyrightKey, "ProductCopyright"); 14 - CONST_STRING_DECL(_kCFSystemVersionProductVersionKey, "ProductVersion"); 15 - CONST_STRING_DECL(_kCFSystemVersionProductVersionExtraKey, "ProductVersionExtra"); 16 - CONST_STRING_DECL(_kCFSystemVersionProductUserVisibleVersionKey, "UserVisibleVersion"); 17 - CONST_STRING_DECL(_kCFSystemVersionBuildVersionKey, "ProductBuildVersion"); 18 - CONST_STRING_DECL(_kCFSystemVersionProductVersionStringKey, "ProductVersionString"); 19 - CONST_STRING_DECL(_kCFSystemVersionBuildStringKey, "ProductBuildString"); 20 - 21 - __attribute__((constructor)) 22 - static void initConstants() 23 - { 24 - CFTypeID type = CFStringGetTypeID(); 25 - GSRuntimeConstantInit(_kCFSystemVersionProductNameKey, type); 26 - GSRuntimeConstantInit(_kCFSystemVersionProductCopyrightKey, type); 27 - GSRuntimeConstantInit(_kCFSystemVersionProductVersionKey, type); 28 - GSRuntimeConstantInit(_kCFSystemVersionProductVersionExtraKey, type); 29 - GSRuntimeConstantInit(_kCFSystemVersionBuildVersionKey, type); 30 - GSRuntimeConstantInit(_kCFSystemVersionProductUserVisibleVersionKey, type); 31 - GSRuntimeConstantInit(_kCFSystemVersionProductVersionStringKey, type); 32 - GSRuntimeConstantInit(_kCFSystemVersionBuildStringKey, type); 33 - } 34 - 35 - Boolean _CFExecutableLinkedOnOrAfter(CFSystemVersion version) 36 - { 37 - // Like original CF, we always use the last version 38 - const uint16_t libSystemVersions[] = { 39 - 50, 40 - 55, 41 - 56, 42 - 67, 43 - 73, 44 - 89, 45 - 125, // 10.6 46 - 159, // 10.7 47 - 169, // 10.8 48 - 1197, // 10.9 49 - 1213, // 10.10 50 - 1226, // 10.11 (up until now) 51 - }; 52 - if (version >= CFSystemVersionMax) 53 - return false; 54 - return (NSVersionOfLinkTimeLibrary("System") >> 16) >= libSystemVersions[version]; 55 - } 56 - 57 - static CFDictionaryRef _CFCopyVersionDictionary(CFStringRef path) 58 - { 59 - CFURLRef url; 60 - CFDataRef resourceData; 61 - Boolean status; 62 - SInt32 errorCode; 63 - CFErrorRef err; 64 - CFPropertyListRef plist; 65 - 66 - url = CFURLCreateWithFileSystemPath(NULL, path, kCFURLPOSIXPathStyle, 0); 67 - status = CFURLCreateDataAndPropertiesFromResource(NULL, url, &resourceData, 68 - NULL, NULL, &errorCode); 69 - 70 - if (!status) 71 - { 72 - CFRelease(url); 73 - return NULL; 74 - } 75 - 76 - plist = CFPropertyListCreateWithData(NULL, resourceData, kCFPropertyListImmutable, 77 - NULL, &err); 78 - 79 - CFRelease(resourceData); 80 - CFRelease(url); 81 - 82 - return plist; 83 - } 84 - 85 - CFDictionaryRef _CFCopySystemVersionDictionary(void) 86 - { 87 - CFStringRef str = CFSTR("/System/Library/CoreServices/SystemVersion.plist"); 88 - return _CFCopyVersionDictionary(str); 89 - } 90 - 91 - CFDictionaryRef _CFCopyServerVersionDictionary(void) 92 - { 93 - CFStringRef str = CFSTR("/System/Library/CoreServices/SystemVersion.plist"); 94 - return _CFCopyVersionDictionary(str); 95 - } 96 - 97 - void CFLog(int32_t level, CFStringRef format, ...) 98 - { 99 - } 100 -
-60
src/CFF/CMakeLists.txt
··· 1 - project(cff) 2 - 3 - cmake_minimum_required(VERSION 2.4.0) 4 - 5 - enable_language(C ASM) 6 - 7 - if(COMMAND cmake_policy) 8 - cmake_policy(SET CMP0003 NEW) 9 - endif(COMMAND cmake_policy) 10 - 11 - add_definitions(-D__APPLE__ -D__MACH__) 12 - add_definitions(-DTARGET_OS_MAC=1) 13 - add_definitions(-DHAVE_STDINT_H=1) 14 - add_definitions(-D__APPLE__ -D__DYNAMIC__) 15 - add_definitions(-D__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__=1080) 16 - 17 - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc -D__DARWIN_UNIX03 -fPIC -w -fconstant-string-class=NSConstantString -fobjc-nonfragile-abi -ggdb -O0") 18 - 19 - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -nostdinc -nostdinc++ -D__DARWIN_UNIX03 -fPIC -w -fconstant-string-class=NSConstantString -fobjc-nonfragile-abi -ggdb -O0") 20 - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,--version-script=${DARLING_TOP_DIRECTORY}/darwin.map") 21 - set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "") 22 - 23 - SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/darling") 24 - SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE) 25 - SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) 26 - 27 - include_directories(${DARLING_TOP_DIRECTORY}/src/external/corefoundation/Headers) 28 - include_directories(${CMAKE_BINARY_DIR}/src/external/corefoundation/Headers) 29 - include_directories(${DARLING_TOP_DIRECTORY}/src/external/foundation/Headers) 30 - include_directories(${DARLING_TOP_DIRECTORY}/src/external/libobjc2) 31 - include_directories(${DARLING_TOP_DIRECTORY}/src/external/libcxx/include) 32 - include_directories(${DARLING_TOP_DIRECTORY}/src/libc/include/FreeBSD) 33 - 34 - add_definitions(-DOBJC2RUNTIME=1) 35 - 36 - set(cff_SRCS 37 - #AppleCFString.m 38 - $<TARGET_OBJECTS:Foundation> 39 - $<TARGET_OBJECTS:CoreFoundation> 40 - #AppleCFString.m 41 - ) 42 - 43 - set(cffextra_SRCS 44 - CFUtilities.c 45 - reexports.c 46 - #CFPreferences.mm 47 - ../util/debug.cpp 48 - ../util/stlutils.cpp 49 - ../external/libcxx/src/dso_handle.c 50 - ) 51 - 52 - add_library(CFF SHARED ${cff_SRCS}) 53 - set_source_files_properties(${cff_SRCS} LANGUAGE C) 54 - target_link_libraries(CFF PRIVATE system icucore z ffi xml2 xslt aprutil "-Wl,--defsym=__CFConstantStringClassReference=_OBJC_CLASS_AppleCFString") 55 - 56 - add_library(CFFExtra SHARED ${cffextra_SRCS}) 57 - target_link_libraries(CFFExtra PRIVATE CFF cxx) 58 - 59 - 60 - install(TARGETS CFF CFFExtra DESTINATION ${CMAKE_INSTALL_LIBDIR}/darling)
-18
src/CFF/CoreFoundation/CFLogUtilities.h
··· 1 - #ifndef CF_CFLOGUTILITIES_H_ 2 - #define CF_CFLOGUTILITIES_H_ 3 - 4 - enum { 5 - kCFLogLevelEmergency = 0, 6 - kCFLogLevelAlert, 7 - kCFLogLevelCritical, 8 - kCFLogLevelError, 9 - kCFLogLevelWarning, 10 - kCFLogLevelNotice, 11 - kCFLogLevelInfo, 12 - kCFLogLevelDebug 13 - }; 14 - 15 - void CFLog(int32_t level, CFStringRef format, ...); 16 - 17 - #endif 18 -
-42
src/CFF/CoreFoundation/CFPriv.h
··· 1 - #ifndef CFUTILITIES_H 2 - #define CFUTILITIES_H 3 - 4 - #include <stddef.h> 5 - #include <stdio.h> 6 - #include <CoreFoundation/CFBase.h> 7 - #include <CoreFoundation/CFDictionary.h> 8 - 9 - enum { 10 - CFSystemVersionCheetah = 0, /* 10.0 */ 11 - CFSystemVersionPuma = 1, /* 10.1 */ 12 - CFSystemVersionJaguar = 2, /* 10.2 */ 13 - CFSystemVersionPanther = 3, /* 10.3 */ 14 - CFSystemVersionTiger = 4, /* 10.4 */ 15 - CFSystemVersionLeopard = 5, /* 10.5 */ 16 - CFSystemVersionSnowLeopard = 6, /* 10.6 */ 17 - CFSystemVersionLion = 7, /* 10.7 */ 18 - CFSystemVersionMountainLion = 8, /* 10.8 */ 19 - CFSystemVersionMavericks = 9, /* 10.9 */ 20 - CFSystemVersionYosemite = 10, /* 10.10 */ 21 - CFSystemVersionElCapitan = 11, /* 11.11 */ 22 - CFSystemVersionMax, 23 - 24 - }; 25 - typedef int CFSystemVersion; 26 - 27 - extern const CFStringRef _kCFSystemVersionProductNameKey; 28 - extern const CFStringRef _kCFSystemVersionProductCopyrightKey; 29 - extern const CFStringRef _kCFSystemVersionProductVersionKey; 30 - extern const CFStringRef _kCFSystemVersionProductVersionExtraKey; 31 - extern const CFStringRef _kCFSystemVersionProductUserVisibleVersionKey; 32 - extern const CFStringRef _kCFSystemVersionBuildVersionKey; 33 - extern const CFStringRef _kCFSystemVersionProductVersionStringKey; 34 - extern const CFStringRef _kCFSystemVersionBuildStringKey; 35 - 36 - CF_EXPORT Boolean _CFExecutableLinkedOnOrAfter(CFSystemVersion version); 37 - 38 - CF_EXPORT CFDictionaryRef _CFCopySystemVersionDictionary(void); 39 - CF_EXPORT CFDictionaryRef _CFCopyServerVersionDictionary(void); 40 - 41 - #endif 42 -
-3
src/CFF/reexports.c
··· 1 - void* reexport_nsobject __asm__("_OBJC_CLASS_NSObject$$reexport"); 2 - void* reexport_nsobject_meta __asm__("_OBJC_METACLASS_NSObject$$reexport"); 3 -