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 =][=
131 "ct=%d ; re_ct=`expr $ct + $re_ct` ; echo $ct"
138 "ct=%d ; re_ct=`expr $ct + $re_ct` ; echo $ct"
141 tTestDesc a[=hackname _cap=]Tests[] = {[=
144 { TT_TEST, z[=hackname _cap=]Test[=_eval _index=], 0 /* unused */ },[=
148 { TT_FUNCTION, z[=hackname _cap=]FTst[=_eval _index=], 0 /* unused */ },[=
152 { TT_NEGREP, z[=hackname _cap=]Bypass[=_eval _index=], (regex_t*)NULL },[=
155 # IF there is an exesel, then use that (those) selection
156 expressions, instead of the regular select expressions
158 _IF exesel _exist =][=
160 { TT_EGREP, z[=hackname _cap=]Select[=_eval _index=], (regex_t*)NULL },[=
165 { TT_EGREP, z[=hackname _cap=]Select[=_eval _index=], (regex_t*)NULL },[=
169 #define [=hackname _up=]_TEST_CT 0
170 #define a[=hackname _cap=]Tests (tTestDesc*)NULL[=
174 * Fix Command Arguments for [=hackname _cap=]
176 const char* apz[=hackname _cap=]Patch[] = {[=
177 _IF sed _exist =] "sed"[=
179 "-e", [=sed _krstr=][=
182 _ELIF shell _exist =] "sh", "-c",
185 _ELIF c_fix _exist =]"[=c_fix=]",[=
187 _ELIF replace _len =]
188 [=replace _krstr=],[=
193 /* * * * * * * * * * * * * * * * * * * * * * * * * *[=
199 echo "#define REGEX_COUNT $re_ct"
200 echo "#define MACH_LIST_SIZE_LIMIT `expr $max_mach + 128`" ' _shell =][=
202 # as of this writing, 49 bytes are needed by the case statement format.
203 We also must allow for the size of the target machine machine name.
204 This allows for a 79 byte machine name. Better be enough.
206 #define FIX_COUNT [=_eval fix _count =]
208 tFixDesc fixDescList[ FIX_COUNT ] = {[=
212 { z[=hackname _cap=]Name, z[=hackname _cap=]List,
213 apz[=hackname _cap=]Machs, (regex_t*)NULL,
214 [=hackname _up=]_TEST_CT, [=
215 _IF not_machine _exist =]FD_MACH_IFNOT[=
216 _ELSE =]FD_MACH_ONLY[=
218 _IF shell _exist =] | FD_SHELL_SCRIPT[=
219 _ELIF c_fix _exist =] | FD_SUBROUTINE[=
220 _ELIF replace _exist =] | FD_REPLACEMENT[=
222 a[=hackname _cap=]Tests, apz[=hackname _cap=]Patch }[=