|
1 Index: fixincludes/fixincl.x |
|
2 diff -Nau fixincludes/fixincl.x.orig fixincludes/fixincl.x |
|
3 --- fixincludes/fixincl.x.orig 2010-11-09 11:26:09.000000000 +0100 |
|
4 +++ fixincludes/fixincl.x 2012-03-18 17:12:11.061364028 +0100 |
|
5 @@ -15,7 +15,7 @@ |
|
6 * certain ANSI-incompatible system header files which are fixed to work |
|
7 * correctly with ANSI C and placed in a directory that GNU C will search. |
|
8 * |
|
9 - * This file contains 210 fixup descriptions. |
|
10 + * This file contains 211 fixup descriptions. |
|
11 * |
|
12 * See README for more information. |
|
13 * |
|
14 @@ -6969,6 +6969,43 @@ |
|
15 |
|
16 /* * * * * * * * * * * * * * * * * * * * * * * * * * |
|
17 * |
|
18 + * Description of Solaris_Posix_Spawn_Restrict fix |
|
19 + */ |
|
20 +tSCC zSolaris_Posix_Spawn_RestrictName[] = |
|
21 + "solaris_posix_spawn_restrict"; |
|
22 + |
|
23 +/* |
|
24 + * File name selection pattern |
|
25 + */ |
|
26 +tSCC zSolaris_Posix_Spawn_RestrictList[] = |
|
27 + "spawn.h\0"; |
|
28 +/* |
|
29 + * Machine/OS name selection pattern |
|
30 + */ |
|
31 +tSCC* apzSolaris_Posix_Spawn_RestrictMachs[] = { |
|
32 + "*-*-solaris2*", |
|
33 + (const char*)NULL }; |
|
34 + |
|
35 +/* |
|
36 + * content selection pattern - do fix if pattern found |
|
37 + */ |
|
38 +tSCC zSolaris_Posix_Spawn_RestrictSelect0[] = |
|
39 + "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)"; |
|
40 + |
|
41 +#define SOLARIS_POSIX_SPAWN_RESTRICT_TEST_CT 1 |
|
42 +static tTestDesc aSolaris_Posix_Spawn_RestrictTests[] = { |
|
43 + { TT_EGREP, zSolaris_Posix_Spawn_RestrictSelect0, (regex_t*)NULL }, }; |
|
44 + |
|
45 +/* |
|
46 + * Fix Command Arguments for Solaris_Posix_Spawn_Restrict |
|
47 + */ |
|
48 +static const char* apzSolaris_Posix_Spawn_RestrictPatch[] = { |
|
49 + "format", |
|
50 + "%1*_RESTRICT_KYWD %2%3", |
|
51 + (char*)NULL }; |
|
52 + |
|
53 +/* * * * * * * * * * * * * * * * * * * * * * * * * * |
|
54 + * |
|
55 * Description of Solaris_Stdio_Tag fix |
|
56 */ |
|
57 tSCC zSolaris_Stdio_TagName[] = |
|
58 @@ -8552,9 +8589,9 @@ |
|
59 * |
|
60 * List of all fixes |
|
61 */ |
|
62 -#define REGEX_COUNT 249 |
|
63 +#define REGEX_COUNT 250 |
|
64 #define MACH_LIST_SIZE_LIMIT 181 |
|
65 -#define FIX_COUNT 210 |
|
66 +#define FIX_COUNT 211 |
|
67 |
|
68 /* |
|
69 * Enumerate the fixes |
|
70 @@ -8731,6 +8768,7 @@ |
|
71 SOLARIS_INT_LIMITS_2_FIXIDX, |
|
72 SOLARIS_INT_LIMITS_3_FIXIDX, |
|
73 SOLARIS_INT_TYPES_FIXIDX, |
|
74 + SOLARIS_POSIX_SPAWN_RESTRICT_FIXIDX, |
|
75 SOLARIS_STDIO_TAG_FIXIDX, |
|
76 SOLARIS_SYS_VA_LIST_FIXIDX, |
|
77 STATSSWTCH_FIXIDX, |
|
78 @@ -9628,6 +9666,11 @@ |
|
79 SOLARIS_INT_TYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, |
|
80 aSolaris_Int_TypesTests, apzSolaris_Int_TypesPatch, 0 }, |
|
81 |
|
82 + { zSolaris_Posix_Spawn_RestrictName, zSolaris_Posix_Spawn_RestrictList, |
|
83 + apzSolaris_Posix_Spawn_RestrictMachs, |
|
84 + SOLARIS_POSIX_SPAWN_RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, |
|
85 + aSolaris_Posix_Spawn_RestrictTests, apzSolaris_Posix_Spawn_RestrictPatch, 0 }, |
|
86 + |
|
87 { zSolaris_Stdio_TagName, zSolaris_Stdio_TagList, |
|
88 apzSolaris_Stdio_TagMachs, |
|
89 SOLARIS_STDIO_TAG_TEST_CT, FD_MACH_ONLY, |
|
90 Index: fixincludes/inclhack.def |
|
91 diff -Nau fixincludes/inclhack.def.orig fixincludes/inclhack.def |
|
92 --- fixincludes/inclhack.def.orig 2010-11-09 11:26:09.000000000 +0100 |
|
93 +++ fixincludes/inclhack.def 2012-03-18 17:07:13.464117283 +0100 |
|
94 @@ -3693,6 +3693,23 @@ |
|
95 |
|
96 |
|
97 /* |
|
98 + * Solaris 10+ <spawn.h> uses char *const argv[_RESTRICT_KYWD] in the |
|
99 + * posix_spawn declarations, which doesn't work with C++. |
|
100 + */ |
|
101 +fix = { |
|
102 + hackname = solaris_posix_spawn_restrict; |
|
103 + files = spawn.h; |
|
104 + mach = '*-*-solaris2*'; |
|
105 + c_fix = format; |
|
106 + c_fix_arg = "%1*_RESTRICT_KYWD %2%3"; |
|
107 + select = "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)"; |
|
108 + test_text = |
|
109 + "char *const argv[_RESTRICT_KYWD],\n" |
|
110 + "char *const envp[_RESTRICT_KYWD]);"; |
|
111 +}; |
|
112 + |
|
113 + |
|
114 +/* |
|
115 * Sun Solaris 8 has what appears to be some gross workaround for |
|
116 * some old version of their c++ compiler. G++ doesn't want it |
|
117 * either, but doesn't want to be tied to SunPRO version numbers. |
|
118 Index: fixincludes/tests/base/spawn.h |
|
119 diff -Nau fixincludes/tests/base/spawn.h.orig fixincludes/tests/base/spawn.h |
|
120 --- fixincludes/tests/base/spawn.h.orig 1970-01-01 01:00:00.000000000 +0100 |
|
121 +++ fixincludes/tests/base/spawn.h 2012-03-18 15:28:02.432219498 +0100 |
|
122 @@ -0,0 +1,15 @@ |
|
123 +/* DO NOT EDIT THIS FILE. |
|
124 + |
|
125 + It has been auto-edited by fixincludes from: |
|
126 + |
|
127 + "fixinc/tests/inc/spawn.h" |
|
128 + |
|
129 + This had to be done to correct non-standard usages in the |
|
130 + original, manufacturer supplied header file. */ |
|
131 + |
|
132 + |
|
133 + |
|
134 +#if defined( SOLARIS_POSIX_SPAWN_RESTRICT_CHECK ) |
|
135 +char *const *_RESTRICT_KYWD argv, |
|
136 +char *const *_RESTRICT_KYWD envp); |
|
137 +#endif /* SOLARIS_POSIX_SPAWN_RESTRICT_CHECK */ |