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) [=_eval "date +%Y" _shell
15 =] The Free Software Foundation, Inc.
17 [=_eval inclhack "# * " _gpl=]
18 *[=_EVAL "re_ct=0\nmax_mach=0" _shell=][=
22 * Description of [=hackname _Cap=] fix
24 #define [=hackname _up #_FIXIDX + #%-32s _printf=] [=_eval _index=]
25 tSCC z[=hackname _cap=]Name[] =
26 [=hackname _cap _krstr=];
28 * File name selection pattern
32 tSCC z[=hackname _cap=]List[] =
33 "[=_FOR files =]|[=files=][=/files=]|";[=
36 #define z[=hackname _cap=]List (char*)NULL[=
37 _ENDIF "files _exist" =]
39 * Machine/OS name selection pattern
43 tSCC* apz[=hackname _cap=]Machs[] = {[=
44 _EVAL "this_mach=0" _shell =][=
48 _EVAL mach _len "this_mach=`expr $this_mach + %d + 5`"
51 (const char*)NULL };[=
53 _EVAL "if [ $this_mach -gt $max_mach ] ; then max_mach=$this_mach ; fi"
57 #define apz[=hackname _cap=]Machs (const char**)NULL[=
58 _ENDIF "files _exist" =][=
63 * content selection pattern - do fix if pattern found
64 * This is a special pattern that not all egrep commands
65 * are capable of coping with. We use the GNU library, tho :)
68 tSCC z[=hackname _cap=]Select[=_eval _index=][] =
75 * content selection pattern - do fix if pattern found
78 tSCC z[=hackname _cap=]Select[=_eval _index=][] =
86 * content bypass pattern - skip fix if pattern found
89 tSCC z[=hackname _cap=]Bypass[=_eval _index=][] =
97 * perform the 'test' shell command - do fix on success
100 tSCC z[=hackname _cap=]Test[=_eval _index=][] =
108 * perform the C function call test
111 tSCC z[=hackname _cap=]FTst[=_eval _index=][] = "[=c_test=]";[=
116 # Build the array of test descriptions for this fix: =][=
125 #define [=hackname _up =]_TEST_CT [=
126 _IF exesel _exist =][=
137 #define [=hackname _up =]_RE_CT [=
138 _IF exesel _exist =][=
139 _eval exesel _count bypass _count
140 "#2$ct=`expr %d + %d` ; re_ct=`expr $ct + $re_ct` ; echo $ct"
143 _eval select _count bypass _count
144 "#2$ct=`expr %d + %d` ; re_ct=`expr $ct + $re_ct` ; echo $ct"
147 tTestDesc a[=hackname _cap=]Tests[] = {[=
150 { TT_TEST, z[=hackname _cap=]Test[=_eval _index=], 0 /* unused */ },[=
154 { TT_FUNCTION, z[=hackname _cap=]FTst[=_eval _index=], 0 /* unused */ },[=
158 { TT_NEGREP, z[=hackname _cap=]Bypass[=_eval _index=], (regex_t*)NULL },[=
161 # IF there is an exesel, then use that (those) selection
162 expressions, instead of the regular select expressions
164 _IF exesel _exist =][=
166 { TT_EGREP, z[=hackname _cap=]Select[=_eval _index=], (regex_t*)NULL },[=
171 { TT_EGREP, z[=hackname _cap=]Select[=_eval _index=], (regex_t*)NULL },[=
175 #define [=hackname _up=]_TEST_CT 0
176 #define [=hackname _up=]_RE_CT 0
177 #define a[=hackname _cap=]Tests (tTestDesc*)NULL[=
181 * Fix Command Arguments for [=hackname _cap=]
183 const char* apz[=hackname _cap=]Patch[] = {[=
184 _IF sed _exist =] "sed"[=
186 "-e", [=sed _krstr=][=
189 _ELIF shell _exist =] "sh", "-c",
192 _ELIF c_fix _exist =]"[=c_fix=]",[=
194 _ELIF replace _len =]
195 [=replace _krstr=],[=
200 /* * * * * * * * * * * * * * * * * * * * * * * * * *[=
206 echo "#define REGEX_COUNT $re_ct"
207 echo "#define MACH_LIST_SIZE_LIMIT `expr $max_mach + 128`" ' _shell =][=
209 # as of this writing, 49 bytes are needed by the case statement format.
210 We also must allow for the size of the target machine machine name.
211 This allows for a 79 byte machine name. Better be enough.
213 #define FIX_COUNT [=_eval fix _count =]
215 tFixDesc fixDescList[ FIX_COUNT ] = {[=
219 { z[=hackname _cap=]Name, z[=hackname _cap=]List,
220 apz[=hackname _cap=]Machs, (regex_t*)NULL,
221 [=hackname _up=]_TEST_CT, [=
222 _IF not_machine _exist =]FD_MACH_IFNOT[=
223 _ELSE =]FD_MACH_ONLY[=
225 _IF shell _exist =] | FD_SHELL_SCRIPT[=
226 _ELIF c_fix _exist =] | FD_SUBROUTINE[=
227 _ELIF replace _exist =] | FD_REPLACEMENT[=
229 a[=hackname _cap=]Tests, apz[=hackname _cap=]Patch }[=