summaryrefslogtreecommitdiff
path: root/tool/patches/AvailabilityInternal.diff
blob: 53a431ab01ff8f22479106e8fe462c87c866b76b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
diff --git /usr/include/AvailabilityInternal.h /usr/include/AvailabilityInternal.h
--- /usr/include/AvailabilityInternal.h
+++ /usr/include/AvailabilityInternal.h
@@ -1,1 +1,1 @@
-/*
+/*
@@ -21,7 +21,7 @@
 #ifndef __IPHONE_OS_VERSION_MIN_REQUIRED
 	#ifdef __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
         // compiler sets __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ when -miphoneos-version-min is used
-        #define __IPHONE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_IPHONE_VERSION_MIN_REQUIRED__
+        #define __IPHONE_OS_VERSION_MIN_REQUIRED __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
     #endif
 #endif
 
@@ -31,11 +31,13 @@
     #ifndef __IPHONE_OS_VERSION_MAX_ALLOWED
         #define __IPHONE_OS_VERSION_MAX_ALLOWED     __IPHONE_2_0
     #endif
-    // make sure a valid min is set
-    #if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_2_0
-        #undef __IPHONE_OS_VERSION_MIN_REQUIRED
-        #define __IPHONE_OS_VERSION_MIN_REQUIRED    __IPHONE_2_0 
-    #endif
+    #if __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_1_2
+        #define __AVAILABILITY_INTERNAL__IPHONE_1_2          __AVAILABILITY_INTERNAL_UNAVAILABLE
+    #elif __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_1_2
+        #define __AVAILABILITY_INTERNAL__IPHONE_1_2          __AVAILABILITY_INTERNAL_WEAK_IMPORT
+    #else
+        #define __AVAILABILITY_INTERNAL__IPHONE_1_2
+    #endif
     
     // set up internal macros
      #if __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_2_0
@@ -50,6 +50,19 @@
     #define __AVAILABILITY_INTERNAL__IPHONE_2_0_DEP__IPHONE_2_0    __AVAILABILITY_INTERNAL_DEPRECATED
     #define __AVAILABILITY_INTERNAL__IPHONE_NA_DEP__IPHONE_NA      __AVAILABILITY_INTERNAL_UNAVAILABLE
     
+    #if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_1_2
+        #define __AVAILABILITY_INTERNAL__IPHONE_1_0_DEP__IPHONE_1_2        __AVAILABILITY_INTERNAL_DEPRECATED
+    #else
+        #define __AVAILABILITY_INTERNAL__IPHONE_1_0_DEP__IPHONE_1_2        __AVAILABILITY_INTERNAL__IPHONE_1_0
+    #endif
+    #if __IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_2_0
+        #define __AVAILABILITY_INTERNAL__IPHONE_1_0_DEP__IPHONE_2_0        __AVAILABILITY_INTERNAL_DEPRECATED
+        #define __AVAILABILITY_INTERNAL__IPHONE_1_2_DEP__IPHONE_2_0        __AVAILABILITY_INTERNAL_DEPRECATED
+    #else
+        #define __AVAILABILITY_INTERNAL__IPHONE_1_0_DEP__IPHONE_2_0        __AVAILABILITY_INTERNAL__IPHONE_1_0
+        #define __AVAILABILITY_INTERNAL__IPHONE_1_2_DEP__IPHONE_2_0        __AVAILABILITY_INTERNAL__IPHONE_1_2
+    #endif
+    
 #elif defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__)
     // compiler for Mac OS X sets __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
     #define __MAC_OS_X_VERSION_MIN_REQUIRED __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__