X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=cflags.SH;h=4e62f9200ece579277f988e55c0b7972f6a437e0;hb=e27835eefa408ae52d4ae22eec67eea282a87949;hp=412beeba90ba77eed26e9a797080526c5e176a95;hpb=215ed6ce53e595830ca9877085cf6bb6381f9211;p=p5sagit%2Fp5-mst-13.2.git diff --git a/cflags.SH b/cflags.SH index 412beeb..4e62f92 100755 --- a/cflags.SH +++ b/cflags.SH @@ -66,31 +66,31 @@ cat >_cflags.c <<__EOT__ #ifdef I_UNISTD #include #endif -#ifdef I_SYSTYPES +#ifdef I_SYS_TYPES #include #endif -#ifdef I_SYSPARAM +#ifdef I_SYS_PARAM #include #endif -#ifdef I_SYSRESOURCE +#ifdef I_SYS_RESOURCE #include #endif -#ifdef I_SYSSELECT +#ifdef I_SYS_SELECT #include #endif #if defined(HAS_SOCKET) && !defined(VMS) && !defined(WIN32) /* See perl.h. */ #include #endif -#ifdef I_SYSSTAT +#ifdef I_SYS_STAT #include #endif -#ifdef I_SYSTIME +#ifdef I_SYS_TIME #include #endif -#ifdef I_SYSTIMES +#ifdef I_SYS_TIMES #include #endif -#ifdef I_SYSWAIT +#ifdef I_SYS_WAIT #include #endif /* The gcc -ansi can cause a lot of noise in Solaris because of: @@ -134,12 +134,12 @@ case "$gccversion" in '') ;; [12]*) ;; # gcc versions 1 (gasp!) and 2 are not good for this. Intel*) ;; # # Is that you, Intel C++? -*) for opt in -ansi -pedantic -std=c89 -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat +*) for opt in -ansi -std=c89 -W -Wextra -Wdeclaration-after-statement -Wendif-labels -Wc++-compat do case " $ccflags " in *" $opt "*) ;; # Skip if already there. *) rm -f _cflags$_exe - case "`$cc $cflags $warn $opt _cflags.c -o _cflags$_exe 2>&1`" in + case "`$cc $cflags $warn $stdflags $opt _cflags.c -o _cflags$_exe 2>&1`" in *"unrecognized"*) ;; *"implicit declaration"*) ;; # Was something useful hidden? *"Invalid"*) ;; @@ -183,7 +183,7 @@ case "$gccversion" in "long long") ccflags=`echo $ccflags|sed -e 's/-pedantic/ /' -e 's/-std=c89/ /' -e 's/-ansi/ /'` warn=`echo $warn|sed -e 's/-pedantic/ /' -e 's/-ansi/ /'` - stdflags=`echo $warn|sed -e 's/-std=c89/ /'` + stdflags=`echo $stdflags|sed -e 's/-std=c89/ /'` ;; esac fi