]> gcc.gnu.org Git - gcc.git/blob - gcc/fixinc/fixincl.tpl
ec7c812171518f28212b77d255a78dfc655e048b
[gcc.git] / gcc / fixinc / fixincl.tpl
1 [= autogen template -*- Mode: C -*-
2 x=fixincl.x =]
3 /*
4 * DO NOT EDIT THIS FILE - it has been generated
5 *
6 * Install modified versions of certain ANSI-incompatible system header
7 * files which are fixed to work correctly with ANSI C and placed in a
8 * directory that GNU C will search.
9 *
10 * This file contains [=_eval fix _count =] fixup descriptions.
11 *
12 * See README-fixinc for more information.
13 *
14 * inclhack copyright (c) 1998, 1999, 2000
15 * The Free Software Foundation, Inc.
16 *
17 [=_eval inclhack "# * " _gpl=]
18 */
19 [= _SETENV re_ct 0 =][= _SETENV max_mach 0 =][=
20
21 _FOR fix =]
22 /* * * * * * * * * * * * * * * * * * * * * * * * * *
23 *
24 * Description of [=hackname _cap=] fix
25 */[=
26
27 # Note that this is not just for debugging purposes, but in case
28 some C fix wishes to refer to the regexps it is paired with.
29 See commentary at the top of fixfixes.c.
30 =]
31 #define [=hackname _up #_FIXIDX + #%-32s _printf=] [=_eval _index=]
32 tSCC z[=hackname _cap=]Name[] =
33 [=hackname _krstr=];
34
35 /*
36 * File name selection pattern
37 */[=
38
39 _IF files _exist=]
40 tSCC z[=hackname _cap=]List[] =
41 "[=_FOR files =]|[=files=][=/files=]|";[=
42
43 _ELSE =]
44 #define z[=hackname _cap=]List (char*)NULL[=
45 _ENDIF "files _exist" =]
46 /*
47 * Machine/OS name selection pattern
48 */[=
49
50 _IF mach _exist=]
51 tSCC* apz[=hackname _cap=]Machs[] = {[=
52 _SETENV this_mach 0 =][=
53
54 _FOR mach =]
55 [=mach _krstr=],[=
56 _SETENV this_mach mach _len this_mach _env _val 5 + +
57 =][= /mach=]
58 (const char*)NULL };[=
59
60 _SETENV max_mach _mark this_mach _env _val max_mach _env _val _max =][=
61
62 _ELSE =]
63 #define apz[=hackname _cap=]Machs (const char**)NULL[=
64 _ENDIF "files _exist" =][=
65
66 _IF select _exist=]
67
68 /*
69 * content selection pattern - do fix if pattern found
70 */[=
71 _FOR select =]
72 tSCC z[=hackname _cap=]Select[=_eval _index=][] =
73 [=select _krstr=];[=
74 /select =][=
75 _ENDIF =][=
76
77 _IF bypass _exist=]
78
79 /*
80 * content bypass pattern - skip fix if pattern found
81 */[=
82 _FOR bypass =]
83 tSCC z[=hackname _cap=]Bypass[=_eval _index=][] =
84 [=bypass _krstr=];[=
85 /bypass =][=
86 _ENDIF =][=
87
88 _IF test _exist=]
89
90 /*
91 * perform the 'test' shell command - do fix on success
92 */[=
93 _FOR test =]
94 tSCC z[=hackname _cap=]Test[=_eval _index=][] =
95 [=test _krstr=];[=
96 /test =][=
97 _ENDIF =][=
98
99 _IF c_test _exist=]
100
101 /*
102 * perform the C function call test
103 */[=
104 _FOR c_test =]
105 tSCC z[=hackname _cap=]FTst[=_eval _index=][] = "[=c_test=]";[=
106 /c_test =][=
107 _ENDIF =][=
108
109
110 # Build the array of test descriptions for this fix: =][=
111
112 _IF select _exist
113 bypass _exist |
114 test _exist |
115 c_test _exist |
116 =]
117
118 #define [=hackname _up =]_TEST_CT [=
119 _eval select _count
120 bypass _count +
121 test _count +
122 c_test _count + =][=
123 _SETENV re_ct
124 re_ct _env _val
125 select _count +
126 bypass _count + =]
127 tTestDesc a[=hackname _cap=]Tests[] = {[=
128
129 _FOR test =]
130 { TT_TEST, z[=hackname _cap=]Test[=_eval _index=], 0 /* unused */ },[=
131 /test =][=
132
133 _FOR c_test =]
134 { TT_FUNCTION, z[=hackname _cap=]FTst[=_eval _index=], 0 /* unused */ },[=
135 /c_test =][=
136
137 _FOR bypass =]
138 { TT_NEGREP, z[=hackname _cap=]Bypass[=_eval _index=], (regex_t*)NULL },[=
139 /bypass =][=
140
141 _FOR select =]
142 { TT_EGREP, z[=hackname _cap=]Select[=_eval _index=], (regex_t*)NULL },[=
143 /select =] };[=
144 _ELSE =]
145 #define [=hackname _up=]_TEST_CT 0
146 #define a[=hackname _cap=]Tests (tTestDesc*)NULL[=
147 _ENDIF =]
148
149 /*
150 * Fix Command Arguments for [=hackname _cap=]
151 */
152 const char* apz[=hackname _cap=]Patch[] = {[=
153 _IF sed _exist =] "sed"[=
154 _FOR sed=],
155 "-e", [=sed _krstr=][=
156 /sed=],[=
157
158 _ELIF shell _exist =] "sh", "-c",
159 [=shell _krstr=],[=
160
161 _ELIF c_fix _exist =]
162 [=
163 c_fix _krstr=],[=
164
165 _FOR c_fix_arg =]
166 [=c_fix_arg _krstr=],[=
167 /c_fix_arg =][=
168
169 _ELIF replace _len =]
170 [=replace _krstr=],[=
171
172 _ENDIF=]
173 (char*)NULL };
174 [=/fix=]
175
176 /* * * * * * * * * * * * * * * * * * * * * * * * * *
177 *
178 * List of all fixes
179 */[=
180 # as of this writing, 49 bytes are needed by the case statement format.
181 We also must allow for the size of the target machine machine name.
182 This allows for a 79 byte machine name. Better be enough.
183 =]
184 #define REGEX_COUNT [= _eval re_ct _env =]
185 #define MACH_LIST_SIZE_LIMIT [= _eval max_mach _env _val 128 + =]
186 #define FIX_COUNT [= _eval fix _count =]
187
188 tFixDesc fixDescList[ FIX_COUNT ] = {[=
189
190
191 _FOR fix ",\n" =]
192 { z[=hackname _cap=]Name, z[=hackname _cap=]List,
193 apz[=hackname _cap=]Machs,
194 [=hackname _up=]_TEST_CT, [=
195 _IF not_machine _exist =]FD_MACH_IFNOT[=
196 _ELSE =]FD_MACH_ONLY[=
197 _ENDIF =][=
198 _IF shell _exist =] | FD_SHELL_SCRIPT[=
199 _ELIF c_fix _exist =] | FD_SUBROUTINE[=
200 _ELIF replace _exist =] | FD_REPLACEMENT[=
201 _ENDIF =],
202 a[=hackname _cap=]Tests, apz[=hackname _cap=]Patch }[=
203
204 /fix=]
205 };
206
207 #define GNU_TYPE_CT [=_eval type_map _count =]
208 int gnu_type_map_ct = GNU_TYPE_CT;
209
210 tSCC z_cxx_guard[] = " && !defined(__cplusplus)";
211 tSCC z_nil[] = "";
212
213 t_gnu_type_map gnu_type_map[ GNU_TYPE_CT ] = {[=
214
215 _FOR type_map ,
216
217 =]
218 { [=_EVAL type_name _len=], "[=type_name=]", "[=type_name _up=]", "[=
219 gnu_type=]", [=
220 _IF cxx_type _exist =]z_cxx_guard[=
221 _ELSE =]z_nil[=
222 _ENDIF=] }[=
223
224 /type_map=]
225 };
This page took 0.046214 seconds and 5 git commands to generate.