Skip to content

Commit b5d216e

Browse files
authored
Merge pull request #1800 from compnerd/windows-round-2
Windows Port Continuation
2 parents b787a7c + 92f7fe3 commit b5d216e

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

CoreFoundation/Base.subproj/CFInternal.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,8 +869,8 @@ CF_PRIVATE bool __CFBinaryPlistIsArray(const uint8_t *databytes, uint64_t datale
869869

870870
// These are replacements for pthread calls on Windows
871871
CF_EXPORT int _NS_pthread_main_np();
872-
CF_EXPORT int _NS_pthread_setspecific(pthread_key_t key, const void *val);
873-
CF_EXPORT void* _NS_pthread_getspecific(pthread_key_t key);
872+
CF_EXPORT int _NS_pthread_setspecific(_CFThreadSpecificKey key, const void *val);
873+
CF_EXPORT void* _NS_pthread_getspecific(_CFThreadSpecificKey key);
874874
CF_EXPORT int _NS_pthread_key_init_np(int key, void (*destructor)(void *));
875875
CF_EXPORT void _NS_pthread_setname_np(const char *name);
876876

CoreFoundation/Base.subproj/CFPlatform.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ CF_PRIVATE void __CFFinalizeWindowsThreadData() {
620620

621621
#endif
622622

623-
static pthread_key_t __CFTSDIndexKey;
623+
static _CFThreadSpecificKey __CFTSDIndexKey;
624624

625625
CF_PRIVATE void __CFTSDInitialize() {
626626
static dispatch_once_t once;
@@ -1209,8 +1209,8 @@ static void _CF_sem_destroy(_CF_sema_t s) {
12091209
free(s);
12101210
}
12111211

1212-
CF_INLINE pthread_key_t _CF_thread_sem_key() {
1213-
static pthread_key_t key = 0;
1212+
CF_INLINE _CFThreadSpecificKey _CF_thread_sem_key() {
1213+
static _CFThreadSpecificKey key = 0;
12141214
static OSSpinLock lock = OS_SPINLOCK_INIT;
12151215
if (key == 0) {
12161216
OSSpinLockLock(&lock);
@@ -1223,7 +1223,7 @@ CF_INLINE pthread_key_t _CF_thread_sem_key() {
12231223
}
12241224

12251225
CF_INLINE _CF_sema_t _CF_get_thread_semaphore() {
1226-
pthread_key_t key = _CF_thread_sem_key();
1226+
_CFThreadSpecificKey key = _CF_thread_sem_key();
12271227
_CF_sema_t s = (_CF_sema_t)pthread_getspecific(key);
12281228
if (s == NULL) {
12291229
s = malloc(sizeof(struct _CF_sema_s));

CoreFoundation/Base.subproj/ForSwiftFoundationOnly.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ extern uint32_t _CFKeyedArchiverUIDGetValue(CFKeyedArchiverUIDRef uid);
338338
#endif
339339

340340
extern CFIndex __CFBinaryPlistWriteToStream(CFPropertyListRef plist, CFTypeRef stream);
341-
extern CFDataRef _CFPropertyListCreateXMLDataWithExtras(CFAllocatorRef allocator, CFPropertyListRef propertyList);
341+
CF_CROSS_PLATFORM_EXPORT CFDataRef _CFPropertyListCreateXMLDataWithExtras(CFAllocatorRef allocator, CFPropertyListRef propertyList);
342342
extern CFWriteStreamRef _CFWriteStreamCreateFromFileDescriptor(CFAllocatorRef alloc, int fd);
343343

344344
CF_EXPORT char *_Nullable *_Nonnull _CFEnviron(void);

CoreFoundation/Locale.subproj/CFCalendar_Internal.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ CF_PRIVATE void __CFCalendarZapCal(CFCalendarRef calendar);
9393

9494
CF_PRIVATE CFCalendarRef _CFCalendarCreateCopy(CFAllocatorRef allocator, CFCalendarRef calendar);
9595

96-
CF_PRIVATE Boolean _CFCalendarComposeAbsoluteTimeV(CFCalendarRef calendar, /* out */ CFAbsoluteTime *atp, const char *componentDesc, int32_t *vector, int32_t count);
97-
CF_PRIVATE Boolean _CFCalendarDecomposeAbsoluteTimeV(CFCalendarRef calendar, CFAbsoluteTime at, const char *componentDesc, int32_t *_Nonnull * _Nonnull vector, int32_t count);
98-
CF_PRIVATE Boolean _CFCalendarAddComponentsV(CFCalendarRef calendar, /* inout */ CFAbsoluteTime *atp, CFOptionFlags options, const char *componentDesc, int32_t *vector, int32_t count);
99-
CF_PRIVATE Boolean _CFCalendarGetComponentDifferenceV(CFCalendarRef calendar, CFAbsoluteTime startingAT, CFAbsoluteTime resultAT, CFOptionFlags options, const char *componentDesc, int32_t *_Nonnull * _Nonnull vector, int32_t count);
96+
CF_CROSS_PLATFORM_EXPORT Boolean _CFCalendarComposeAbsoluteTimeV(CFCalendarRef calendar, /* out */ CFAbsoluteTime *atp, const char *componentDesc, int32_t *vector, int32_t count);
97+
CF_CROSS_PLATFORM_EXPORT Boolean _CFCalendarDecomposeAbsoluteTimeV(CFCalendarRef calendar, CFAbsoluteTime at, const char *componentDesc, int32_t *_Nonnull * _Nonnull vector, int32_t count);
98+
CF_CROSS_PLATFORM_EXPORT Boolean _CFCalendarAddComponentsV(CFCalendarRef calendar, /* inout */ CFAbsoluteTime *atp, CFOptionFlags options, const char *componentDesc, int32_t *vector, int32_t count);
99+
CF_CROSS_PLATFORM_EXPORT Boolean _CFCalendarGetComponentDifferenceV(CFCalendarRef calendar, CFAbsoluteTime startingAT, CFAbsoluteTime resultAT, CFOptionFlags options, const char *componentDesc, int32_t *_Nonnull * _Nonnull vector, int32_t count);
100100
CF_PRIVATE Boolean _CFCalendarIsDateInWeekend(CFCalendarRef calendar, CFDateRef date);
101101
CF_PRIVATE Boolean _CFCalendarGetNextWeekend(CFCalendarRef calendar, _CFCalendarWeekendRange *range);
102102

CoreFoundation/Stream.subproj/CFStream.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1844,11 +1844,11 @@ static void waitForOpen(struct _CFStream *stream) {
18441844
_CFStreamUnscheduleFromRunLoop(stream, runLoop, privateMode);
18451845
}
18461846

1847-
CF_EXPORT CFArrayRef _CFReadStreamCopyRunLoopsAndModes(CFReadStreamRef readStream) {
1847+
CFArrayRef _CFReadStreamCopyRunLoopsAndModes(CFReadStreamRef readStream) {
18481848
return _CFStreamCopyRunLoopsAndModes((struct _CFStream *)readStream);
18491849
}
18501850

1851-
CF_EXPORT CFArrayRef _CFWriteStreamCopyRunLoopsAndModes(CFWriteStreamRef writeStream) {
1851+
CFArrayRef _CFWriteStreamCopyRunLoopsAndModes(CFWriteStreamRef writeStream) {
18521852
return _CFStreamCopyRunLoopsAndModes((struct _CFStream *)writeStream);
18531853
}
18541854

0 commit comments

Comments
 (0)