diff options
author | Bruce Korb <korbb@datadesign.com> | 1999-01-05 09:25:40 +0000 |
---|---|---|
committer | Bruce Korb <korbb@datadesign.com> | 1999-01-05 09:25:40 +0000 |
commit | de2a253d8768e1b5b537e0d3cb5ebb420aa4fd6b (patch) | |
tree | 937746fd21a4e35a549addbe8edc6fac2ff870bf | |
parent | 0e539bf6775996fdbc997671a111517957fe2a24 (diff) |
put the declaration of uname before the definition of struct utsname
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/fixincl-branch@24497 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rwxr-xr-x | gcc/fixinc/fixincl.sh | 4 | ||||
-rw-r--r-- | gcc/fixinc/fixincl.x | 91 | ||||
-rw-r--r-- | gcc/fixinc/inclhack.def | 13 | ||||
-rwxr-xr-x | gcc/fixinc/inclhack.sh | 69 |
5 files changed, 131 insertions, 51 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index e76c271c980..992d624527b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -3,6 +3,11 @@ Tue Jan 5 8:52:18 PST 1999 Bruce Korb (korb@datadesign.com) * fixinc/fixincl.c (various): added debug code so Manfred can trace the processing. + * fixinc/inclhack.def (sys/utsname.h): Provide forward declaration of + struct utsname on Ultrix V4.[35]. + + * fixinc/{fixincl.x|fixincl.sh|inclhack.sh} : regenerated + Sun Jan 3 23:32:18 PST 1999 Jeff Law (law@cygnus.com) * version.c: Bump for snapshot. diff --git a/gcc/fixinc/fixincl.sh b/gcc/fixinc/fixincl.sh index 80a9b7aee59..c28e5c7ff26 100755 --- a/gcc/fixinc/fixincl.sh +++ b/gcc/fixinc/fixincl.sh @@ -2,7 +2,7 @@ # # DO NOT EDIT THIS FILE (fixincl.sh) # -# It has been autogen-ed Tuesday December 8, 1998 at 12:15:19 PM +# It has been autogen-ed Tuesday January 5, 1999 at 09:22:32 AM PST # From the definitions inclhack.def # and the template file inclhack.tpl # @@ -10,7 +10,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 105 fixup scripts. # # See README-fixinc for more information. # diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index 04be02015f6..cd4174219ef 100644 --- a/gcc/fixinc/fixincl.x +++ b/gcc/fixinc/fixincl.x @@ -1,7 +1,7 @@ /* * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been autogen-ed Tuesday December 8, 1998 at 12:15:39 PM + * It has been autogen-ed Tuesday January 5, 1999 at 09:20:37 AM PST * From the definitions inclhack.def * and the template file fixincl.tpl * @@ -9,7 +9,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 105 fixup scripts. * * See README-fixinc for more information. * @@ -3005,7 +3005,41 @@ const char* apzUltrix_Ansi_CompatPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 84 - Ultrix_Atof_Param fix + * Description 84 - Ultrix_Fix_Fixproto fix + */ +tSCC zUltrix_Fix_FixprotoName[] = + "Ultrix_Fix_Fixproto"; +/* + * File name selection pattern + */ +tSCC zUltrix_Fix_FixprotoList[] = + "|" "sys/utsname.h" "|"; +/* + * Machine/OS name selection pattern + */ +#define apzUltrix_Fix_FixprotoMachs (const char**)NULL + +/* + * content selection pattern + */ +tSCC zUltrix_Fix_FixprotoSelect0[] = + "ULTRIX"; + +#define ULTRIX_FIX_FIXPROTO_TEST_CT 1 +tTestDesc aUltrix_Fix_FixprotoTests[] = { + { TT_EGREP, zUltrix_Fix_FixprotoSelect0, (regex_t*)NULL } }; + +/* + * Fix Command Arguments for Ultrix_Fix_Fixproto + */ +const char* apzUltrix_Fix_FixprotoPatch[] = { "sed", + "-e" "/^[ \t]*extern[ \t]*int[ \t]*uname();$/i\\\n" + "struct utsname;\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description 85 - Ultrix_Atof_Param fix */ tSCC zUltrix_Atof_ParamName[] = "Ultrix_Atof_Param"; @@ -3034,7 +3068,7 @@ const char* apzUltrix_Atof_ParamPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 85 - Ultrix_Const fix + * Description 86 - Ultrix_Const fix */ tSCC zUltrix_ConstName[] = "Ultrix_Const"; @@ -3067,7 +3101,7 @@ const char* apzUltrix_ConstPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 86 - Ultrix_Ifdef fix + * Description 87 - Ultrix_Ifdef fix */ tSCC zUltrix_IfdefName[] = "Ultrix_Ifdef"; @@ -3100,7 +3134,7 @@ const char* apzUltrix_IfdefPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 87 - Ultrix_Nested_Cmnt fix + * Description 88 - Ultrix_Nested_Cmnt fix */ tSCC zUltrix_Nested_CmntName[] = "Ultrix_Nested_Cmnt"; @@ -3125,7 +3159,7 @@ const char* apzUltrix_Nested_CmntPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 88 - Ultrix_Static fix + * Description 89 - Ultrix_Static fix */ tSCC zUltrix_StaticName[] = "Ultrix_Static"; @@ -3160,7 +3194,7 @@ const char* apzUltrix_StaticPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 89 - Undefine_Null fix + * Description 90 - Undefine_Null fix */ tSCC zUndefine_NullName[] = "Undefine_Null"; @@ -3200,7 +3234,7 @@ const char* apzUndefine_NullPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 90 - Va_I960_Macro fix + * Description 91 - Va_I960_Macro fix */ tSCC zVa_I960_MacroName[] = "Va_I960_Macro"; @@ -3236,7 +3270,7 @@ const char* apzVa_I960_MacroPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 91 - Void_Null fix + * Description 92 - Void_Null fix */ tSCC zVoid_NullName[] = "Void_Null"; @@ -3279,7 +3313,7 @@ const char* apzVoid_NullPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 92 - Vxworks_Gcc_Problem fix + * Description 93 - Vxworks_Gcc_Problem fix */ tSCC zVxworks_Gcc_ProblemName[] = "Vxworks_Gcc_Problem"; @@ -3327,7 +3361,7 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 93 - Vxworks_Needs_Vxtypes fix + * Description 94 - Vxworks_Needs_Vxtypes fix */ tSCC zVxworks_Needs_VxtypesName[] = "Vxworks_Needs_Vxtypes"; @@ -3360,7 +3394,7 @@ const char* apzVxworks_Needs_VxtypesPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 94 - Vxworks_Needs_Vxworks fix + * Description 95 - Vxworks_Needs_Vxworks fix */ tSCC zVxworks_Needs_VxworksName[] = "Vxworks_Needs_Vxworks"; @@ -3407,7 +3441,7 @@ const char* apzVxworks_Needs_VxworksPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 95 - Vxworks_Time fix + * Description 96 - Vxworks_Time fix */ tSCC zVxworks_TimeName[] = "Vxworks_Time"; @@ -3456,7 +3490,7 @@ const char* apzVxworks_TimePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 96 - X11_Class fix + * Description 97 - X11_Class fix */ tSCC zX11_ClassName[] = "X11_Class"; @@ -3494,7 +3528,7 @@ const char* apzX11_ClassPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 97 - X11_Class_Usage fix + * Description 98 - X11_Class_Usage fix */ tSCC zX11_Class_UsageName[] = "X11_Class_Usage"; @@ -3527,7 +3561,7 @@ const char* apzX11_Class_UsagePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 98 - X11_New fix + * Description 99 - X11_New fix */ tSCC zX11_NewName[] = "X11_New"; @@ -3566,7 +3600,7 @@ const char* apzX11_NewPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 99 - X11_Sprintf fix + * Description 100 - X11_Sprintf fix */ tSCC zX11_SprintfName[] = "X11_Sprintf"; @@ -3593,7 +3627,7 @@ const char* apzX11_SprintfPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 100 - Zzz_Ki_Iface fix + * Description 101 - Zzz_Ki_Iface fix */ tSCC zZzz_Ki_IfaceName[] = "Zzz_Ki_Iface"; @@ -3628,7 +3662,7 @@ const char* apzZzz_Ki_IfacePatch[] = { "sh", "-c", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 101 - Zzz_Ki fix + * Description 102 - Zzz_Ki fix */ tSCC zZzz_KiName[] = "Zzz_Ki"; @@ -3663,7 +3697,7 @@ const char* apzZzz_KiPatch[] = { "sh", "-c", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 102 - Zzz_Ki_Calls fix + * Description 103 - Zzz_Ki_Calls fix */ tSCC zZzz_Ki_CallsName[] = "Zzz_Ki_Calls"; @@ -3698,7 +3732,7 @@ const char* apzZzz_Ki_CallsPatch[] = { "sh", "-c", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 103 - Zzz_Ki_Defs fix + * Description 104 - Zzz_Ki_Defs fix */ tSCC zZzz_Ki_DefsName[] = "Zzz_Ki_Defs"; @@ -3733,7 +3767,7 @@ const char* apzZzz_Ki_DefsPatch[] = { "sh", "-c", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 104 - Zzz_Time fix + * Description 105 - Zzz_Time fix */ tSCC zZzz_TimeName[] = "Zzz_Time"; @@ -3770,9 +3804,9 @@ const char* apzZzz_TimePatch[] = { "sh", "-c", * * List of all fixes */ -#define REGEX_COUNT 75 -#define FIX_COUNT 104 -tFixDesc fixDescList[ 104 ] = { +#define REGEX_COUNT 76 +#define FIX_COUNT 105 +tFixDesc fixDescList[ 105 ] = { { zAix_SyswaitName, zAix_SyswaitList, apzAix_SyswaitMachs, (regex_t*)NULL, AIX_SYSWAIT_TEST_CT, FD_MACH_ONLY, @@ -4188,6 +4222,11 @@ tFixDesc fixDescList[ 104 ] = { ULTRIX_ANSI_COMPAT_TEST_CT, FD_MACH_ONLY, aUltrix_Ansi_CompatTests, apzUltrix_Ansi_CompatPatch }, + { zUltrix_Fix_FixprotoName, zUltrix_Fix_FixprotoList, + apzUltrix_Fix_FixprotoMachs, (regex_t*)NULL, + ULTRIX_FIX_FIXPROTO_TEST_CT, FD_MACH_ONLY, + aUltrix_Fix_FixprotoTests, apzUltrix_Fix_FixprotoPatch }, + { zUltrix_Atof_ParamName, zUltrix_Atof_ParamList, apzUltrix_Atof_ParamMachs, (regex_t*)NULL, ULTRIX_ATOF_PARAM_TEST_CT, FD_MACH_ONLY, diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index 39d514ca15a..09957254c52 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -2007,6 +2007,19 @@ fix = { /* + * Ultrix V4.[35] puts the declaration of uname before the definition + * of struct utsname, so the prototype (added by fixproto) causes havoc. + */ +fix = { + hackname = ultrix_fix_fixproto; + files = sys/utsname.h; + select = ULTRIX; + sed = "/^[ \t]*extern[ \t]*int[ \t]*uname();$/i\\\n" + "struct utsname;\n"; +}; + + +/* * parameter to atof not const on DECstation Ultrix V4.0 and NEWS-OS 4.2R. * also get rid of bogus inline definitions in HP-UX 8.0 */ diff --git a/gcc/fixinc/inclhack.sh b/gcc/fixinc/inclhack.sh index 3e4368a7519..8622deb4527 100755 --- a/gcc/fixinc/inclhack.sh +++ b/gcc/fixinc/inclhack.sh @@ -2,7 +2,7 @@ # # DO NOT EDIT THIS FILE (inclhack.sh) # -# It has been autogen-ed Tuesday December 8, 1998 at 12:14:39 PM +# It has been autogen-ed Tuesday January 5, 1999 at 09:21:13 AM PST # From the definitions inclhack.def # and the template file inclhack.tpl # @@ -10,7 +10,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 105 fixup scripts. # # See README-fixinc for more information. # @@ -2461,7 +2461,30 @@ extern unsigned int\ # - # 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} @@ -2483,7 +2506,7 @@ extern unsigned int\ # - # Fix 85: Ultrix_Const + # Fix 86: Ultrix_Const # case "$file" in ./stdio.h ) fixlist="${fixlist} @@ -2509,7 +2532,7 @@ extern unsigned int\ # - # Fix 86: Ultrix_Ifdef + # Fix 87: Ultrix_Ifdef # case "$file" in ./sys/file.h ) if ( test -n "`egrep '#ifdef KERNEL' $file`" @@ -2530,7 +2553,7 @@ extern unsigned int\ # - # Fix 87: Ultrix_Nested_Cmnt + # Fix 88: Ultrix_Nested_Cmnt # case "$file" in ./rpc/svc.h ) fixlist="${fixlist} @@ -2548,7 +2571,7 @@ extern unsigned int\ # - # Fix 88: Ultrix_Static + # Fix 89: Ultrix_Static # case "$file" in ./machine/cpu.h ) if ( test -n "`egrep '#include \"r[34]_cpu' $file`" @@ -2571,7 +2594,7 @@ extern unsigned int\ # - # Fix 89: Undefine_Null + # Fix 90: Undefine_Null # if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' $file`" -a \ -z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' $file`" @@ -2592,7 +2615,7 @@ extern unsigned int\ # - # 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`" @@ -2616,7 +2639,7 @@ extern unsigned int\ # - # Fix 91: Void_Null + # Fix 92: Void_Null # case "$file" in ./curses.h | \ ./dbm.h | \ @@ -2647,7 +2670,7 @@ extern unsigned int\ # - # 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`" @@ -2689,7 +2712,7 @@ extern unsigned int\ # - # 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`" @@ -2710,7 +2733,7 @@ extern unsigned int\ # - # Fix 94: Vxworks_Needs_Vxworks + # Fix 95: Vxworks_Needs_Vxworks # case "$file" in ./sys/stat.h ) if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' $file`" -a \ @@ -2736,7 +2759,7 @@ extern unsigned int\ # - # Fix 95: Vxworks_Time + # Fix 96: Vxworks_Time # case "$file" in ./time.h ) if ( test -n "`egrep 'VOIDFUNCPTR' $file`" -a \ @@ -2768,7 +2791,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ # - # Fix 96: X11_Class + # Fix 97: X11_Class # case "$file" in ./X11/ShellP.h ) if ( test -z "`egrep '__cplusplus' $file`" @@ -2796,7 +2819,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ # - # Fix 97: X11_Class_Usage + # Fix 98: X11_Class_Usage # case "$file" in ./Xm/BaseClassI.h ) if ( test -z "`egrep '__cplusplus' $file`" @@ -2817,7 +2840,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ # - # Fix 98: X11_New + # Fix 99: X11_New # case "$file" in ./Xm/Traversal.h ) if ( test -z "`egrep '__cplusplus' $file`" @@ -2846,7 +2869,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ # - # Fix 99: X11_Sprintf + # Fix 100: X11_Sprintf # case "$file" in ./X11*/Xmu.h ) fixlist="${fixlist} @@ -2866,7 +2889,7 @@ extern char * sprintf();\ # - # 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`" @@ -2893,7 +2916,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/$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`" @@ -2920,7 +2943,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/$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`" @@ -2947,7 +2970,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/$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`" @@ -2974,7 +2997,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/$file. # - # Fix 104: Zzz_Time + # Fix 105: Zzz_Time # case "$file" in ./sys/time.h ) if ( test -n "`egrep 'For CASPEC, look in' $file`" |