Skip to content

Commit 4157d9b

Browse files
authored
Merge pull request #1719 from compnerd/CF-build
CoreFoundation build clean ups
2 parents 3995b2c + 4c88c6f commit 4157d9b

File tree

3 files changed

+27
-4
lines changed

3 files changed

+27
-4
lines changed

CoreFoundation/CMakeLists.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,17 @@ add_framework(CoreFoundation
5454
Base.subproj/CFKnownLocations.h
5555
Base.subproj/CFLogUtilities.h
5656
Base.subproj/CFPriv.h
57+
Base.subproj/CFOverflow.h
5758
Base.subproj/CFRuntime.h
59+
Base.subproj/CFRuntime_Internal.h
5860
Base.subproj/ForFoundationOnly.h
5961
Base.subproj/ForSwiftFoundationOnly.h
6062
# Collections
6163
Collections.subproj/CFBasicHash.h
6264
Collections.subproj/CFStorage.h
65+
Collections.subproj/CFCollections_Internal.h
6366
# Error
64-
Error.subproj//CFError_Private.h
67+
Error.subproj/CFError_Private.h
6568
# Locale
6669
Locale.subproj/CFDateFormatter_Private.h
6770
Locale.subproj/CFICULogging.h
@@ -78,15 +81,20 @@ add_framework(CoreFoundation
7881
PlugIn.subproj/CFBundle_BinaryTypes.h
7982
PlugIn.subproj/CFBundle_Internal.h
8083
PlugIn.subproj/CFPlugIn_Factory.h
84+
# RunLoop
85+
RunLoop.subproj/CFMachPort_Internal.h
86+
RunLoop.subproj/CFMachPort_Lifetime.h
8187
# Stream
8288
Stream.subproj/CFStreamAbstract.h
8389
Stream.subproj/CFStreamInternal.h
8490
Stream.subproj/CFStreamPriv.h
8591
# String
92+
String.subproj/CFAttributedStringPriv.h
8693
String.subproj/CFBurstTrie.h
8794
String.subproj/CFCharacterSetPriv.h
8895
String.subproj/CFRegularExpression.h
8996
String.subproj/CFRunArray.h
97+
String.subproj/CFString_Internal.h
9098
String.subproj/CFStringDefaultEncoding.h
9199
String.subproj/CFStringLocalizedFormattingInternal.h
92100
# StringEncodings
@@ -117,6 +125,8 @@ add_framework(CoreFoundation
117125
Stream.subproj/CFStreamPriv.h
118126
String.subproj/CFRegularExpression.h
119127
String.subproj/CFRunArray.h
128+
StringEncodings.subproj/CFStringEncodingConverter.h
129+
StringEncodings.subproj/CFStringEncodingConverterExt.h
120130
URL.subproj/CFURLPriv.h
121131
URL.subproj/CFURLSessionInterface.h
122132

@@ -243,6 +253,8 @@ add_framework(CoreFoundation
243253
Preferences.subproj/CFPreferences.c
244254
Preferences.subproj/CFXMLPreferencesDomain.c
245255
# RunLoop
256+
# TODO(compnerd) make this empty on non-Mach targets
257+
# RunLoop.subproj/CFMachPort_Lifetime.c
246258
RunLoop.subproj/CFRunLoop.c
247259
RunLoop.subproj/CFSocket.c
248260
# Stream

CoreFoundation/RunLoop.subproj/CFRunLoop.c

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,24 @@ CF_INLINE uint64_t check_uint64_add(uint64_t x, uint64_t y, int32_t* err) {
4646
};
4747
#endif
4848

49-
#if __HAS_DISPATCH__ && __has_include(<dispatch/private.h>)
49+
#if __HAS_DISPATCH__
50+
#if __has_include(<dispatch/private.h>)
5051
#include <dispatch/private.h>
51-
#elif __HAS_DISPATCH__
52+
#else
5253
extern dispatch_queue_t _dispatch_runloop_root_queue_create_4CF(const char *_Nullable label, unsigned long flags);
54+
#if USE_DISPATCH_SOURCE_FOR_TIMERS
5355
extern mach_port_t _dispatch_runloop_root_queue_get_port_4CF(dispatch_queue_t queue);
56+
#endif
5457
extern void _dispatch_source_set_runloop_timer_4CF(dispatch_source_t source, dispatch_time_t start, uint64_t interval, uint64_t leeway);
5558
extern bool _dispatch_runloop_root_queue_perform_4CF(dispatch_queue_t queue);
59+
60+
#if TARGET_OS_MAC
61+
typedef mach_port_t dispatch_runloop_handle_t;
62+
#elif defined(__linux__) || defined(__FreeBSD__)
63+
typedef int dispatch_runloop_handle_t;
64+
#endif
65+
66+
#endif
5667
#endif
5768

5869
#if DEPLOYMENT_TARGET_MACOSX || DEPLOYMENT_TARGET_EMBEDDED || DEPLOYMENT_TARGET_EMBEDDED_MINI || DEPLOYMENT_TARGET_SIMULATOR

CoreFoundation/String.subproj/CFBurstTrie.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include "CFInternal.h"
1212
#include "CFBurstTrie.h"
1313
#include <CoreFoundation/CFByteOrder.h>
14-
#include "CFNumber.h"
14+
#include <CoreFoundation/CFNumber.h>
1515
#include <stdio.h>
1616
#include <string.h>
1717
#include <stdlib.h>

0 commit comments

Comments
 (0)