diff --git a/CoreFoundation/Locale.subproj/CFCalendar.c b/CoreFoundation/Locale.subproj/CFCalendar.c index d02cf4b7cb..5332e96dbc 100644 --- a/CoreFoundation/Locale.subproj/CFCalendar.c +++ b/CoreFoundation/Locale.subproj/CFCalendar.c @@ -10,7 +10,6 @@ #include -#include #include #include "CFInternal.h" #include "CFPriv.h" diff --git a/CoreFoundation/Locale.subproj/CFLocale.c b/CoreFoundation/Locale.subproj/CFLocale.c index 78b072a8df..10013909c9 100644 --- a/CoreFoundation/Locale.subproj/CFLocale.c +++ b/CoreFoundation/Locale.subproj/CFLocale.c @@ -10,7 +10,6 @@ // Note the header file is in the OpenSource set (stripped to almost nothing), but not the .c file -#include #include #include #include diff --git a/CoreFoundation/Parsing.subproj/CFXMLInterface.c b/CoreFoundation/Parsing.subproj/CFXMLInterface.c index fcd4b0131f..f48c1e4c76 100644 --- a/CoreFoundation/Parsing.subproj/CFXMLInterface.c +++ b/CoreFoundation/Parsing.subproj/CFXMLInterface.c @@ -12,7 +12,6 @@ */ #include -#include #include #include #include @@ -23,7 +22,7 @@ #include #include #include -#include "CFXMLInterface.h" +#include "CFInternal.h" /* libxml2 does not have nullability annotations and does not import well into swift when given potentially differing versions of the library that might be installed on the host operating system. This is a simple C wrapper to simplify some of that interface layer to libxml2. @@ -111,7 +110,6 @@ typedef struct { xmlNotationPtr notation; } _cfxmlNotation; -#if DEPLOYMENT_RUNTIME_SWIFT static xmlExternalEntityLoader __originalLoader = NULL; static xmlParserInputPtr _xmlExternalEntityLoader(const char *urlStr, const char * ID, xmlParserCtxtPtr context) { @@ -121,10 +119,8 @@ static xmlParserInputPtr _xmlExternalEntityLoader(const char *urlStr, const char } return __originalLoader(urlStr, ID, context); } -#endif // DEPLOYMENT_RUNTIME_SWIFT void _CFSetupXMLInterface(void) { -#if DEPLOYMENT_RUNTIME_SWIFT static dispatch_once_t xmlInitGuard; dispatch_once(&xmlInitGuard, ^{ xmlInitParser(); @@ -132,25 +128,21 @@ void _CFSetupXMLInterface(void) { __originalLoader = xmlGetExternalEntityLoader(); xmlSetExternalEntityLoader(_xmlExternalEntityLoader); }); -#endif // DEPLOYMENT_RUNTIME_SWIFT } _CFXMLInterfaceParserInput _CFXMLInterfaceNoNetExternalEntityLoader(const char *URL, const char *ID, _CFXMLInterfaceParserContext ctxt) { return xmlNoNetExternalEntityLoader(URL, ID, ctxt); } -#if DEPLOYMENT_RUNTIME_SWIFT static void _errorCallback(void *ctx, const char *msg, ...) { xmlParserCtxtPtr context = __CFSwiftBridge.NSXMLParser.getContext((_CFXMLInterface)ctx); xmlErrorPtr error = xmlCtxtGetLastError(context); // TODO: reporting // _reportError(error, (_CFXMLInterface)ctx); } -#endif // DEPLOYMENT_RUNTIME_SWIFT _CFXMLInterfaceSAXHandler _CFXMLInterfaceCreateSAXHandler() { _CFXMLInterfaceSAXHandler saxHandler = (_CFXMLInterfaceSAXHandler)calloc(1, sizeof(struct _xmlSAXHandler)); -#if DEPLOYMENT_RUNTIME_SWIFT saxHandler->internalSubset = (internalSubsetSAXFunc)__CFSwiftBridge.NSXMLParser.internalSubset; saxHandler->isStandalone = (isStandaloneSAXFunc)__CFSwiftBridge.NSXMLParser.isStandalone; @@ -176,9 +168,6 @@ _CFXMLInterfaceSAXHandler _CFXMLInterfaceCreateSAXHandler() { saxHandler->externalSubset = (externalSubsetSAXFunc)__CFSwiftBridge.NSXMLParser.externalSubset; saxHandler->initialized = XML_SAX2_MAGIC; // make sure start/endElementNS are used -#else - memset(&saxHandler, 0, sizeof(saxHandler)); -#endif //if DEPLOYMENT_RUNTIME_SWIFT return saxHandler; } diff --git a/CoreFoundation/build.py b/CoreFoundation/build.py index c105fc0782..046babba09 100755 --- a/CoreFoundation/build.py +++ b/CoreFoundation/build.py @@ -293,7 +293,7 @@ 'String.subproj/CFRegularExpression.c', 'String.subproj/CFAttributedString.c', 'String.subproj/CFRunArray.c', - 'Base.subproj/CFKnownLocations.c', + 'Base.subproj/CFKnownLocations.h', ] sources = CompileSources(sources_list)