Skip to content

CoreFoundation watchOS xcode13.0 beta1

Manuel de la Pena edited this page Aug 25, 2021 · 3 revisions

#CoreFoundation.framework https://github.com/xamarin/xamarin-macios/pull/12552

diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h	2021-03-16 09:54:03.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFBase.h	2021-06-02 05:37:46.000000000 -0400
@@ -64,7 +64,7 @@
 #define __has_extension(x) 0
 #endif
 
-#if defined(__GNUC__) || 0
+#if defined(__GNUC__) || TARGET_OS_WIN32
 #include <stdint.h>
 #include <stdbool.h>
 #endif
@@ -133,9 +133,25 @@
 #endif
 #endif
 
+#if TARGET_OS_WIN32
+    #if defined(__cplusplus)
+        #define _CF_EXTERN extern "C"
+    #else
+        #define _CF_EXTERN extern
+    #endif
 
+    #if defined(_WINDLL)
+        #if defined(CoreFoundation_EXPORTS) || defined(CF_BUILDING_CF)
+            #define CF_EXPORT _CF_EXTERN __declspec(dllexport)
+        #else
+            #define CF_EXPORT _CF_EXTERN __declspec(dllimport)
+        #endif
+    #else
+        #define CF_EXPORT _CF_EXTERN
+    #endif
+#else
 #define CF_EXPORT extern
-
+#endif
 
 CF_EXTERN_C_BEGIN
 
@@ -166,6 +182,8 @@
 	#define CF_INLINE static inline
     #elif defined(_MSC_VER)
         #define CF_INLINE static __inline
+    #elif TARGET_OS_WIN32
+	#define CF_INLINE static __inline__
     #endif
 #endif
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h	2021-03-16 08:40:59.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFNotificationCenter.h	2021-05-22 06:58:46.000000000 -0400
@@ -37,7 +37,7 @@
 
 CF_EXPORT CFNotificationCenterRef CFNotificationCenterGetLocalCenter(void);
 
-#if TARGET_OS_OSX || 0
+#if TARGET_OS_OSX || TARGET_OS_WIN32
 CF_EXPORT CFNotificationCenterRef CFNotificationCenterGetDistributedCenter(void);
 #endif
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFPlugInCOM.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFPlugInCOM.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFPlugInCOM.h	2021-03-16 13:53:27.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFPlugInCOM.h	2021-05-22 07:20:07.000000000 -0400
@@ -20,12 +20,17 @@
 /* The _reserved field is part of the Microsoft COM binary standard on Macintosh. */
 /* You can declare new C struct interfaces by defining a new struct that includes "IUNKNOWN_C_GUTS;" before the first field of the struct. */
 
-
+#if TARGET_OS_WIN32
+#define NOMINMAX
+#define VC_EXTRALEAN
+#define WIN32_LEAN_AND_MEAN
+#include <Windows.h>
+#else
 typedef SInt32 HRESULT;
 typedef UInt32 ULONG;
 typedef void *LPVOID;
 typedef CFUUIDBytes REFIID;
-
+#endif
 
 #define SUCCEEDED(Status) ((HRESULT)(Status) >= 0)
 #define FAILED(Status) ((HRESULT)(Status)<0)
@@ -96,7 +101,9 @@
 /* This is a definition of IUnknown as a pure abstract virtual C++ class.  This class will work only with compilers that can produce COM-compatible object layouts for C++ classes.  egcs can not do this.  MetroWerks can do this (if you subclass from __comobject) */
 
 class IUnknown
-
+#if defined(__MWERKS__) && TARGET_OS_WIN32
+ : __comobject
+#endif
 {
     public:
     virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, LPVOID *ppv) = 0;
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSocket.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSocket.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSocket.h	2021-03-16 05:20:05.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFSocket.h	2021-06-02 07:34:04.000000000 -0400
@@ -140,9 +140,11 @@
     CFStringRef	(*copyDescription)(const void *info);
 } CFSocketContext;
 
-
+#if TARGET_OS_WIN32
+typedef uintptr_t CFSocketNativeHandle;
+#else
 typedef int CFSocketNativeHandle;
-
+#endif
 
 CF_EXPORT CFTypeID	CFSocketGetTypeID(void);
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h	2021-03-16 08:44:30.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h	2021-06-02 12:46:58.000000000 -0400
@@ -327,11 +327,11 @@
 CF_IMPLICIT_BRIDGING_DISABLED
 /* Socket streams; the returned streams are paired such that they use the same socket; pass NULL if you want only the read stream or the write stream */
 CF_EXPORT
-void CFStreamCreatePairWithSocket(CFAllocatorRef _Null_unspecified alloc, CFSocketNativeHandle sock, CFReadStreamRef _Null_unspecified *   _Null_unspecified readStream, CFWriteStreamRef _Null_unspecified * _Null_unspecified writeStream);
+void CFStreamCreatePairWithSocket(CFAllocatorRef _Null_unspecified alloc, CFSocketNativeHandle sock, CFReadStreamRef _Null_unspecified *   _Null_unspecified readStream, CFWriteStreamRef _Null_unspecified * _Null_unspecified writeStream) API_DEPRECATED("Use nw_connection_t in Network framework instead", macos(10.1, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
 CF_EXPORT
-void CFStreamCreatePairWithSocketToHost(CFAllocatorRef _Null_unspecified alloc, CFStringRef _Null_unspecified host, UInt32 port, CFReadStreamRef _Null_unspecified * _Null_unspecified readStream, CFWriteStreamRef _Null_unspecified * _Null_unspecified writeStream);
+void CFStreamCreatePairWithSocketToHost(CFAllocatorRef _Null_unspecified alloc, CFStringRef _Null_unspecified host, UInt32 port, CFReadStreamRef _Null_unspecified * _Null_unspecified readStream, CFWriteStreamRef _Null_unspecified * _Null_unspecified writeStream) API_DEPRECATED("Use nw_connection_t in Network framework instead", macos(10.1, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
 CF_EXPORT
-void CFStreamCreatePairWithPeerSocketSignature(CFAllocatorRef _Null_unspecified alloc, const CFSocketSignature * _Null_unspecified signature, CFReadStreamRef _Null_unspecified * _Null_unspecified readStream, CFWriteStreamRef _Null_unspecified * _Null_unspecified writeStream);
+void CFStreamCreatePairWithPeerSocketSignature(CFAllocatorRef _Null_unspecified alloc, const CFSocketSignature * _Null_unspecified signature, CFReadStreamRef _Null_unspecified * _Null_unspecified readStream, CFWriteStreamRef _Null_unspecified * _Null_unspecified writeStream) API_DEPRECATED("Use nw_connection_t in Network framework instead", macos(10.1, API_TO_BE_DEPRECATED), ios(2.0, API_TO_BE_DEPRECATED), watchos(2.0, API_TO_BE_DEPRECATED), tvos(9.0, API_TO_BE_DEPRECATED));
 CF_IMPLICIT_BRIDGING_ENABLED
 
 
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h	2021-03-16 08:47:22.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFString.h	2021-06-02 07:34:04.000000000 -0400
@@ -148,7 +148,9 @@
 since it is the default choice with Mac OS X developer tools.
 */
 #ifndef CF_OPEN_SOURCE
-
+#if TARGET_OS_WIN32
+#undef __CONSTANT_CFSTRINGS__
+#endif
 #endif
 
 #if DEPLOYMENT_RUNTIME_SWIFT
diff -ruN /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h
--- /Applications/Xcode_12.5.0.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h	2021-03-16 05:15:31.000000000 -0400
+++ /Applications/Xcode_13.0.0-beta.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CoreFoundation.h	2021-05-22 07:13:39.000000000 -0400
@@ -69,7 +69,7 @@
 #include <CoreFoundation/CFUtilities.h>
 #include <CoreFoundation/CFBundle.h>
 
-#if TARGET_OS_OSX || TARGET_OS_IPHONE || 0
+#if TARGET_OS_OSX || TARGET_OS_IPHONE || TARGET_OS_WIN32
 #include <CoreFoundation/CFMessagePort.h>
 #include <CoreFoundation/CFPlugIn.h>
 #include <CoreFoundation/CFRunLoop.h>
Clone this wiki locally