summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/gcc/darwin/headers-10.13-fix.patch
blob: 3dbfde0255aa38833f6c162dd22cb30231c4bd58 (plain) (blame)
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
diff -pur fixincludes/fixincl.x gcc-5.5.0/fixincludes/fixincl.x
--- a/fixincludes/fixincl.x	2017-01-30 17:08:42.000000000 +0100
+++ b/fixincludes/fixincl.x	2017-12-21 14:34:35.000000000 +0100
@@ -1,12 +1,12 @@
 /*  -*- buffer-read-only: t -*- vi: set ro:
- * 
+ *
  * DO NOT EDIT THIS FILE   (fixincl.x)
- * 
- * It has been AutoGen-ed  January  5, 2017 at 06:05:06 PM by AutoGen 5.16.2
+ *
+ * It has been AutoGen-ed  December 21, 2017 at 02:34:35 PM by AutoGen 5.18.7
  * From the definitions    inclhack.def
  * and the template file   fixincl
  */
-/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Jan  5 18:05:06 CET 2017
+/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Dec 21 14:34:35 CET 2017
  *
  * You must regenerate it.  Use the ./genfixes script.
  *
@@ -15,7 +15,7 @@
  * certain ANSI-incompatible system header files which are fixed to work
  * correctly with ANSI C and placed in a directory that GNU C will search.
  *
- * This file contains 240 fixup descriptions.
+ * This file contains 241 fixup descriptions.
  *
  * See README for more information.
  *
@@ -2579,6 +2579,43 @@ extern \"C\" {\n\
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
+ *  Description of Darwin_Osavailability fix
+ */
+tSCC zDarwin_OsavailabilityName[] =
+     "darwin_osavailability";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zDarwin_OsavailabilityList[] =
+  "os/availability.h\0";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzDarwin_OsavailabilityMachs[] = {
+        "*-*-darwin*",
+        (const char*)NULL };
+
+/*
+ *  content selection pattern - do fix if pattern found
+ */
+tSCC zDarwin_OsavailabilitySelect0[] =
+       "#define[ \t]+__(API_[A-Z_]*)\\(\\.\\.\\.\\)";
+
+#define    DARWIN_OSAVAILABILITY_TEST_CT  1
+static tTestDesc aDarwin_OsavailabilityTests[] = {
+  { TT_EGREP,    zDarwin_OsavailabilitySelect0, (regex_t*)NULL }, };
+
+/*
+ *  Fix Command Arguments for Darwin_Osavailability
+ */
+static const char* apzDarwin_OsavailabilityPatch[] = {
+    "format",
+    "#define %1(...)",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
  *  Description of Darwin_9_Long_Double_Funcs_2 fix
  */
 tSCC zDarwin_9_Long_Double_Funcs_2Name[] =
@@ -9818,9 +9855,9 @@ static const char* apzX11_SprintfPatch[]
  *
  *  List of all fixes
  */
-#define REGEX_COUNT          276
+#define REGEX_COUNT          277
 #define MACH_LIST_SIZE_LIMIT 187
-#define FIX_COUNT            240
+#define FIX_COUNT            241
 
 /*
  *  Enumerate the fixes
@@ -9885,6 +9922,7 @@ typedef enum {
     CTRL_QUOTES_DEF_FIXIDX,
     CTRL_QUOTES_USE_FIXIDX,
     CXX_UNREADY_FIXIDX,
+    DARWIN_OSAVAILABILITY_FIXIDX,
     DARWIN_9_LONG_DOUBLE_FUNCS_2_FIXIDX,
     DARWIN_EXTERNC_FIXIDX,
     DARWIN_GCC4_BREAKAGE_FIXIDX,
@@ -10364,6 +10402,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      CXX_UNREADY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aCxx_UnreadyTests,   apzCxx_UnreadyPatch, 0 },
 
+  {  zDarwin_OsavailabilityName,    zDarwin_OsavailabilityList,
+     apzDarwin_OsavailabilityMachs,
+     DARWIN_OSAVAILABILITY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aDarwin_OsavailabilityTests,   apzDarwin_OsavailabilityPatch, 0 },
+
   {  zDarwin_9_Long_Double_Funcs_2Name,    zDarwin_9_Long_Double_Funcs_2List,
      apzDarwin_9_Long_Double_Funcs_2Machs,
      DARWIN_9_LONG_DOUBLE_FUNCS_2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff -pur fixincludes/inclhack.def gcc-5.5.0/fixincludes/inclhack.def
--- a/fixincludes/inclhack.def	2017-01-30 17:08:42.000000000 +0100
+++ b/fixincludes/inclhack.def	2017-12-21 14:34:28.000000000 +0100
@@ -1337,6 +1337,18 @@ fix = {
     test_text = "extern void* malloc( size_t );";
 };
 
+fix = {
+    hackname  = darwin_osavailability;
+    mach      = "*-*-darwin*";
+    files     = os/availability.h;
+    select    = "#define[ \t]+__(API_[A-Z_]*)\\(\\.\\.\\.\\)";
+    c_fix     = format;
+    c_fix_arg = "#define %1(...)";
+
+    test_text = "#define __API_AVAILABLE(...)\n"
+		"#define API_AVAILABLE(...)\n";
+};
+
 /*
  *  For the AAB_darwin7_9_long_double_funcs fix to be useful,
  *  you have to not use "" includes.