this repo has no description
1
fork

Configure Feed

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

Use Apple's CoreFoundation with Apportable's additions

+10 -191
+3
.gitmodules
··· 187 187 [submodule "src/external/libclosure"] 188 188 path = src/external/libclosure 189 189 url = ../darling-libclosure.git 190 + [submodule "src/external/configd"] 191 + path = src/external/configd 192 + url = ../darling-configd.git
+6 -1
cmake/darling_framework.cmake
··· 4 4 5 5 function(add_framework name) 6 6 cmake_parse_arguments(FRAMEWORK "CURRENT_VERSION;FAT" "VERSION;LINK_FLAGS" "SOURCES;DEPENDENCIES" ${ARGN}) 7 - set(my_name "${name}_${FRAMEWORK_VERSION}") 7 + if (FRAMEWORK_CURRENT_VERSION) 8 + set(my_name "${name}") 9 + else (FRAMEWORK_CURRENT_VERSION) 10 + set(my_name "${name}_${FRAMEWORK_VERSION}") 11 + endif (FRAMEWORK_CURRENT_VERSION) 8 12 13 + set(DYLIB_INSTALL_NAME "/System/Library/Frameworks/${name}.framework/Versions/${FRAMEWORK_VERSION}/${name}") 9 14 add_darling_library(${my_name} SHARED ${FRAMEWORK_SOURCES}) 10 15 11 16 set_target_properties(${my_name} PROPERTIES
+1 -1
src/CMakeLists.txt
··· 95 95 add_subdirectory(external/libxml2) 96 96 add_subdirectory(external/libxslt) 97 97 add_subdirectory(external/icu/icuSources) 98 - #add_subdirectory(external/corefoundation) 98 + add_subdirectory(external/corefoundation) 99 99 add_subdirectory(external/openssl/src) 100 100 #add_subdirectory(external/foundation) 101 101 add_subdirectory(external/curl)
-30
src/SystemConfiguration/CMakeLists.txt
··· 1 - project(SystemConfiguration) 2 - 3 - cmake_minimum_required(VERSION 2.4.0) 4 - if(COMMAND cmake_policy) 5 - cmake_policy(SET CMP0003 NEW) 6 - endif(COMMAND cmake_policy) 7 - 8 - 9 - #configure_file(config.h.in config.h) 10 - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 11 - #set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fblocks") 12 - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,--version-script=${DARLING_TOP_DIRECTORY}/darwin.map") 13 - 14 - include_directories(${CMAKE_CURRENT_SOURCE_DIR}) 15 - include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) 16 - include_directories(${DARLING_TOP_DIRECTORY}/src/external/corefoundation/Headers) 17 - include_directories(${CMAKE_BINARY_DIR}/src/external/corefoundation/Headers) 18 - include_directories(${DARLING_TOP_DIRECTORY}/src/external/foundation/Headers) 19 - include_directories(${DARLING_TOP_DIRECTORY}/basic-headers) 20 - 21 - set(SystemConfiguration_SRCS 22 - SCDynamicStoreCopySpecific.cpp 23 - SCSchemaDefinitions.cpp 24 - ) 25 - 26 - add_library(SystemConfiguration SHARED ${SystemConfiguration_SRCS}) 27 - target_link_libraries(SystemConfiguration CFF) 28 - 29 - install(TARGETS SystemConfiguration DESTINATION "${CMAKE_INSTALL_LIBDIR}/darling") 30 -
-1
src/SystemConfiguration/SCDynamicStore.h
··· 1 - typedef const struct __SCDynamicStore * SCDynamicStoreRef;
-54
src/SystemConfiguration/SCDynamicStoreCopySpecific.cpp
··· 1 - #include <unistd.h> 2 - #include <sys/types.h> 3 - #include <stdlib.h> 4 - #include <pwd.h> 5 - #include <sys/utsname.h> 6 - //#include "log.h" 7 - 8 - #include <CoreFoundation/CFString.h> 9 - #include <SystemConfiguration/SCDynamicStoreCopySpecific.h> 10 - 11 - #define MAX_PASSENTRY_LENGTH 4096 12 - 13 - CFStringRef SCDynamicStoreCopyComputerName (SCDynamicStoreRef store, CFStringEncoding *nameEncoding){ 14 - //LOG << "fixme: SCDynamicStoreCopyComputerName() - stub" << std::endl; 15 - return NULL; 16 - } 17 - 18 - CFStringRef SCDynamicStoreCopyConsoleUser (SCDynamicStoreRef store, uid_t *uid, gid_t *gid){ 19 - struct passwd pwent, *pwentp; 20 - char buffer[MAX_PASSENTRY_LENGTH]; 21 - char *user; 22 - 23 - if (uid) *uid = getuid(); 24 - if (gid) *gid = getgid(); 25 - 26 - user = getenv("USER"); 27 - if (user) 28 - return CFStringCreateWithCString(NULL, user, kCFStringEncodingUTF8); 29 - 30 - if (getpwuid_r(getuid(), &pwent, buffer, MAX_PASSENTRY_LENGTH, &pwentp)) 31 - return CFStringCreateWithCString(NULL, pwentp->pw_name, kCFStringEncodingUTF8); 32 - 33 - return NULL; 34 - } 35 - 36 - CFStringRef SCDynamicStoreCopyLocalHostName (SCDynamicStoreRef store){ 37 - struct utsname info; 38 - 39 - if (uname(&info) != 0) 40 - return NULL; 41 - 42 - return CFStringCreateWithCString(NULL, info.nodename, kCFStringEncodingUTF8); 43 - } 44 - 45 - CFStringRef SCDynamicStoreCopyLocation (SCDynamicStoreRef store){ 46 - //LOG << "fixme: SCDynamicStoreCopyLocation() - stub" << std::endl; 47 - return NULL; 48 - } 49 - 50 - CFDictionaryRef SCDynamicStoreCopyProxies (SCDynamicStoreRef store){ 51 - //LOG << "fixme: SCDynamicStoreCopyComputerName() - stub" << std::endl; 52 - /* No Proxy support yet */ 53 - return NULL; 54 - }
-23
src/SystemConfiguration/SCDynamicStoreCopySpecific.h
··· 1 - #ifndef SCDYNAMICSTORECOPYSPECIFIC_H 2 - #define SCDYNAMICSTORECOPYSPECIFIC_H 3 - 4 - #include <CoreFoundation/CoreFoundation.h> 5 - #include <SystemConfiguration/SCDynamicStore.h> 6 - #include <SystemConfiguration/SCSchemaDefinitions.h> 7 - 8 - #ifdef __cplusplus 9 - extern "C" { 10 - #endif 11 - 12 - CFStringRef SCDynamicStoreCopyComputerName (SCDynamicStoreRef store, CFStringEncoding *nameEncoding); 13 - CFStringRef SCDynamicStoreCopyConsoleUser (SCDynamicStoreRef store, uid_t *uid, gid_t *gid); 14 - CFStringRef SCDynamicStoreCopyLocalHostName (SCDynamicStoreRef store); 15 - CFStringRef SCDynamicStoreCopyLocation (SCDynamicStoreRef store); 16 - CFDictionaryRef SCDynamicStoreCopyProxies (SCDynamicStoreRef store); 17 - 18 - #ifdef __cplusplus 19 - } 20 - #endif 21 - 22 - #endif 23 -
-32
src/SystemConfiguration/SCSchemaDefinitions.cpp
··· 1 - #include "SCSchemaDefinitions.h" 2 - #include "../CFF/CFStringConst.h" 3 - 4 - extern "C" { 5 - 6 - CONST_STRING_DECL(kSCPropNetProxiesExceptionsList, "ExceptionsList"); 7 - CONST_STRING_DECL(kSCPropNetProxiesExcludeSimpleHostnames, "ExcludeSimpleHostnames"); 8 - CONST_STRING_DECL(kSCPropNetProxiesFTPEnable, "FTPEnable"); 9 - CONST_STRING_DECL(kSCPropNetProxiesFTPPassive, "FTPPassive"); 10 - CONST_STRING_DECL(kSCPropNetProxiesFTPPort, "FTPPort"); 11 - CONST_STRING_DECL(kSCPropNetProxiesFTPProxy, "FTPProxy"); 12 - CONST_STRING_DECL(kSCPropNetProxiesGopherEnable, "GopherEnable"); 13 - CONST_STRING_DECL(kSCPropNetProxiesGopherPort, "GopherPort"); 14 - CONST_STRING_DECL(kSCPropNetProxiesGopherProxy, "GopherProxy"); 15 - CONST_STRING_DECL(kSCPropNetProxiesHTTPEnable, "HTTPEnable"); 16 - CONST_STRING_DECL(kSCPropNetProxiesHTTPPort, "HTTPPort"); 17 - CONST_STRING_DECL(kSCPropNetProxiesHTTPProxy, "HTTPProxy"); 18 - CONST_STRING_DECL(kSCPropNetProxiesHTTPSEnable, "HTTPSEnable"); 19 - CONST_STRING_DECL(kSCPropNetProxiesHTTPSPort, "HTTPSPort"); 20 - CONST_STRING_DECL(kSCPropNetProxiesHTTPSProxy, "HTTPSProxy"); 21 - CONST_STRING_DECL(kSCPropNetProxiesRTSPEnable, "RTSPEnable"); 22 - CONST_STRING_DECL(kSCPropNetProxiesRTSPPort, "RTSPPort"); 23 - CONST_STRING_DECL(kSCPropNetProxiesRTSPProxy, "RTSPProxy"); 24 - CONST_STRING_DECL(kSCPropNetProxiesSOCKSEnable, "SOCKSEnable"); 25 - CONST_STRING_DECL(kSCPropNetProxiesSOCKSPort, "SOCKSPort"); 26 - CONST_STRING_DECL(kSCPropNetProxiesSOCKSProxy, "SOCKSProxy"); 27 - CONST_STRING_DECL(kSCPropNetProxiesProxyAutoConfigEnable, "ProxyAutoConfigEnable"); 28 - CONST_STRING_DECL(kSCPropNetProxiesProxyAutoConfigJavaScript, "ProxyAutoConfigJavaScript"); 29 - CONST_STRING_DECL(kSCPropNetProxiesProxyAutoConfigURLString, "ProxyAutoConfigURLString"); 30 - CONST_STRING_DECL(kSCPropNetProxiesProxyAutoDiscoveryEnable, "ProxyAutoDiscoveryEnable"); 31 - 32 - }
-40
src/SystemConfiguration/SCSchemaDefinitions.h
··· 1 - #ifndef SCSCHEMADEFINITIONS_H 2 - #define SCSCHEMADEFINITIONS_H 3 - #include <CoreFoundation/CFString.h> 4 - 5 - #ifdef __cplusplus 6 - extern "C" { 7 - #endif 8 - 9 - extern const CFStringRef kSCPropNetProxiesExceptionsList; 10 - extern const CFStringRef kSCPropNetProxiesExcludeSimpleHostnames; 11 - extern const CFStringRef kSCPropNetProxiesFTPEnable; 12 - extern const CFStringRef kSCPropNetProxiesFTPPassive; 13 - extern const CFStringRef kSCPropNetProxiesFTPPort; 14 - extern const CFStringRef kSCPropNetProxiesFTPProxy; 15 - extern const CFStringRef kSCPropNetProxiesGopherEnable; 16 - extern const CFStringRef kSCPropNetProxiesGopherPort; 17 - extern const CFStringRef kSCPropNetProxiesGopherProxy; 18 - extern const CFStringRef kSCPropNetProxiesHTTPEnable; 19 - extern const CFStringRef kSCPropNetProxiesHTTPPort; 20 - extern const CFStringRef kSCPropNetProxiesHTTPProxy; 21 - extern const CFStringRef kSCPropNetProxiesHTTPSEnable; 22 - extern const CFStringRef kSCPropNetProxiesHTTPSPort; 23 - extern const CFStringRef kSCPropNetProxiesHTTPSProxy; 24 - extern const CFStringRef kSCPropNetProxiesRTSPEnable; 25 - extern const CFStringRef kSCPropNetProxiesRTSPPort; 26 - extern const CFStringRef kSCPropNetProxiesRTSPProxy; 27 - extern const CFStringRef kSCPropNetProxiesSOCKSEnable; 28 - extern const CFStringRef kSCPropNetProxiesSOCKSPort; 29 - extern const CFStringRef kSCPropNetProxiesSOCKSProxy; 30 - extern const CFStringRef kSCPropNetProxiesProxyAutoConfigEnable; 31 - extern const CFStringRef kSCPropNetProxiesProxyAutoConfigJavaScript; 32 - extern const CFStringRef kSCPropNetProxiesProxyAutoConfigURLString; 33 - extern const CFStringRef kSCPropNetProxiesProxyAutoDiscoveryEnable; 34 - 35 - #ifdef __cplusplus 36 - } 37 - #endif 38 - 39 - #endif 40 -
-9
src/SystemConfiguration/SystemConfiguration.h
··· 1 - #ifndef _SYSTEMCONFIGURATION_H 2 - #define _SYSTEMCONFIGURATION_H 3 - 4 - #include <SystemConfiguration/SCDynamicStoreCopySpecific.h> 5 - #include <SystemConfiguration/SCDynamicStore.h> 6 - #include <SystemConfiguration/SCSchemaDefinitions.h> 7 - 8 - #endif 9 -