1 [= autogen template -*- Mode: C -*-
4 * DO NOT EDIT THIS FILE - it has been generated
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.
10 * This file contains [=_eval fix _count =] fixup descriptions.
12 * See README-fixinc for more information.
14 * inclhack copyright (c) 1998, 1999, 2000
15 * The Free Software Foundation, Inc.
17 [=_eval inclhack "# * " _gpl=]
19 [= _SETENV re_ct 0 =][= _SETENV max_mach 0 =][=
22 /* * * * * * * * * * * * * * * * * * * * * * * * * *
24 * Description of [=hackname _cap=] fix
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.
31 #define [=hackname _up #_FIXIDX + #%-32s _printf=] [=_eval _index=]
32 tSCC z[=hackname _cap=]Name[] =
36 * File name selection pattern
40 tSCC z[=hackname _cap=]List[] =
41 "[=_FOR files =]|[=files=][=/files=]|";[=
44 #define z[=hackname _cap=]List (char*)NULL[=
45 _ENDIF "files _exist" =]
47 * Machine/OS name selection pattern
51 tSCC* apz[=hackname _cap=]Machs[] = {[=
52 _SETENV this_mach 0 =][=
56 _SETENV this_mach mach _len this_mach _env _val 5 + +
58 (const char*)NULL };[=
60 _SETENV max_mach _mark this_mach _env _val max_mach _env _val _max =][=
63 #define apz[=hackname _cap=]Machs (const char**)NULL[=
64 _ENDIF "files _exist" =][=
69 * content selection pattern - do fix if pattern found
72 tSCC z[=hackname _cap=]Select[=_eval _index=][] =
80 * content bypass pattern - skip fix if pattern found
83 tSCC z[=hackname _cap=]Bypass[=_eval _index=][] =
91 * perform the 'test' shell command - do fix on success
94 tSCC z[=hackname _cap=]Test[=_eval _index=][] =
102 * perform the C function call test
105 tSCC z[=hackname _cap=]FTst[=_eval _index=][] = "[=c_test=]";[=
110 # Build the array of test descriptions for this fix: =][=
118 #define [=hackname _up =]_TEST_CT [=
127 static tTestDesc a[=hackname _cap=]Tests[] = {[=
130 { TT_TEST, z[=hackname _cap=]Test[=_eval _index=], 0 /* unused */ },[=
134 { TT_FUNCTION, z[=hackname _cap=]FTst[=_eval _index=], 0 /* unused */ },[=
138 { TT_NEGREP, z[=hackname _cap=]Bypass[=_eval _index=], (regex_t*)NULL },[=
142 { TT_EGREP, z[=hackname _cap=]Select[=_eval _index=], (regex_t*)NULL },[=
145 #define [=hackname _up=]_TEST_CT 0
146 #define a[=hackname _cap=]Tests (tTestDesc*)NULL[=
150 * Fix Command Arguments for [=hackname _cap=]
152 static const char* apz[=hackname _cap=]Patch[] = {[=
153 _IF sed _exist =] "sed"[=
155 "-e", [=sed _krstr=][=
158 _ELIF shell _exist =] "sh", "-c",
161 _ELIF c_fix _exist =]
166 [=c_fix_arg _krstr=],[=
169 _ELIF replace _len =]
170 [=replace _krstr=],[=
176 /* * * * * * * * * * * * * * * * * * * * * * * * * *
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.
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 =]
188 tFixDesc fixDescList[ FIX_COUNT ] = {[=
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[=
198 _IF shell _exist =] | FD_SHELL_SCRIPT[=
199 _ELIF c_fix _exist =] | FD_SUBROUTINE[=
200 _ELIF replace _exist =] | FD_REPLACEMENT[=
202 a[=hackname _cap=]Tests, apz[=hackname _cap=]Patch, 0 }[=