66
66
#include <termios.h>
67
67
#elif TARGET_OS_WASI
68
68
#include <fcntl.h>
69
+ #include <sys/stat.h>
69
70
#elif TARGET_OS_LINUX
70
71
#include <errno.h>
71
72
#include <features.h>
@@ -382,9 +383,7 @@ CF_PRIVATE uint64_t __CFMemorySize(void);
382
383
CF_PRIVATE CFIndex __CFActiveProcessorCount (void );
383
384
CF_CROSS_PLATFORM_EXPORT CFStringRef CFCopyFullUserName (void );
384
385
385
- #if !TARGET_OS_WASI
386
386
extern CFWriteStreamRef _CFWriteStreamCreateFromFileDescriptor (CFAllocatorRef alloc , int fd );
387
- #endif
388
387
389
388
#if !__COREFOUNDATION_FORFOUNDATIONONLY__
390
389
typedef const struct __CFKeyedArchiverUID * CFKeyedArchiverUIDRef ;
@@ -396,9 +395,7 @@ extern uint32_t _CFKeyedArchiverUIDGetValue(CFKeyedArchiverUIDRef uid);
396
395
extern CFIndex __CFBinaryPlistWriteToStream (CFPropertyListRef plist , CFTypeRef stream );
397
396
CF_CROSS_PLATFORM_EXPORT CFDataRef _CFPropertyListCreateXMLDataWithExtras (CFAllocatorRef allocator , CFPropertyListRef propertyList );
398
397
399
- #if !TARGET_OS_WASI
400
398
extern CFWriteStreamRef _CFWriteStreamCreateFromFileDescriptor (CFAllocatorRef alloc , int fd );
401
- #endif
402
399
403
400
CF_EXPORT char * _Nullable * _Nonnull _CFEnviron (void ) ;
404
401
@@ -446,7 +443,6 @@ CF_EXPORT CFCharacterSetRef _CFCharacterSetCreateCopy(CFAllocatorRef alloc, CFCh
446
443
CF_EXPORT CFMutableCharacterSetRef _CFCharacterSetCreateMutableCopy (CFAllocatorRef alloc , CFCharacterSetRef theSet );
447
444
CF_CROSS_PLATFORM_EXPORT void _CFCharacterSetInitCopyingSet (CFAllocatorRef alloc , CFMutableCharacterSetRef cset , CFCharacterSetRef theSet , bool isMutable , bool validateSubclasses );
448
445
449
- #if !TARGET_OS_WASI
450
446
CF_EXPORT _Nullable CFErrorRef CFReadStreamCopyError (CFReadStreamRef _Null_unspecified stream );
451
447
452
448
CF_EXPORT _Nullable CFErrorRef CFWriteStreamCopyError (CFWriteStreamRef _Null_unspecified stream );
@@ -455,7 +451,6 @@ CF_CROSS_PLATFORM_EXPORT CFStringRef _Nullable _CFBundleCopyExecutablePath(CFBun
455
451
CF_CROSS_PLATFORM_EXPORT Boolean _CFBundleSupportsFHSBundles (void );
456
452
CF_CROSS_PLATFORM_EXPORT Boolean _CFBundleSupportsFreestandingBundles (void );
457
453
CF_CROSS_PLATFORM_EXPORT CFStringRef _Nullable _CFBundleCopyLoadedImagePathForAddress (const void * p );
458
- #endif
459
454
460
455
CF_CROSS_PLATFORM_EXPORT CFStringRef __CFTimeZoneCopyDataVersionString (void );
461
456
@@ -561,7 +556,7 @@ CF_CROSS_PLATFORM_EXPORT CFIndex __CFCharDigitValue(UniChar ch);
561
556
562
557
#if TARGET_OS_WIN32
563
558
CF_CROSS_PLATFORM_EXPORT int _CFOpenFileWithMode (const unsigned short * path , int opts , mode_t mode );
564
- #elif ! TARGET_OS_WASI
559
+ #else
565
560
CF_CROSS_PLATFORM_EXPORT int _CFOpenFileWithMode (const char * path , int opts , mode_t mode );
566
561
#endif
567
562
CF_CROSS_PLATFORM_EXPORT void * _CFReallocf (void * ptr , size_t size );
0 commit comments