inclhack.def: Fixes to play nicer with FreeBSD, and corrections to comments.
2000-01-25 Zack Weinberg <zack@wolery.cumb.org> * inclhack.def: Fixes to play nicer with FreeBSD, and corrections to comments. (cxx_unready): Add select expression. (irix_sockaddr): Add bypass expression. (machine_ansi_h_va_list): New fix. (stdio_va_list): No need to edit _BSD_VA_LIST_. Split out addition of "#include <stdarg.h>" to... (stdio_stdarg_h): ... here. (systypes_for_aix): Rename to systypes_stdlib_size_t. Apply to stdlib.h also. Do not munge _BSD_SIZE_T_. (sysz_stdlib_for_sun): Delete duplicate fix for unprotected size_t. (ultrix_ifdef): Tighten up select expression. * fixincl.tpl: Exorcise 'exesel'. Rewrite calculations of re_ct and max_mach to avoid use of shell. Make printed names match names in inclhack.def. Use static copyright date. Don't count c_test and test expressions as requiring regex_t slots. Add some commentary. * inclhack.tpl: Do not include the 'This script contains N fixup scripts' line if PROGRAM is defined. Use static copyright date. From-SVN: r31604
This commit is contained in:
parent
534170eb29
commit
3be1fb7253
@ -1,3 +1,28 @@
|
||||
2000-01-25 Zack Weinberg <zack@wolery.cumb.org>
|
||||
|
||||
* inclhack.def: Fixes to play nicer with FreeBSD, and
|
||||
corrections to comments.
|
||||
(cxx_unready): Add select expression.
|
||||
(irix_sockaddr): Add bypass expression.
|
||||
(machine_ansi_h_va_list): New fix.
|
||||
(stdio_va_list): No need to edit _BSD_VA_LIST_.
|
||||
Split out addition of "#include <stdarg.h>" to...
|
||||
(stdio_stdarg_h): ... here.
|
||||
(systypes_for_aix): Rename to systypes_stdlib_size_t. Apply
|
||||
to stdlib.h also. Do not munge _BSD_SIZE_T_.
|
||||
(sysz_stdlib_for_sun): Delete duplicate fix for unprotected
|
||||
size_t.
|
||||
(ultrix_ifdef): Tighten up select expression.
|
||||
|
||||
* fixincl.tpl: Exorcise 'exesel'. Rewrite calculations of
|
||||
re_ct and max_mach to avoid use of shell. Make printed names
|
||||
match names in inclhack.def. Use static copyright date.
|
||||
Don't count c_test and test expressions as requiring regex_t
|
||||
slots. Add some commentary.
|
||||
* inclhack.tpl: Do not include the 'This script contains N
|
||||
fixup scripts' line if PROGRAM is defined. Use static
|
||||
copyright date.
|
||||
|
||||
2000-01-24 Jason Merrill <jason@casey.cygnus.com>
|
||||
|
||||
* dwarf2out.c: include "varray.h", not dyn-string.h.
|
||||
|
@ -6,11 +6,10 @@
|
||||
# files which are fixed to work correctly with ANSI C and placed in a
|
||||
# directory that GNU C will search.
|
||||
#
|
||||
# This script contains 113 fixup scripts.
|
||||
#
|
||||
# See README-fixinc for more information.
|
||||
#
|
||||
# fixincludes copyright (c) 2000 The Free Software Foundation, Inc.
|
||||
# fixincludes copyright (c) 1998, 1999, 2000
|
||||
# The Free Software Foundation, Inc.
|
||||
#
|
||||
# fixincludes is free software.
|
||||
#
|
||||
|
@ -11,19 +11,27 @@ x =]
|
||||
*
|
||||
* See README-fixinc for more information.
|
||||
*
|
||||
* inclhack copyright (c) [=_eval "date +%Y" _shell
|
||||
=] The Free Software Foundation, Inc.
|
||||
* inclhack copyright (c) 1998, 1999, 2000
|
||||
* The Free Software Foundation, Inc.
|
||||
*
|
||||
[=_eval inclhack "# * " _gpl=]
|
||||
*[=_EVAL "re_ct=0\nmax_mach=0" _shell=][=
|
||||
*/
|
||||
[= _SETENV re_ct 0 =][= _SETENV max_mach 0 =][=
|
||||
|
||||
_FOR fix =]
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of [=hackname _Cap=] fix
|
||||
*/
|
||||
* Description of [=hackname _cap=] fix
|
||||
*/[=
|
||||
|
||||
# Note that this is not just for debugging purposes, but in case
|
||||
some C fix wishes to refer to the regexps it is paired with.
|
||||
See commentary at the top of fixfixes.c.
|
||||
=]
|
||||
#define [=hackname _up #_FIXIDX + #%-32s _printf=] [=_eval _index=]
|
||||
tSCC z[=hackname _cap=]Name[] =
|
||||
[=hackname _cap _krstr=];
|
||||
[=hackname _krstr=];
|
||||
|
||||
/*
|
||||
* File name selection pattern
|
||||
*/[=
|
||||
@ -41,35 +49,21 @@ tSCC z[=hackname _cap=]List[] =
|
||||
|
||||
_IF mach _exist=]
|
||||
tSCC* apz[=hackname _cap=]Machs[] = {[=
|
||||
_EVAL "this_mach=0" _shell =][=
|
||||
_SETENV this_mach 0 =][=
|
||||
|
||||
_FOR mach =]
|
||||
[=mach _krstr=],[=
|
||||
_EVAL mach _len "this_mach=`expr $this_mach + %d + 5`"
|
||||
_printf _shell =][=
|
||||
/mach=]
|
||||
_SETENV this_mach mach _len this_mach _env _val 5 + +
|
||||
=][= /mach=]
|
||||
(const char*)NULL };[=
|
||||
|
||||
_EVAL "if [ $this_mach -gt $max_mach ] ; then max_mach=$this_mach ; fi"
|
||||
_shell =][=
|
||||
_SETENV max_mach _mark this_mach _env _val max_mach _env _val _max =][=
|
||||
|
||||
_ELSE =]
|
||||
#define apz[=hackname _cap=]Machs (const char**)NULL[=
|
||||
_ENDIF "files _exist" =][=
|
||||
|
||||
_IF exesel _exist=]
|
||||
|
||||
/*
|
||||
* content selection pattern - do fix if pattern found
|
||||
* This is a special pattern that not all egrep commands
|
||||
* are capable of coping with. We use the GNU library, tho :)
|
||||
*/[=
|
||||
_FOR exesel =]
|
||||
tSCC z[=hackname _cap=]Select[=_eval _index=][] =
|
||||
[=exesel _krstr=];[=
|
||||
/exesel =][=
|
||||
|
||||
_ELIF select _exist=]
|
||||
_IF select _exist=]
|
||||
|
||||
/*
|
||||
* content selection pattern - do fix if pattern found
|
||||
@ -115,29 +109,21 @@ tSCC z[=hackname _cap=]FTst[=_eval _index=][] = "[=c_test=]";[=
|
||||
|
||||
# Build the array of test descriptions for this fix: =][=
|
||||
|
||||
_IF exesel _exist
|
||||
select _exist |
|
||||
_IF select _exist
|
||||
bypass _exist |
|
||||
test _exist |
|
||||
c_test _exist |
|
||||
=]
|
||||
|
||||
#define [=hackname _up =]_TEST_CT [=
|
||||
_IF exesel _exist =][=
|
||||
_eval exesel _count
|
||||
bypass _count +
|
||||
test _count +
|
||||
c_test _count +
|
||||
"ct=%d ; re_ct=`expr $ct + $re_ct` ; echo $ct"
|
||||
_printf _shell =][=
|
||||
_ELSE =][=
|
||||
_eval select _count
|
||||
bypass _count +
|
||||
test _count +
|
||||
c_test _count +
|
||||
"ct=%d ; re_ct=`expr $ct + $re_ct` ; echo $ct"
|
||||
_printf _shell =][=
|
||||
_ENDIF =]
|
||||
c_test _count + =][=
|
||||
_SETENV re_ct
|
||||
re_ct _env _val
|
||||
select _count +
|
||||
bypass _count + =]
|
||||
tTestDesc a[=hackname _cap=]Tests[] = {[=
|
||||
|
||||
_FOR test =]
|
||||
@ -152,19 +138,9 @@ tTestDesc a[=hackname _cap=]Tests[] = {[=
|
||||
{ TT_NEGREP, z[=hackname _cap=]Bypass[=_eval _index=], (regex_t*)NULL },[=
|
||||
/bypass =][=
|
||||
|
||||
# IF there is an exesel, then use that (those) selection
|
||||
expressions, instead of the regular select expressions
|
||||
=][=
|
||||
_IF exesel _exist =][=
|
||||
_FOR exesel =]
|
||||
{ TT_EGREP, z[=hackname _cap=]Select[=_eval _index=], (regex_t*)NULL },[=
|
||||
/exesel =][=
|
||||
|
||||
_ELSE =][=
|
||||
_FOR select =]
|
||||
{ TT_EGREP, z[=hackname _cap=]Select[=_eval _index=], (regex_t*)NULL },[=
|
||||
/select =][=
|
||||
_ENDIF =] };[=
|
||||
/select =] };[=
|
||||
_ELSE =]
|
||||
#define [=hackname _up=]_TEST_CT 0
|
||||
#define a[=hackname _cap=]Tests (tTestDesc*)NULL[=
|
||||
@ -189,21 +165,19 @@ const char* apz[=hackname _cap=]Patch[] = {[=
|
||||
|
||||
_ENDIF=]
|
||||
(char*)NULL };
|
||||
[=/fix=]
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *[=
|
||||
/fix=]
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* List of all fixes
|
||||
*/
|
||||
[=_EVAL '
|
||||
echo "#define REGEX_COUNT $re_ct"
|
||||
echo "#define MACH_LIST_SIZE_LIMIT `expr $max_mach + 128`" ' _shell =][=
|
||||
|
||||
*/[=
|
||||
# as of this writing, 49 bytes are needed by the case statement format.
|
||||
We also must allow for the size of the target machine machine name.
|
||||
This allows for a 79 byte machine name. Better be enough.
|
||||
=]
|
||||
#define FIX_COUNT [=_eval fix _count =]
|
||||
#define REGEX_COUNT [= _eval re_ct _env =]
|
||||
#define MACH_LIST_SIZE_LIMIT [= _eval max_mach _env _val 128 + =]
|
||||
#define FIX_COUNT [= _eval fix _count =]
|
||||
|
||||
tFixDesc fixDescList[ FIX_COUNT ] = {[=
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -861,7 +861,9 @@ fix = {
|
||||
hackname = cxx_unready;
|
||||
files = sys/mman.h;
|
||||
files = rpc/types.h;
|
||||
bypass = '"C"|__BEGIN_DECLS';
|
||||
select = '[^#]+malloc.*;'; /* Should catch any form of a declaration
|
||||
but not mention within a macro. */
|
||||
bypass = '"C"|__BEGIN_DECLS';
|
||||
|
||||
sed = "1i\\\n"
|
||||
"#ifdef __cplusplus\\\n"
|
||||
@ -1012,8 +1014,7 @@ fix = {
|
||||
|
||||
|
||||
/*
|
||||
* IRIX 4.0.5 <rpc/auth.h> uses struct sockaddr
|
||||
* in prototype without previous definition.
|
||||
* Some IRIX header files contain the string "//"
|
||||
*/
|
||||
fix = {
|
||||
hackname = irix_multiline_cmnt;
|
||||
@ -1025,12 +1026,14 @@ fix = {
|
||||
|
||||
|
||||
/*
|
||||
* Some IRIX header files contain the string "//"
|
||||
* IRIX 4.0.5 <rpc/auth.h> uses struct sockaddr
|
||||
* in prototype without previous definition.
|
||||
*/
|
||||
fix = {
|
||||
hackname = irix_sockaddr;
|
||||
files = rpc/auth.h;
|
||||
select = "authdes_create.*struct sockaddr";
|
||||
bypass = "<sys/socket\.h>";
|
||||
sed = "/authdes_create.*struct sockaddr/i\\\n"
|
||||
"struct sockaddr;\n";
|
||||
};
|
||||
@ -1251,6 +1254,19 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fix BSD machine/ansi.h to use __builtin_va_list to define _BSD_VA_LIST_.
|
||||
*/
|
||||
fix = {
|
||||
hackname = machine_ansi_h_va_list;
|
||||
files = machine/ansi.h;
|
||||
select = '_BSD_VA_LIST_';
|
||||
bypass = '__builtin_va_list';
|
||||
|
||||
sed = "s/\\(_BSD_VA_LIST_[ \t][ \t]*\\).*$/\\1__builtin_va_list/";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fix non-ansi machine name defines
|
||||
*/
|
||||
@ -1641,6 +1657,7 @@ fix = {
|
||||
};
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* a missing semi-colon at the end of the statsswtch structure definition.
|
||||
*/
|
||||
@ -1652,42 +1669,52 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Arrange for stdio.h to use stdarg.h to define __gnuc_va_list.
|
||||
* On 4BSD-derived systems, stdio.h defers to machine/ansi.h; that's
|
||||
* OK too.
|
||||
*/
|
||||
fix = {
|
||||
hackname = stdio_stdarg_h;
|
||||
files = stdio.h;
|
||||
bypass = "include.*(stdarg\.h|machine/ansi\.h)";
|
||||
|
||||
sed = '1i\\
|
||||
\#define __need___va_list\\
|
||||
\#include <stdarg.h>
|
||||
';
|
||||
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Don't use or define the name va_list in stdio.h.
|
||||
* This is for ANSI and also to interoperate properly with gcc's varargs.h.
|
||||
* Arrange for stdio.h to use stdarg.h to define __gnuc_va_list
|
||||
* Note _BSD_VA_LIST_ is dealt with elsewhere.
|
||||
*/
|
||||
fix = {
|
||||
hackname = stdio_va_list;
|
||||
files = stdio.h;
|
||||
bypass = "__gnuc_va_list";
|
||||
bypass = '__gnuc_va_list|_BSD_VA_LIST_';
|
||||
|
||||
/*
|
||||
* Use __gnuc_va_list in arg types in place of va_list.
|
||||
* On 386BSD use __gnuc_va_list instead of _VA_LIST_. We're hoping the
|
||||
* trailing parentheses and semicolon save all other systems from this.
|
||||
* Define __not_va_list__ (something harmless and unused) instead of va_list.
|
||||
* Define __not_va_list__ (something harmless and unused)
|
||||
* instead of va_list.
|
||||
* Don't claim to have defined va_list.
|
||||
*/
|
||||
shell =
|
||||
"if ( egrep \"__need___va_list\" $file ) > /dev/null 2>&1 ; then
|
||||
:
|
||||
else
|
||||
echo \"#define __need___va_list\"
|
||||
echo \"#include <stdarg.h>\"
|
||||
fi
|
||||
|
||||
sed -e 's@ va_list @ __gnuc_va_list @' \\
|
||||
-e 's@ va_list)@ __gnuc_va_list)@' \\
|
||||
-e 's@ _BSD_VA_LIST_))@ __gnuc_va_list))@' \\
|
||||
-e 's@ _VA_LIST_));@ __gnuc_va_list));@' \\
|
||||
-e 's@ va_list@ __not_va_list__@' \\
|
||||
-e 's@\\*va_list@*__not_va_list__@' \\
|
||||
-e 's@ __va_list)@ __gnuc_va_list)@' \\
|
||||
-e 's@GNUC_VA_LIST@GNUC_Va_LIST@' \\
|
||||
-e 's@_NEED___VA_LIST@_NEED___Va_LIST@' \\
|
||||
-e 's@VA_LIST@DUMMY_VA_LIST@' \\
|
||||
-e 's@_Va_LIST@_VA_LIST@'";
|
||||
sed = "s@ va_list @ __gnuc_va_list @\n"
|
||||
"s@ va_list)@ __gnuc_va_list)@\n"
|
||||
"s@ _VA_LIST_));@ __gnuc_va_list));@\n"
|
||||
"s@ va_list@ __not_va_list__@\n"
|
||||
"s@\\*va_list@*__not_va_list__@\n"
|
||||
"s@ __va_list)@ __gnuc_va_list)@\n"
|
||||
"s@GNUC_VA_LIST@GNUC_Va_LIST@\n"
|
||||
"s@_NEED___VA_LIST@_NEED___Va_LIST@\n"
|
||||
"s@VA_LIST@DUMMY_VA_LIST@\n"
|
||||
"s@_Va_LIST@_VA_LIST@";
|
||||
};
|
||||
|
||||
|
||||
@ -2175,14 +2202,8 @@ fix = {
|
||||
};
|
||||
#endif /* SVR5 */
|
||||
|
||||
|
||||
/*
|
||||
* Fix return value of mem{ccpy,chr,cpy,set} and str{len,spn,cspn}
|
||||
* in string.h on sysV68
|
||||
* Correct the return type for strlen in string.h on Lynx.
|
||||
* Correct the argument type for ffs in string.h on Alpha OSF/1 V2.0.
|
||||
* Add missing const for strdup on OSF/1 V3.0.
|
||||
* On sysV88 layout is slightly different.
|
||||
/* Fix these files to use the same types that we think they should.
|
||||
* XXX - extremely dubious changes here.
|
||||
*/
|
||||
fix = {
|
||||
hackname = systypes;
|
||||
@ -2235,15 +2256,15 @@ fix = {
|
||||
|
||||
|
||||
/*
|
||||
* Fix this file to avoid interfering with stddef.h,
|
||||
* but don't mistakenly match ssize_t present in AIX for the ps/2,
|
||||
* or typedefs which use (but do not set) size_t.
|
||||
* Fix files that may contain a stray definition of size_t. Take care
|
||||
* not to match ssize_t or mere uses of size_t.
|
||||
*/
|
||||
fix = {
|
||||
hackname = systypes_for_aix;
|
||||
hackname = systypes_stdlib_size_t;
|
||||
files = sys/types.h;
|
||||
files = stdlib.h;
|
||||
select = "typedef[ \t][ \t]*[A-Za-z_][ \tA-Za-z_]*[ \t]size_t";
|
||||
bypass = "_GCC_SIZE_T";
|
||||
bypass = "_(GCC|BSD)_SIZE_T";
|
||||
|
||||
sed = "/typedef[ \t][ \t]*[A-Za-z_][ \tA-Za-z_]*[ \t]size_t/i\\\n"
|
||||
"#ifndef _GCC_SIZE_T\\\n"
|
||||
@ -2255,9 +2276,12 @@ fix = {
|
||||
|
||||
|
||||
/*
|
||||
* Fix return type of exit and abort in <stdlib.h> on SunOS 4.1.
|
||||
* Also wrap protection around size_t for m88k-sysv3 systems.
|
||||
* We use a funny name to ensure it follows 'systypes' fix.
|
||||
* Fix return value of mem{ccpy,chr,cpy,set} and str{len,spn,cspn}
|
||||
* in string.h on sysV68
|
||||
* Correct the return type for strlen in string.h on Lynx.
|
||||
* Correct the argument type for ffs in string.h on Alpha OSF/1 V2.0.
|
||||
* Add missing const for strdup on OSF/1 V3.0.
|
||||
* On sysV88 layout is slightly different.
|
||||
*/
|
||||
fix = {
|
||||
hackname = sysv68_string;
|
||||
@ -2278,7 +2302,6 @@ fix = {
|
||||
|
||||
/*
|
||||
* Fix return type of exit and abort in <stdlib.h>
|
||||
* Also wrap protection around size_t.
|
||||
*/
|
||||
fix = {
|
||||
hackname = sysz_stdlib_for_sun;
|
||||
@ -2291,13 +2314,6 @@ fix = {
|
||||
sed = "s/char[ \t]*\\*[ \t]*realloc/void \\*\trealloc/g";
|
||||
sed = "s/char[ \t]*\\*[ \t]*bsearch/void \\*\tbsearch/g";
|
||||
sed = "s/int[ \t][ \t]*exit/void\texit/g";
|
||||
|
||||
sed = "/typedef[ \ta-zA-Z_]*[ \t]size_t[ \t]*;/i\\\n"
|
||||
"#ifndef _GCC_SIZE_T\\\n"
|
||||
"#define _GCC_SIZE_T\n";
|
||||
|
||||
sed = "/typedef[ \ta-zA-Z_]*[ \t]size_t[ \t]*;/a\\\n"
|
||||
"#endif\n";
|
||||
};
|
||||
|
||||
|
||||
@ -2395,7 +2411,7 @@ fix = {
|
||||
*/
|
||||
fix = {
|
||||
hackname = ultrix_ifdef;
|
||||
select = "#ifdef KERNEL";
|
||||
select = "#ifdef KERNEL[ \t]*[^ \t]";
|
||||
files = sys/file.h;
|
||||
sed = "s/#ifdef KERNEL/#if defined(KERNEL)/";
|
||||
};
|
||||
|
@ -6,11 +6,12 @@
|
||||
# files which are fixed to work correctly with ANSI C and placed in a
|
||||
# directory that GNU C will search.
|
||||
#
|
||||
# This script contains 113 fixup scripts.
|
||||
# This script contains 115 fixup scripts.
|
||||
#
|
||||
# See README-fixinc for more information.
|
||||
#
|
||||
# fixincludes copyright (c) 2000 The Free Software Foundation, Inc.
|
||||
# fixincludes copyright (c) 1998, 1999, 2000
|
||||
# The Free Software Foundation, Inc.
|
||||
#
|
||||
# fixincludes is free software.
|
||||
#
|
||||
@ -1392,6 +1393,8 @@ extern "C"\
|
||||
#
|
||||
case "${file}" in ./sys/mman.h | \
|
||||
./rpc/types.h )
|
||||
if ( test -n "`egrep '[^#]+malloc.*;' ${file}`"
|
||||
) > /dev/null 2>&1 ; then
|
||||
if ( test -z "`egrep '\"C\"|__BEGIN_DECLS' ${file}`"
|
||||
) > /dev/null 2>&1 ; then
|
||||
fixlist="${fixlist}
|
||||
@ -1415,6 +1418,7 @@ extern "C" {\
|
||||
rm -f ${DESTFILE}
|
||||
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
|
||||
fi # end of bypass 'if'
|
||||
fi # end of select 'if'
|
||||
;; # case end for file name test
|
||||
esac
|
||||
|
||||
@ -1644,6 +1648,8 @@ extern "C" {\
|
||||
case "${file}" in ./rpc/auth.h )
|
||||
if ( test -n "`egrep 'authdes_create.*struct sockaddr' ${file}`"
|
||||
) > /dev/null 2>&1 ; then
|
||||
if ( test -z "`egrep '<sys/socket.h>' ${file}`"
|
||||
) > /dev/null 2>&1 ; then
|
||||
fixlist="${fixlist}
|
||||
irix_sockaddr"
|
||||
if [ ! -r ${DESTFILE} ]
|
||||
@ -1656,6 +1662,7 @@ struct sockaddr;
|
||||
< $infile > ${DESTDIR}/fixinc.tmp
|
||||
rm -f ${DESTFILE}
|
||||
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
|
||||
fi # end of bypass 'if'
|
||||
fi # end of select 'if'
|
||||
;; # case end for file name test
|
||||
esac
|
||||
@ -1999,6 +2006,30 @@ static __inline__ double fake_hypot (x, y)\
|
||||
esac
|
||||
|
||||
|
||||
#
|
||||
# Fix Machine_Ansi_H_Va_List
|
||||
#
|
||||
case "${file}" in ./machine/ansi.h )
|
||||
if ( test -n "`egrep '_BSD_VA_LIST_' ${file}`"
|
||||
) > /dev/null 2>&1 ; then
|
||||
if ( test -z "`egrep '__builtin_va_list' ${file}`"
|
||||
) > /dev/null 2>&1 ; then
|
||||
fixlist="${fixlist}
|
||||
machine_ansi_h_va_list"
|
||||
if [ ! -r ${DESTFILE} ]
|
||||
then infile=${file}
|
||||
else infile=${DESTFILE} ; fi
|
||||
|
||||
sed -e 's/\(_BSD_VA_LIST_[ ][ ]*\).*$/\1__builtin_va_list/' \
|
||||
< $infile > ${DESTDIR}/fixinc.tmp
|
||||
rm -f ${DESTFILE}
|
||||
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
|
||||
fi # end of bypass 'if'
|
||||
fi # end of select 'if'
|
||||
;; # case end for file name test
|
||||
esac
|
||||
|
||||
|
||||
#
|
||||
# Fix Machine_Name
|
||||
#
|
||||
@ -2468,41 +2499,53 @@ typedef __regmatch_t regmatch_t;
|
||||
esac
|
||||
|
||||
|
||||
#
|
||||
# Fix Stdio_Stdarg_H
|
||||
#
|
||||
case "${file}" in ./stdio.h )
|
||||
if ( test -z "`egrep 'include.*(stdarg.h|machine/ansi.h)' ${file}`"
|
||||
) > /dev/null 2>&1 ; then
|
||||
fixlist="${fixlist}
|
||||
stdio_stdarg_h"
|
||||
if [ ! -r ${DESTFILE} ]
|
||||
then infile=${file}
|
||||
else infile=${DESTFILE} ; fi
|
||||
|
||||
sed -e '1i\
|
||||
#define __need___va_list\
|
||||
#include <stdarg.h>
|
||||
' \
|
||||
< $infile > ${DESTDIR}/fixinc.tmp
|
||||
rm -f ${DESTFILE}
|
||||
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
|
||||
fi # end of bypass 'if'
|
||||
;; # case end for file name test
|
||||
esac
|
||||
|
||||
|
||||
#
|
||||
# Fix Stdio_Va_List
|
||||
#
|
||||
case "${file}" in ./stdio.h )
|
||||
if ( test -z "`egrep '__gnuc_va_list' ${file}`"
|
||||
if ( test -z "`egrep '__gnuc_va_list|_BSD_VA_LIST_' ${file}`"
|
||||
) > /dev/null 2>&1 ; then
|
||||
fixlist="${fixlist}
|
||||
stdio_va_list"
|
||||
if [ ! -r ${DESTFILE} ]
|
||||
then infile=${file}
|
||||
else infile=${DESTFILE} ; fi
|
||||
( if ( egrep "__need___va_list" $file ) > /dev/null 2>&1 ; then
|
||||
:
|
||||
else
|
||||
echo "#define __need___va_list"
|
||||
echo "#include <stdarg.h>"
|
||||
fi
|
||||
|
||||
sed -e 's@ va_list @ __gnuc_va_list @' \
|
||||
-e 's@ va_list)@ __gnuc_va_list)@' \
|
||||
-e 's@ _BSD_VA_LIST_))@ __gnuc_va_list))@' \
|
||||
-e 's@ _VA_LIST_));@ __gnuc_va_list));@' \
|
||||
-e 's@ va_list@ __not_va_list__@' \
|
||||
-e 's@\*va_list@*__not_va_list__@' \
|
||||
-e 's@ __va_list)@ __gnuc_va_list)@' \
|
||||
-e 's@GNUC_VA_LIST@GNUC_Va_LIST@' \
|
||||
-e 's@_NEED___VA_LIST@_NEED___Va_LIST@' \
|
||||
-e 's@VA_LIST@DUMMY_VA_LIST@' \
|
||||
-e 's@_Va_LIST@_VA_LIST@' ) < $infile > ${DESTDIR}/fixinc.tmp
|
||||
|
||||
# Shell scripts have the potential of removing the output
|
||||
# We interpret that to mean the file is not to be altered
|
||||
#
|
||||
if test ! -f ${DESTDIR}/fixinc.tmp
|
||||
then continue ; fi
|
||||
sed -e 's@ va_list @ __gnuc_va_list @
|
||||
s@ va_list)@ __gnuc_va_list)@
|
||||
s@ _VA_LIST_));@ __gnuc_va_list));@
|
||||
s@ va_list@ __not_va_list__@
|
||||
s@\*va_list@*__not_va_list__@
|
||||
s@ __va_list)@ __gnuc_va_list)@
|
||||
s@GNUC_VA_LIST@GNUC_Va_LIST@
|
||||
s@_NEED___VA_LIST@_NEED___Va_LIST@
|
||||
s@VA_LIST@DUMMY_VA_LIST@
|
||||
s@_Va_LIST@_VA_LIST@' \
|
||||
< $infile > ${DESTDIR}/fixinc.tmp
|
||||
rm -f ${DESTFILE}
|
||||
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
|
||||
fi # end of bypass 'if'
|
||||
@ -2781,15 +2824,16 @@ typedef __SIZE_TYPE__ size_t;\
|
||||
|
||||
|
||||
#
|
||||
# Fix Systypes_For_Aix
|
||||
# Fix Systypes_Stdlib_Size_T
|
||||
#
|
||||
case "${file}" in ./sys/types.h )
|
||||
case "${file}" in ./sys/types.h | \
|
||||
./stdlib.h )
|
||||
if ( test -n "`egrep 'typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t' ${file}`"
|
||||
) > /dev/null 2>&1 ; then
|
||||
if ( test -z "`egrep '_GCC_SIZE_T' ${file}`"
|
||||
if ( test -z "`egrep '_(GCC|BSD)_SIZE_T' ${file}`"
|
||||
) > /dev/null 2>&1 ; then
|
||||
fixlist="${fixlist}
|
||||
systypes_for_aix"
|
||||
systypes_stdlib_size_t"
|
||||
if [ ! -r ${DESTFILE} ]
|
||||
then infile=${file}
|
||||
else infile=${DESTFILE} ; fi
|
||||
@ -2855,13 +2899,6 @@ extern unsigned int\
|
||||
-e 's/char[ ]*\*[ ]*realloc/void \* realloc/g' \
|
||||
-e 's/char[ ]*\*[ ]*bsearch/void \* bsearch/g' \
|
||||
-e 's/int[ ][ ]*exit/void exit/g' \
|
||||
-e '/typedef[ a-zA-Z_]*[ ]size_t[ ]*;/i\
|
||||
#ifndef _GCC_SIZE_T\
|
||||
#define _GCC_SIZE_T
|
||||
' \
|
||||
-e '/typedef[ a-zA-Z_]*[ ]size_t[ ]*;/a\
|
||||
#endif
|
||||
' \
|
||||
< $infile > ${DESTDIR}/fixinc.tmp
|
||||
rm -f ${DESTFILE}
|
||||
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
|
||||
@ -3002,7 +3039,7 @@ struct utsname;
|
||||
# Fix Ultrix_Ifdef
|
||||
#
|
||||
case "${file}" in ./sys/file.h )
|
||||
if ( test -n "`egrep '#ifdef KERNEL' ${file}`"
|
||||
if ( test -n "`egrep '#ifdef KERNEL[ ]*[^ ]' ${file}`"
|
||||
) > /dev/null 2>&1 ; then
|
||||
fixlist="${fixlist}
|
||||
ultrix_ifdef"
|
||||
|
@ -10,13 +10,15 @@ sh
|
||||
# Install modified versions of certain ANSI-incompatible system header
|
||||
# files which are fixed to work correctly with ANSI C and placed in a
|
||||
# directory that GNU C will search.
|
||||
#
|
||||
#[=
|
||||
_IF PROGRAM _env ! =]
|
||||
# This script contains [=_eval fix _count =] fixup scripts.
|
||||
#
|
||||
#[=
|
||||
_ENDIF =]
|
||||
# See README-fixinc for more information.
|
||||
#
|
||||
# fixincludes copyright (c) [=_eval "date +%Y" _shell
|
||||
=] The Free Software Foundation, Inc.
|
||||
# fixincludes copyright (c) 1998, 1999, 2000
|
||||
# The Free Software Foundation, Inc.
|
||||
#
|
||||
[=_eval fixincludes "## " _gpl=]
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user