6666#include <termios.h>
6767#elif TARGET_OS_WASI
6868#include <fcntl.h>
69+ #include <sys/stat.h>
6970// Define _WASI_EMULATED_MMAN here to use the emulated mman functions in
7071// Foundation-side without requiring transitive clients to define it.
7172#undef _WASI_EMULATED_MMAN
@@ -387,9 +388,7 @@ CF_PRIVATE uint64_t __CFMemorySize(void);
387388CF_PRIVATE CFIndex __CFActiveProcessorCount (void );
388389CF_CROSS_PLATFORM_EXPORT CFStringRef CFCopyFullUserName (void );
389390
390- #if !TARGET_OS_WASI
391391extern CFWriteStreamRef _CFWriteStreamCreateFromFileDescriptor (CFAllocatorRef alloc , int fd );
392- #endif
393392
394393#if !__COREFOUNDATION_FORFOUNDATIONONLY__
395394typedef const struct __CFKeyedArchiverUID * CFKeyedArchiverUIDRef ;
@@ -401,9 +400,7 @@ extern uint32_t _CFKeyedArchiverUIDGetValue(CFKeyedArchiverUIDRef uid);
401400extern CFIndex __CFBinaryPlistWriteToStream (CFPropertyListRef plist , CFTypeRef stream );
402401CF_CROSS_PLATFORM_EXPORT CFDataRef _CFPropertyListCreateXMLDataWithExtras (CFAllocatorRef allocator , CFPropertyListRef propertyList );
403402
404- #if !TARGET_OS_WASI
405403extern CFWriteStreamRef _CFWriteStreamCreateFromFileDescriptor (CFAllocatorRef alloc , int fd );
406- #endif
407404
408405CF_EXPORT char * _Nullable * _Nonnull _CFEnviron (void ) ;
409406
@@ -451,7 +448,6 @@ CF_EXPORT CFCharacterSetRef _CFCharacterSetCreateCopy(CFAllocatorRef alloc, CFCh
451448CF_EXPORT CFMutableCharacterSetRef _CFCharacterSetCreateMutableCopy (CFAllocatorRef alloc , CFCharacterSetRef theSet );
452449CF_CROSS_PLATFORM_EXPORT void _CFCharacterSetInitCopyingSet (CFAllocatorRef alloc , CFMutableCharacterSetRef cset , CFCharacterSetRef theSet , bool isMutable , bool validateSubclasses );
453450
454- #if !TARGET_OS_WASI
455451CF_EXPORT _Nullable CFErrorRef CFReadStreamCopyError (CFReadStreamRef _Null_unspecified stream );
456452
457453CF_EXPORT _Nullable CFErrorRef CFWriteStreamCopyError (CFWriteStreamRef _Null_unspecified stream );
@@ -460,7 +456,6 @@ CF_CROSS_PLATFORM_EXPORT CFStringRef _Nullable _CFBundleCopyExecutablePath(CFBun
460456CF_CROSS_PLATFORM_EXPORT Boolean _CFBundleSupportsFHSBundles (void );
461457CF_CROSS_PLATFORM_EXPORT Boolean _CFBundleSupportsFreestandingBundles (void );
462458CF_CROSS_PLATFORM_EXPORT CFStringRef _Nullable _CFBundleCopyLoadedImagePathForAddress (const void * p );
463- #endif
464459
465460CF_CROSS_PLATFORM_EXPORT CFStringRef __CFTimeZoneCopyDataVersionString (void );
466461
@@ -566,7 +561,7 @@ CF_CROSS_PLATFORM_EXPORT CFIndex __CFCharDigitValue(UniChar ch);
566561
567562#if TARGET_OS_WIN32
568563CF_CROSS_PLATFORM_EXPORT int _CFOpenFileWithMode (const unsigned short * path , int opts , mode_t mode );
569- #elif ! TARGET_OS_WASI
564+ #else
570565CF_CROSS_PLATFORM_EXPORT int _CFOpenFileWithMode (const char * path , int opts , mode_t mode );
571566#endif
572567CF_CROSS_PLATFORM_EXPORT void * _CFReallocf (void * ptr , size_t size );
0 commit comments