From 2f0f06da738367e82500522ae955fab8dce4ab80 Mon Sep 17 00:00:00 2001 From: law Date: Tue, 11 May 1999 00:47:31 +0000 Subject: [PATCH] * fixinc/inclhack.def (sun_auth_proto): Apply to all targets. (sysz_stdlib_for_sun): Similarly. * fixinc/fixincl.x, fixinc/inclhack.sh: Rebuilt. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26878 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/fixinc/fixincl.x | 30 +++++++++++++++++------------- gcc/fixinc/inclhack.def | 12 +++++------- gcc/fixinc/inclhack.sh | 17 +++++++---------- 4 files changed, 35 insertions(+), 30 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7c6bcd8..c5b5fd8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Tue May 11 01:32:01 1999 Jeffrey A Law (law@cygnus.com) + + * fixinc/inclhack.def (sun_auth_proto): Apply to all targets. + (sysz_stdlib_for_sun): Similarly. + * fixinc/fixincl.x, fixinc/inclhack.sh: Rebuilt. + Mon May 10 20:34:10 1999 Jim Wilson * config/mips/elf.h (UNIQUE_SECTION_P): Undef. diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index a94d8e8..61c1447 100644 --- a/gcc/fixinc/fixincl.x +++ b/gcc/fixinc/fixincl.x @@ -214,9 +214,17 @@ tSCC zArm_Norcroft_HintList[] = * Machine/OS name selection pattern */ #define apzArm_Norcroft_HintMachs (const char**)NULL -#define ARM_NORCROFT_HINT_TEST_CT 0 -#define ARM_NORCROFT_HINT_RE_CT 0 -#define aArm_Norcroft_HintTests (tTestDesc*)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zArm_Norcroft_HintSelect0[] = + "___type p_type"; + +#define ARM_NORCROFT_HINT_TEST_CT 1 +#define ARM_NORCROFT_HINT_RE_CT 1 +tTestDesc aArm_Norcroft_HintTests[] = { + { TT_EGREP, zArm_Norcroft_HintSelect0, (regex_t*)NULL }, }; /* * Fix Command Arguments for Arm_Norcroft_Hint @@ -615,7 +623,7 @@ tSCC zNo_Double_SlashSelect0[] = * perform the 'test' shell command - do fix on success */ tSCC zNo_Double_SlashTest0[] = - "-z `echo ${file} | egrep '(cxx|\\+\\+)/' `"; + "-z `echo ${file} | egrep '(CC|cxx|\\+\\+)/' `"; #define NO_DOUBLE_SLASH_TEST_CT 2 #define NO_DOUBLE_SLASH_RE_CT 1 @@ -627,7 +635,8 @@ tTestDesc aNo_Double_SlashTests[] = { * Fix Command Arguments for No_Double_Slash */ const char* apzNo_Double_SlashPatch[] = { "sed", - "-e", "/\\(^|[^:]\\)\\/\\/[^\"*]/s|//.*$||g", + "-e", "s,^//.*$,,", + "-e", "s,[^:]//[^\"].*$,,", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -2650,9 +2659,7 @@ tSCC zSun_Auth_ProtoList[] = /* * Machine/OS name selection pattern */ -tSCC* apzSun_Auth_ProtoMachs[] = { - "*-sun-*", - (const char*)NULL }; +#define apzSun_Auth_ProtoMachs (const char**)NULL /* * content selection pattern - do fix if pattern found @@ -2896,10 +2903,7 @@ tSCC zSysz_Stdlib_For_SunList[] = /* * Machine/OS name selection pattern */ -tSCC* apzSysz_Stdlib_For_SunMachs[] = { - "*-sun*", - "m88k-*sysv3*", - (const char*)NULL }; +#define apzSysz_Stdlib_For_SunMachs (const char**)NULL #define SYSZ_STDLIB_FOR_SUN_TEST_CT 0 #define SYSZ_STDLIB_FOR_SUN_RE_CT 0 #define aSysz_Stdlib_For_SunTests (tTestDesc*)NULL @@ -3874,7 +3878,7 @@ const char* apzZzz_TimePatch[] = { "sh", "-c", * * List of all fixes */ -#define REGEX_COUNT 75 +#define REGEX_COUNT 76 #define FIX_COUNT 104 tFixDesc fixDescList[ FIX_COUNT ] = { { zAix_SyswaitName, zAix_SyswaitList, diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index 1cd520f..91854a2 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -1483,8 +1483,9 @@ fix = { /* - * On *some* SunOS-es, rpc/auth.h, rpc/clnt.h, rpc/svc.h, and - * rpc/xdr.h need prototypes for its ops function pointers. + * Apply fix this to all OSs since this problem seems to effect + * more than just SunOS. In general, fixes which are triggered + * by a specific target are bad. */ fix = { hackname = sun_auth_proto; @@ -1492,7 +1493,6 @@ fix = { files = rpc/clnt.h; files = rpc/svc.h; files = rpc/xdr.h; - mach = "*-sun-*"; /* * Select those files containing '(*name)()' but *not* * containing '(*name)(junk)'. The change would be innocuous @@ -1974,13 +1974,11 @@ fix = { /* - * Fix return type of exit and abort in on SunOS 4.1. - * Also wrap protection around size_t for m88k-sysv3 systems. + * Fix return type of exit and abort in + * Also wrap protection around size_t. */ fix = { hackname = sysz_stdlib_for_sun; - mach = "*-sun*"; - mach = "m88k-*sysv3*"; files = stdlib.h; sed = "s/int\tabort/void\tabort/g"; diff --git a/gcc/fixinc/inclhack.sh b/gcc/fixinc/inclhack.sh index d25363e..4c321dd 100755 --- a/gcc/fixinc/inclhack.sh +++ b/gcc/fixinc/inclhack.sh @@ -472,6 +472,8 @@ struct rusage; # Fix 6: Arm_Norcroft_Hint # case "${file}" in ./X11/Intrinsic.h ) + if ( test -n "`egrep '___type p_type' ${file}`" + ) > /dev/null 2>&1 ; then fixlist="${fixlist} arm_norcroft_hint" if [ ! -r ${DESTFILE} ] @@ -482,6 +484,7 @@ 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 @@ -736,7 +739,7 @@ struct rusage; # Fix 17: No_Double_Slash # if ( test -n "`egrep '(^|[^:])//[^\"*]' ${file}`" -a \ - '(' -z `echo ${file} | egrep '(cxx|\+\+)/' ` ')' + '(' -z `echo ${file} | egrep '(CC|cxx|\+\+)/' ` ')' ) > /dev/null 2>&1 ; then fixlist="${fixlist} no_double_slash" @@ -744,7 +747,8 @@ struct rusage; then infile=${file} else infile=${DESTFILE} ; fi - sed -e '/\(^|[^:]\)\/\/[^"*]/s|//.*$||g' \ + sed -e 's,^//.*$,,' \ + -e 's,[^:]//[^"].*$,,' \ < $infile > ${DESTDIR}/fixinc.tmp rm -f ${DESTFILE} mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} @@ -2151,7 +2155,6 @@ void (*signal(...))(...);\ ./rpc/clnt.h | \ ./rpc/svc.h | \ ./rpc/xdr.h ) - case "$target_canonical" in *-sun-* ) if ( test -n "`egrep '\\(\\*[a-z][a-z_]*\\)\\(\\)' ${file}`" -a \ -z "`egrep '\\(\\*[a-z][a-z_]*\\)\\([ ]*[a-zA-Z.].*\\)' ${file}`" ) > /dev/null 2>&1 ; then @@ -2171,8 +2174,6 @@ void (*signal(...))(...);\ rm -f ${DESTFILE} mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' - ;; # case end for machine type test - esac ;; # case end for file name test esac @@ -2330,8 +2331,6 @@ extern unsigned int\ # Fix 78: Sysz_Stdlib_For_Sun # case "${file}" in ./stdlib.h ) - case "$target_canonical" in *-sun* | \ - m88k-*sysv3* ) fixlist="${fixlist} sysz_stdlib_for_sun" if [ ! -r ${DESTFILE} ] @@ -2354,8 +2353,6 @@ extern unsigned int\ < $infile > ${DESTDIR}/fixinc.tmp rm -f ${DESTFILE} mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} - ;; # case end for machine type test - esac ;; # case end for file name test esac @@ -3039,7 +3036,7 @@ cat > /dev/null ) < $infile > ${DESTDIR}/fixinc.tmp # Find any include directives that use "file". # dir=`echo ${file} | sed -e s';/[^/]*$;;'` - ddir=`echo ${DESTDIR} | sed 's;/[^/]*$;;'`/$dir + ddir=`ec${DESTDIR}/$dir for include in ` egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${DESTFILE} | -- 2.7.4