aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixinc/inclhack.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/fixinc/inclhack.sh')
-rwxr-xr-xgcc/fixinc/inclhack.sh256
1 files changed, 124 insertions, 132 deletions
diff --git a/gcc/fixinc/inclhack.sh b/gcc/fixinc/inclhack.sh
index d9ea8f90d0a..f6fab88798b 100755
--- a/gcc/fixinc/inclhack.sh
+++ b/gcc/fixinc/inclhack.sh
@@ -6,7 +6,7 @@
# files which are fixed to work correctly with ANSI C and placed in a
# directory that GNU C will search.
#
-# This script contains 104 fixup scripts.
+# This script contains 103 fixup scripts.
#
# See README-fixinc for more information.
#
@@ -563,6 +563,18 @@ struct rusage;
-e '/^[ ]*typedef[ ][ ]*unsigned char[ ][ ]*bool[ ]*;/a\
#endif
' \
+ -e '/^typedef[ ][ ]*int[ ][ ]*bool[ ]*;/i\
+#ifndef __cplusplus
+' \
+ -e '/^typedef[ ][ ]*int[ ][ ]*bool[ ]*;/a\
+#endif
+' \
+ -e '/^[ ]*typedef[ ][ ]*unsigned int[ ][ ]*bool[ ]*;/i\
+#ifndef __cplusplus
+' \
+ -e '/^[ ]*typedef[ ][ ]*unsigned int[ ][ ]*bool[ ]*;/a\
+#endif
+' \
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
@@ -626,8 +638,6 @@ struct rusage;
./stropts.h | \
./time.h | \
./unistd.h )
- if ( test -n "`egrep '^[ ]*#[ ]*pragma[ ]extern_prefix' ${file}`"
- ) > /dev/null 2>&1 ; then
fixlist="${fixlist}
bad_lval"
if [ ! -r ${DESTFILE} ]
@@ -638,7 +648,6 @@ struct rusage;
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
- fi # end of selection 'if'
;; # case end for file name test
esac
@@ -739,7 +748,7 @@ struct rusage;
# Fix 17: No_Double_Slash
#
if ( test -n "`egrep '(^|[^:])//[^\"*]' ${file}`" -a \
- '(' -z `echo ${file} | egrep '(CC|cxx|\+\+)/' ` ')'
+ '(' -z "`echo ${file} | egrep '(CC|cxx|\+\+)/'`" ')'
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
no_double_slash"
@@ -806,36 +815,12 @@ extern "C"\
#
- # Fix 20: Else_Label
- #
- if ( test -n "`egrep '^[ ]*#[ ]*else[ ]+[!-.0-~]' ${file}`"
- ) > /dev/null 2>&1 ; then
- fixlist="${fixlist}
- else_label"
- if [ ! -r ${DESTFILE} ]
- then infile=${file}
- else infile=${DESTFILE} ; fi
-
- sed -e ':loop
-/\\$/N
-s/\\$/\\+++fixinc_eol+++/
-/\\$/b loop
-s/\\+++fixinc_eol+++/\\/g
-s%^\([ ]*#[ ]*else\)[ ]*/[^*].*%\1%
-s%^\([ ]*#[ ]*else\)[ ]*[^/ ].*%\1%' \
- < $infile > ${DESTDIR}/fixinc.tmp
- rm -f ${DESTFILE}
- mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
- fi # end of selection 'if'
-
-
- #
- # Fix 21: Endif_Label
+ # Fix 20: End_Else_Label
#
- if ( test -n "`egrep '^[ ]*#[ ]*endif[ ]+[!-.0-z{|}~]' ${file}`"
+ if ( test -n "`egrep '^[ ]*#[ ]*(else|endif)[ ]+([!-.0-z\\{\\|\\}\\~]|/[^\\*])' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
- endif_label"
+ end_else_label"
if [ ! -r ${DESTFILE} ]
then infile=${file}
else infile=${DESTFILE} ; fi
@@ -845,9 +830,11 @@ s%^\([ ]*#[ ]*else\)[ ]*[^/ ].*%\1%' \
s/\\$/\\+++fixinc_eol+++/
/\\$/b loop
s/\\+++fixinc_eol+++/\\/g
-s%^\([ ]*#[ ]*endif\)[ ]*/[^*].*%\1%
-s%^\([ ]*#[ ]*endif\)[ ]*\*[^/].*%\1%
-s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' \
+s%^\([ ]*#[ ]*else\)[ ][ ]*/[^*].*%\1%
+s%^\([ ]*#[ ]*else\)[ ][ ]*[^/ ].*%\1%
+s%^\([ ]*#[ ]*endif\)[ ][ ]*/[^*].*%\1%
+s%^\([ ]*#[ ]*endif\)[ ][ ]**[^/].*%\1%
+s%^\([ ]*#[ ]*endif\)[ ][ ]*[^/* ].*%\1%' \
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
@@ -855,7 +842,7 @@ s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' \
#
- # Fix 22: Hp_Inline
+ # Fix 21: Hp_Inline
#
case "${file}" in ./sys/spinlock.h )
if ( test -n "`egrep 'include.*\"\\.\\./machine/' ${file}`"
@@ -877,7 +864,7 @@ s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' \
#
- # Fix 23: Hp_Sysfile
+ # Fix 22: Hp_Sysfile
#
case "${file}" in ./sys/file.h )
if ( test -n "`egrep 'HPUX_SOURCE' ${file}`"
@@ -898,7 +885,7 @@ s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' \
#
- # Fix 24: Cxx_Unready
+ # Fix 23: Cxx_Unready
#
case "${file}" in ./sys/mman.h | \
./rpc/types.h )
@@ -930,7 +917,7 @@ extern "C" {\
#
- # Fix 25: Hpux_Maxint
+ # Fix 24: Hpux_Maxint
#
case "${file}" in ./sys/param.h )
fixlist="${fixlist}
@@ -953,7 +940,7 @@ extern "C" {\
#
- # Fix 26: Hpux_Systime
+ # Fix 25: Hpux_Systime
#
case "${file}" in ./sys/time.h )
if ( test -n "`egrep '^extern struct sigevent;' ${file}`"
@@ -974,7 +961,7 @@ extern "C" {\
#
- # Fix 27: Interactv_Add1
+ # Fix 26: Interactv_Add1
#
case "${file}" in ./stdio.h | \
./math.h | \
@@ -1001,7 +988,7 @@ extern "C" {\
#
- # Fix 28: Interactv_Add2
+ # Fix 27: Interactv_Add2
#
case "${file}" in ./math.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \
@@ -1023,7 +1010,7 @@ extern "C" {\
#
- # Fix 29: Interactv_Add3
+ # Fix 28: Interactv_Add3
#
case "${file}" in ./sys/limits.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \
@@ -1046,7 +1033,7 @@ extern "C" {\
#
- # Fix 30: Io_Def_Quotes
+ # Fix 29: Io_Def_Quotes
#
if ( test -n "`egrep '[ ]*[ ](_|DES)IO[A-Z]*[ ]*\\( *[^,'\\'']' ${file}`"
) > /dev/null 2>&1 ; then
@@ -1056,7 +1043,8 @@ extern "C" {\
then infile=${file}
else infile=${DESTFILE} ; fi
- sed -e 's/\([ ]*[ ](_|DES)IO[A-Z]*[ ]*(\)\([^,'\'']\),/\1'\''\2'\'',/' \
+ sed -e 's/\([ ]*[ ]_IO[A-Z]*[ ]*(\)\([^,'\'']\),/\1'\''\2'\'',/' \
+ -e 's/\([ ]*[ ]DESIO[A-Z]*[ ]*(\)\([^,'\'']\),/\1'\''\2'\'',/' \
-e '/#[ ]*define[ ]*[ ]_IO/s/'\''\([cgxtf]\)'\''/\1/g' \
-e '/#[ ]*define[ ]*[ ]DESIOC/s/'\''\([cdgx]\)'\''/\1/g' \
< $infile > ${DESTDIR}/fixinc.tmp
@@ -1066,9 +1054,9 @@ extern "C" {\
#
- # Fix 31: Ioctl_Fix_Ctrl
+ # Fix 30: Ioctl_Fix_Ctrl
#
- if ( test -n "`egrep 'CTRL[ ]' ${file}`"
+ if ( test -n "`egrep 'CTRL[ ]*\\(' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
ioctl_fix_ctrl"
@@ -1081,6 +1069,7 @@ extern "C" {\
-e '/#[ ]*define[ ]*[ ]CTRL/s/'\''\([cgx]\)'\''/\1/g' \
-e '/#[ ]*define[ ]*[ ]_CTRL/s/'\''\([cgx]\)'\''/\1/g' \
-e '/#[ ]*define[ ]*[ ]BSD43_CTRL/s/'\''\([cgx]\)'\''/\1/g' \
+ -e '/#[ ]*define[ ]*[ ]_*ISCTRL/s/'\''\([cgx]\)'\''/\1/g' \
< $infile > ${DESTDIR}/fixinc.tmp
rm -f ${DESTFILE}
mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE}
@@ -1088,7 +1077,7 @@ extern "C" {\
#
- # Fix 32: Ip_Missing_Semi
+ # Fix 31: Ip_Missing_Semi
#
case "${file}" in ./netinet/ip.h )
fixlist="${fixlist}
@@ -1106,7 +1095,7 @@ extern "C" {\
#
- # Fix 33: Irix_Multiline_Cmnt
+ # Fix 32: Irix_Multiline_Cmnt
#
case "${file}" in ./sys/types.h )
fixlist="${fixlist}
@@ -1125,7 +1114,7 @@ extern "C" {\
#
- # Fix 34: Irix_Sockaddr
+ # Fix 33: Irix_Sockaddr
#
case "${file}" in ./rpc/auth.h )
if ( test -n "`egrep 'authdes_create.*struct sockaddr' ${file}`"
@@ -1148,7 +1137,7 @@ struct sockaddr;
#
- # Fix 35: Irix_Struct__File
+ # Fix 34: Irix_Struct__File
#
case "${file}" in ./rpc/xdr.h )
fixlist="${fixlist}
@@ -1168,7 +1157,7 @@ struct __file_s;
#
- # Fix 36: Isc_Fmod
+ # Fix 35: Isc_Fmod
#
case "${file}" in ./math.h )
if ( test -n "`egrep 'fmod\\(double\\)' ${file}`"
@@ -1189,7 +1178,7 @@ struct __file_s;
#
- # Fix 37: Motorola_Nested
+ # Fix 36: Motorola_Nested
#
case "${file}" in ./limits.h | \
./sys/limits.h )
@@ -1212,7 +1201,7 @@ struct __file_s;
#
- # Fix 38: Isc_Sys_Limits
+ # Fix 37: Isc_Sys_Limits
#
case "${file}" in ./sys/limits.h )
if ( test -n "`egrep 'CHILD_MAX' ${file}`"
@@ -1234,7 +1223,7 @@ struct __file_s;
#
- # Fix 39: Kandr_Concat
+ # Fix 38: Kandr_Concat
#
case "${file}" in ./sparc/asm_linkage.h | \
./sun3/asm_linkage.h | \
@@ -1272,9 +1261,10 @@ struct __file_s;
#
- # Fix 40: Limits_Ifndefs
+ # Fix 39: Limits_Ifndefs
#
- case "${file}" in ./limits.h )
+ case "${file}" in ./limits.h | \
+ ./sys/limits.h )
if ( test -z "`egrep 'ifndef[ ]+FLT_MIN' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
@@ -1329,7 +1319,7 @@ struct __file_s;
#
- # Fix 41: Lynx_Void_Int
+ # Fix 40: Lynx_Void_Int
#
case "${file}" in ./curses.h )
if ( test -n "`egrep '#[ ]*define[ ]+void[ ]+int' ${file}`"
@@ -1350,7 +1340,7 @@ struct __file_s;
#
- # Fix 42: Lynxos_Fcntl_Proto
+ # Fix 41: Lynxos_Fcntl_Proto
#
case "${file}" in ./fcntl.h )
if ( test -n "`egrep 'fcntl.*\\(int, int, int\\)' ${file}`"
@@ -1371,7 +1361,7 @@ struct __file_s;
#
- # Fix 43: M88k_Bad_Hypot_Opt
+ # Fix 42: M88k_Bad_Hypot_Opt
#
case "${file}" in ./math.h )
case "$target_canonical" in m88k-motorola-sysv3* )
@@ -1406,7 +1396,7 @@ static __inline__ double fake_hypot (x, y)\
#
- # Fix 44: M88k_Bad_S_If
+ # Fix 43: M88k_Bad_S_If
#
case "${file}" in ./sys/stat.h )
case "$target_canonical" in m88k-*-sysv3* )
@@ -1431,7 +1421,7 @@ static __inline__ double fake_hypot (x, y)\
#
- # Fix 45: M88k_Multi_Incl
+ # Fix 44: M88k_Multi_Incl
#
case "${file}" in ./time.h )
case "$target_canonical" in m88k-tektronix-sysv3* )
@@ -1464,7 +1454,7 @@ static __inline__ double fake_hypot (x, y)\
#
- # Fix 46: Machine_Name
+ # Fix 45: Machine_Name
#
if ( test -n "`egrep '^#[ ]*(if|elif).*[^a-zA-Z0-9_](_*[MSRrhim]|[Mbimnpstuv])[a-zA-Z0-9_]' ${file}`"
) > /dev/null 2>&1 ; then
@@ -1516,7 +1506,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 47: Math_Exception
+ # Fix 46: Math_Exception
#
case "${file}" in ./math.h )
if ( test -n "`egrep 'struct exception' ${file}`"
@@ -1556,7 +1546,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 48: Math_Gcc_Ifndefs
+ # Fix 47: Math_Gcc_Ifndefs
#
case "${file}" in ./math.h )
fixlist="${fixlist}
@@ -1572,9 +1562,9 @@ s/\\+++fixinc_eol+++/\\/g
) > /dev/null 2>&1
then sed -e '/define[ ]HUGE_VAL[ ]DBL_MAX/s/DBL_MAX/$dbl_max_def/'
else cat ; fi |
- sed -e'/define[ ]HUGE_VAL[ ]/i\
+ sed -e '/define[ ]HUGE_VAL[ ]/i\
#ifndef HUGE_VAL
-' -e'/define[ ]HUGE_VAL[ ]/a\
+' -e '/define[ ]HUGE_VAL[ ]/a\
#endif
' ) < $infile > ${DESTDIR}/fixinc.tmp
@@ -1590,7 +1580,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 49: Nested_Comment
+ # Fix 48: Nested_Comment
#
case "${file}" in ./rpc/rpc.h )
fixlist="${fixlist}
@@ -1608,7 +1598,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 50: News_Os_Recursion
+ # Fix 49: News_Os_Recursion
#
case "${file}" in ./stdlib.h )
if ( test -n "`egrep '#include <stdlib.h>' ${file}`"
@@ -1634,7 +1624,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 51: Next_Math_Prefix
+ # Fix 50: Next_Math_Prefix
#
case "${file}" in ./ansi/math.h )
if ( test -n "`egrep '^extern.*double.*__const__.*' ${file}`"
@@ -1659,7 +1649,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 52: Next_Template
+ # Fix 51: Next_Template
#
case "${file}" in ./bsd/libc.h )
if ( test -n "`egrep 'template' ${file}`"
@@ -1681,7 +1671,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 53: Next_Volitile
+ # Fix 52: Next_Volitile
#
case "${file}" in ./ansi/stdlib.h )
if ( test -n "`egrep 'volatile' ${file}`"
@@ -1703,7 +1693,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 54: Next_Wait_Union
+ # Fix 53: Next_Wait_Union
#
case "${file}" in ./sys/wait.h )
if ( test -n "`egrep 'wait\\(union wait' ${file}`"
@@ -1724,7 +1714,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 55: Nodeent_Syntax
+ # Fix 54: Nodeent_Syntax
#
case "${file}" in ./netdnet/dnetdb.h )
fixlist="${fixlist}
@@ -1742,7 +1732,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 56: Osf_Namespace_A
+ # Fix 55: Osf_Namespace_A
#
case "${file}" in ./reg_types.h | \
./sys/lc_core.h )
@@ -1769,7 +1759,7 @@ s/\\+++fixinc_eol+++/\\/g
#
- # Fix 57: Osf_Namespace_B
+ # Fix 56: Osf_Namespace_B
#
case "${file}" in ./regex.h )
if ( test '(' -r reg_types.h ')' -a \
@@ -1797,7 +1787,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 58: Pthread_Page_Size
+ # Fix 57: Pthread_Page_Size
#
case "${file}" in ./pthread.h )
if ( test -n "`egrep '^int __page_size' ${file}`"
@@ -1818,7 +1808,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 59: Rs6000_Double
+ # Fix 58: Rs6000_Double
#
case "${file}" in ./math.h )
if ( test -n "`egrep '[^a-zA-Z_]class\\(' ${file}`"
@@ -1844,7 +1834,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 60: Rs6000_Fchmod
+ # Fix 59: Rs6000_Fchmod
#
case "${file}" in ./sys/stat.h )
if ( test -n "`egrep 'fchmod\\(char' ${file}`"
@@ -1865,7 +1855,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 61: Rs6000_Param
+ # Fix 60: Rs6000_Param
#
case "${file}" in ./stdio.h | \
./unistd.h )
@@ -1884,7 +1874,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 62: Sony_Include
+ # Fix 61: Sony_Include
#
case "${file}" in ./machine/machparam.h )
if ( test -n "`egrep '\"\\.\\./machine/endian.h\"' ${file}`"
@@ -1905,7 +1895,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 63: Statsswtch
+ # Fix 62: Statsswtch
#
case "${file}" in ./rpcsvc/rstat.h )
if ( test -n "`egrep 'boottime$' ${file}`"
@@ -1926,7 +1916,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 64: Stdio_Va_List
+ # Fix 63: Stdio_Va_List
#
case "${file}" in ./stdio.h )
fixlist="${fixlist}
@@ -1965,7 +1955,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 65: Sun_Bogus_Ifdef
+ # Fix 64: Sun_Bogus_Ifdef
#
case "${file}" in ./hsfs/hsfs_spec.h | \
./hsfs/iso_spec.h )
@@ -1987,7 +1977,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 66: Sun_Bogus_Ifdef_Sun4c
+ # Fix 65: Sun_Bogus_Ifdef_Sun4c
#
case "${file}" in ./hsfs/hsnode.h )
if ( test -n "`egrep '#ifdef __i386__ || __sun4c__' ${file}`"
@@ -2008,10 +1998,10 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 67: Sun_Catmacro
+ # Fix 66: Sun_Catmacro
#
case "${file}" in ./pixrect/memvar.h )
- if ( test -n "`egrep '^#define[ ]+CAT(a,b)' ${file}`"
+ if ( test -n "`egrep '^#define[ ]+CAT\\(a,b\\)' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
sun_catmacro"
@@ -2036,7 +2026,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 68: Sun_Malloc
+ # Fix 67: Sun_Malloc
#
case "${file}" in ./malloc.h )
fixlist="${fixlist}
@@ -2057,7 +2047,7 @@ typedef __regmatch_t regmatch_t;
#
- # Fix 69: Sun_Memcpy
+ # Fix 68: Sun_Memcpy
#
case "${file}" in ./memory.h )
if ( test -n "`egrep '/\\* @\\(#\\)(head/memory.h 50.1 |memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2 )\\*/' ${file}`"
@@ -2099,7 +2089,7 @@ extern int memcmp();\
#
- # Fix 70: Sun_Rusers_Semi
+ # Fix 69: Sun_Rusers_Semi
#
case "${file}" in ./rpcsvc/rusers.h )
if ( test -n "`egrep '_cnt$' ${file}`"
@@ -2120,7 +2110,7 @@ extern int memcmp();\
#
- # Fix 71: Sun_Signal
+ # Fix 70: Sun_Signal
#
case "${file}" in ./sys/signal.h | \
./signal.h )
@@ -2149,14 +2139,13 @@ void (*signal(...))(...);\
#
- # Fix 72: Sun_Auth_Proto
+ # Fix 71: Sun_Auth_Proto
#
case "${file}" in ./rpc/auth.h | \
./rpc/clnt.h | \
./rpc/svc.h | \
./rpc/xdr.h )
- if ( test -n "`egrep '\\(\\*[a-z][a-z_]*\\)\\(\\)' ${file}`" -a \
- -z "`egrep '\\(\\*[a-z][a-z_]*\\)\\([ ]*[a-zA-Z.].*\\)' ${file}`"
+ if ( test -n "`egrep '\\(\\*[a-z][a-z_]*\\)\\(\\)' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
sun_auth_proto"
@@ -2179,7 +2168,7 @@ void (*signal(...))(...);\
#
- # Fix 73: Sunos_Matherr_Decl
+ # Fix 72: Sunos_Matherr_Decl
#
case "${file}" in ./math.h )
fixlist="${fixlist}
@@ -2200,7 +2189,7 @@ struct exception;
#
- # Fix 74: Sunos_Strlen
+ # Fix 73: Sunos_Strlen
#
case "${file}" in ./strings.h )
fixlist="${fixlist}
@@ -2218,7 +2207,7 @@ struct exception;
#
- # Fix 75: Systypes
+ # Fix 74: Systypes
#
case "${file}" in ./sys/types.h | \
./stdlib.h | \
@@ -2272,7 +2261,7 @@ typedef __SIZE_TYPE__ size_t;\
#
- # Fix 76: Systypes_For_Aix
+ # Fix 75: Systypes_For_Aix
#
case "${file}" in ./sys/types.h )
if ( test -n "`egrep 'typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t' ${file}`" -a \
@@ -2300,7 +2289,7 @@ typedef __SIZE_TYPE__ size_t;\
#
- # Fix 77: Sysv68_String
+ # Fix 76: Sysv68_String
#
case "${file}" in ./string.h )
fixlist="${fixlist}
@@ -2328,7 +2317,7 @@ extern unsigned int\
#
- # Fix 78: Sysz_Stdlib_For_Sun
+ # Fix 77: Sysz_Stdlib_For_Sun
#
case "${file}" in ./stdlib.h )
fixlist="${fixlist}
@@ -2342,6 +2331,7 @@ extern unsigned int\
-e 's/char[ ]*\*[ ]*calloc/void \* calloc/g' \
-e 's/char[ ]*\*[ ]*malloc/void \* malloc/g' \
-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\
@@ -2358,7 +2348,7 @@ extern unsigned int\
#
- # Fix 79: Sysz_Stdtypes_For_Sun
+ # Fix 78: Sysz_Stdtypes_For_Sun
#
case "${file}" in ./sys/stdtypes.h )
fixlist="${fixlist}
@@ -2396,7 +2386,7 @@ extern unsigned int\
#
- # Fix 80: Tinfo_Cplusplus
+ # Fix 79: Tinfo_Cplusplus
#
case "${file}" in ./tinfo.h )
fixlist="${fixlist}
@@ -2414,7 +2404,7 @@ extern unsigned int\
#
- # Fix 81: Ultrix_Ansi_Compat
+ # Fix 80: Ultrix_Ansi_Compat
#
case "${file}" in ./ansi_compat.h )
if ( test -n "`egrep 'ULTRIX' ${file}`"
@@ -2438,7 +2428,7 @@ extern unsigned int\
#
- # Fix 82: Ultrix_Fix_Fixproto
+ # Fix 81: Ultrix_Fix_Fixproto
#
case "${file}" in ./sys/utsname.h )
if ( test -n "`egrep 'ULTRIX' ${file}`"
@@ -2461,7 +2451,7 @@ struct utsname;
#
- # Fix 83: Ultrix_Atof_Param
+ # Fix 82: Ultrix_Atof_Param
#
case "${file}" in ./math.h )
fixlist="${fixlist}
@@ -2483,7 +2473,7 @@ struct utsname;
#
- # Fix 84: Ultrix_Const
+ # Fix 83: Ultrix_Const
#
case "${file}" in ./stdio.h )
fixlist="${fixlist}
@@ -2509,7 +2499,7 @@ struct utsname;
#
- # Fix 85: Ultrix_Ifdef
+ # Fix 84: Ultrix_Ifdef
#
case "${file}" in ./sys/file.h )
if ( test -n "`egrep '#ifdef KERNEL' ${file}`"
@@ -2530,7 +2520,7 @@ struct utsname;
#
- # Fix 86: Ultrix_Nested_Cmnt
+ # Fix 85: Ultrix_Nested_Cmnt
#
case "${file}" in ./rpc/svc.h )
fixlist="${fixlist}
@@ -2548,7 +2538,7 @@ struct utsname;
#
- # Fix 87: Ultrix_Static
+ # Fix 86: Ultrix_Static
#
case "${file}" in ./machine/cpu.h )
if ( test -n "`egrep '#include \"r[34]_cpu' ${file}`"
@@ -2571,7 +2561,7 @@ struct utsname;
#
- # Fix 88: Undefine_Null
+ # Fix 87: Undefine_Null
#
if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' ${file}`" -a \
-z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' ${file}`"
@@ -2592,7 +2582,7 @@ struct utsname;
#
- # Fix 89: Va_I960_Macro
+ # Fix 88: Va_I960_Macro
#
case "${file}" in ./arch/i960/archI960.h )
if ( test -n "`egrep '__(vsiz|vali|vpad|alignof__)' ${file}`"
@@ -2616,7 +2606,7 @@ struct utsname;
#
- # Fix 90: Void_Null
+ # Fix 89: Void_Null
#
case "${file}" in ./curses.h | \
./dbm.h | \
@@ -2647,7 +2637,7 @@ struct utsname;
#
- # Fix 91: Vxworks_Gcc_Problem
+ # Fix 90: Vxworks_Gcc_Problem
#
case "${file}" in ./types/vxTypesBase.h )
if ( test -n "`egrep '__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__' ${file}`"
@@ -2689,7 +2679,7 @@ struct utsname;
#
- # Fix 92: Vxworks_Needs_Vxtypes
+ # Fix 91: Vxworks_Needs_Vxtypes
#
case "${file}" in ./time.h )
if ( test -n "`egrep 'uint_t[ ][ ]*_clocks_per_sec' ${file}`"
@@ -2710,7 +2700,7 @@ struct utsname;
#
- # Fix 93: Vxworks_Needs_Vxworks
+ # Fix 92: Vxworks_Needs_Vxworks
#
case "${file}" in ./sys/stat.h )
if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' ${file}`" -a \
@@ -2736,7 +2726,7 @@ struct utsname;
#
- # Fix 94: Vxworks_Time
+ # Fix 93: Vxworks_Time
#
case "${file}" in ./time.h )
if ( test -n "`egrep 'VOIDFUNCPTR' ${file}`" -a \
@@ -2768,7 +2758,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
#
- # Fix 95: X11_Class
+ # Fix 94: X11_Class
#
case "${file}" in ./X11/ShellP.h )
if ( test -z "`egrep '__cplusplus' ${file}`"
@@ -2796,7 +2786,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
#
- # Fix 96: X11_Class_Usage
+ # Fix 95: X11_Class_Usage
#
case "${file}" in ./Xm/BaseClassI.h )
if ( test -z "`egrep '__cplusplus' ${file}`"
@@ -2817,7 +2807,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
#
- # Fix 97: X11_New
+ # Fix 96: X11_New
#
case "${file}" in ./Xm/Traversal.h )
if ( test -z "`egrep '__cplusplus' ${file}`"
@@ -2846,7 +2836,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
#
- # Fix 98: X11_Sprintf
+ # Fix 97: X11_Sprintf
#
case "${file}" in ./X11*/Xmu.h )
fixlist="${fixlist}
@@ -2866,7 +2856,7 @@ extern char * sprintf();\
#
- # Fix 99: Zzz_Ki_Iface
+ # Fix 98: Zzz_Ki_Iface
#
case "${file}" in ./sys/ki_iface.h )
if ( test -n "`egrep 'These definitions are for HP Internal developers' ${file}`"
@@ -2893,7 +2883,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/fixinc.tmp
#
- # Fix 100: Zzz_Ki
+ # Fix 99: Zzz_Ki
#
case "${file}" in ./sys/ki.h )
if ( test -n "`egrep '11.00 HP-UX LP64' ${file}`"
@@ -2920,7 +2910,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/fixinc.tmp
#
- # Fix 101: Zzz_Ki_Calls
+ # Fix 100: Zzz_Ki_Calls
#
case "${file}" in ./sys/ki_calls.h )
if ( test -n "`egrep 'kthread_create_caller_t' ${file}`"
@@ -2947,7 +2937,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/fixinc.tmp
#
- # Fix 102: Zzz_Ki_Defs
+ # Fix 101: Zzz_Ki_Defs
#
case "${file}" in ./sys/ki_defs.h )
if ( test -n "`egrep 'Kernel Instrumentation Definitions' ${file}`"
@@ -2974,7 +2964,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/fixinc.tmp
#
- # Fix 103: Zzz_Bad_Fixes
+ # Fix 102: Zzz_Bad_Fixes
#
case "${file}" in ./sundev/ipi_error.h )
fixlist="${fixlist}
@@ -2998,7 +2988,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/fixinc.tmp
#
- # Fix 104: Zzz_Time
+ # Fix 103: Zzz_Time
#
case "${file}" in ./sys/time.h )
if ( test -n "`egrep '11.0 and later representation of ki time' ${file}`"
@@ -3091,7 +3081,7 @@ find . -name DONE -exec rm -f '{}' ';'
echo 'Removing unneeded directories:'
cd $LIB
-all_dirs=`find . -type d -print | sort -r`
+all_dirs=`find . -type d \! -name '.' -print | sort -r`
for file in $all_dirs; do
rmdir $LIB/$file > /dev/null 2>&1
done
@@ -3104,8 +3094,10 @@ done
#
# # # # # # # # # # # # # # # # # # # # #
-cd $ORIGDIR
-rm -f include/assert.h
-cp ${srcdir}/assert.h include/assert.h || exit 1
-chmod a+r include/assert.h
-
+if [ x${INSTALL_ASSERT_H} != x ] && [ -f ${srcdir}/assert.h ]
+then
+ cd $ORIGDIR
+ rm -f include/assert.h
+ cp ${srcdir}/assert.h include/assert.h || exit 1
+ chmod a+r include/assert.h
+fi