#
# DO NOT EDIT THIS FILE (inclhack.sh)
#
-# It has been autogen-ed Friday October 16, 1998 at 07:29:49 AM PDT
+# It has been autogen-ed Wednesday January 27, 1999 at 09:03:36 AM PST
# From the definitions inclhack.def
# and the template file inclhack.tpl
#
# 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 105 fixup scripts.
#
# See README-fixinc for more information.
#
cd ${ORIGDIR}
-cd ${INPUT} || {
- echo 'fixincludes: input dir `'$INPUT"' is an invalid directory"
- exit 1
-}
+cd ${INPUT} || continue
#
# # # # # # # # # # # # # # # # # # # # #
#
- # Fix 84: Ultrix_Atof_Param
+ # Fix 84: Ultrix_Fix_Fixproto
+ #
+ case "$file" in ./sys/utsname.h )
+ if ( test -n "`egrep 'ULTRIX' $file`"
+ ) > /dev/null 2>&1 ; then
+ fixlist="${fixlist}
+ ultrix_fix_fixproto"
+ if [ ! -r ${DESTDIR}/$file ]
+ then infile=$file
+ else infile=${DESTDIR}/$file ; fi
+
+ sed -e '/^[ ]*extern[ ]*int[ ]*uname();$/i\
+struct utsname;
+' \
+ < $infile > ${DESTDIR}/$file.
+
+ mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
+ fi # end of selection 'if'
+ ;; # case end for file name test
+ esac
+
+
+ #
+ # Fix 85: Ultrix_Atof_Param
#
case "$file" in ./math.h )
fixlist="${fixlist}
#
- # Fix 85: Ultrix_Const
+ # Fix 86: Ultrix_Const
#
case "$file" in ./stdio.h )
fixlist="${fixlist}
#
- # Fix 86: Ultrix_Ifdef
+ # Fix 87: Ultrix_Ifdef
#
case "$file" in ./sys/file.h )
if ( test -n "`egrep '#ifdef KERNEL' $file`"
#
- # Fix 87: Ultrix_Nested_Cmnt
+ # Fix 88: Ultrix_Nested_Cmnt
#
case "$file" in ./rpc/svc.h )
fixlist="${fixlist}
#
- # Fix 88: Ultrix_Static
+ # Fix 89: Ultrix_Static
#
case "$file" in ./machine/cpu.h )
if ( test -n "`egrep '#include \"r[34]_cpu' $file`"
#
- # Fix 89: Undefine_Null
+ # Fix 90: Undefine_Null
#
if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' $file`" -a \
-z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' $file`"
#
- # Fix 90: Va_I960_Macro
+ # Fix 91: Va_I960_Macro
#
case "$file" in ./arch/i960/archI960.h )
if ( test -n "`egrep '__(vsiz|vali|vpad|alignof__)' $file`"
#
- # Fix 91: Void_Null
+ # Fix 92: Void_Null
#
case "$file" in ./curses.h | \
./dbm.h | \
#
- # Fix 92: Vxworks_Gcc_Problem
+ # Fix 93: Vxworks_Gcc_Problem
#
case "$file" in ./types/vxTypesBase.h )
if ( test -n "`egrep '__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__' $file`"
#
- # Fix 93: Vxworks_Needs_Vxtypes
+ # Fix 94: Vxworks_Needs_Vxtypes
#
case "$file" in ./time.h )
if ( test -n "`egrep 'uint_t[ ][ ]*_clocks_per_sec' $file`"
#
- # Fix 94: Vxworks_Needs_Vxworks
+ # Fix 95: Vxworks_Needs_Vxworks
#
case "$file" in ./sys/stat.h )
if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' $file`" -a \
#
- # Fix 95: Vxworks_Time
+ # Fix 96: Vxworks_Time
#
case "$file" in ./time.h )
if ( test -n "`egrep 'VOIDFUNCPTR' $file`" -a \
#
- # Fix 96: X11_Class
+ # Fix 97: X11_Class
#
case "$file" in ./X11/ShellP.h )
if ( test -z "`egrep '__cplusplus' $file`"
#
- # Fix 97: X11_Class_Usage
+ # Fix 98: X11_Class_Usage
#
case "$file" in ./Xm/BaseClassI.h )
if ( test -z "`egrep '__cplusplus' $file`"
#
- # Fix 98: X11_New
+ # Fix 99: X11_New
#
case "$file" in ./Xm/Traversal.h )
if ( test -z "`egrep '__cplusplus' $file`"
#
- # Fix 99: X11_Sprintf
+ # Fix 100: X11_Sprintf
#
case "$file" in ./X11*/Xmu.h )
fixlist="${fixlist}
#
- # Fix 100: Zzz_Ki_Iface
+ # Fix 101: Zzz_Ki_Iface
#
case "$file" in ./sys/ki_iface.h )
if ( test -n "`egrep 'These definitions are for HP Internal developers' $file`"
#
- # Fix 101: Zzz_Ki
+ # Fix 102: Zzz_Ki
#
case "$file" in ./sys/ki.h )
if ( test -n "`egrep '11.00 HP-UX LP64' $file`"
#
- # Fix 102: Zzz_Ki_Calls
+ # Fix 103: Zzz_Ki_Calls
#
case "$file" in ./sys/ki_calls.h )
if ( test -n "`egrep 'KI_MAX_PROCS is an arbitrary number' $file`"
#
- # Fix 103: Zzz_Ki_Defs
+ # Fix 104: Zzz_Ki_Defs
#
case "$file" in ./sys/ki_defs.h )
if ( test -n "`egrep 'Kernel Instrumentation Definitions' $file`"
#
- # Fix 104: Zzz_Time
+ # Fix 105: Zzz_Time
#
case "$file" in ./sys/time.h )
if ( test -n "`egrep 'For CASPEC, look in' $file`"
#
cd ${INPUT}
cd $1
- if [ -r $2 ] && [ ! -r $3 ]; then
- cp $2 $3 >/dev/null 2>&1 || echo "Can't copy $2" >&2
- chmod +w $3 2>/dev/null
- chmod a+r $3 2>/dev/null
- echo Copied $2
- for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' $3 |
+ if [ -f $2 ] ; then
+ if [ -r $2 ] && [ ! -r $3 ]; then
+ cp $2 $3 >/dev/null 2>&1 || echo "Can't copy $2" >&2
+ chmod +w $3 2>/dev/null
+ chmod a+r $3 2>/dev/null
+ echo Copied $2
+ for include in `egrep '^[ ]*#[ ]*include[ ]*"[^/]' $3 |
sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'`
- do
- dir=`echo $2 | sed -e s'|/[^/]*$||'`
- dir2=`echo $3 | sed -e s'|/[^/]*$||'`
- newreq="$newreq $1 $dir/$include $dir2/$include"
- done
+ do
+ dir=`echo $2 | sed -e s'|/[^/]*$||'`
+ dir2=`echo $3 | sed -e s'|/[^/]*$||'`
+ newreq="$newreq $1 $dir/$include $dir2/$include"
+ done
+ fi
fi
shift; shift; shift
done
cd $ORIGDIR
rm -f include/assert.h
-cp ${EGCS_SRCDIR}/assert.h include/assert.h
+cp ${srcdir}/assert.h include/assert.h || exit 1
chmod a+r include/assert.h