From: Jarkko Hietaniemi Date: Tue, 12 Sep 2006 07:19:32 +0000 (+0300) Subject: Accumulated fixes from earlier backports, amongst of which: X-Git-Tag: accepted/trunk/20130322.191538~17044 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f244a5024a702eda24be5d03683683a27d10f206;p=platform%2Fupstream%2Fperl.git Accumulated fixes from earlier backports, amongst of which: Subject: [PATCH] remove -Wdeclaration-after-statement scan from Configure Message-ID: <45063554.1040301@iki.fi> p4raw-id: //depot/perl@28829 --- diff --git a/Configure b/Configure index 0e0970c..f002c1a 100755 --- a/Configure +++ b/Configure @@ -26,7 +26,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Wed Aug 2 13:20:07 CEST 2006 [metaconfig 3.0 PL70] +# Generated on Wed Sep 13 08:48:56 CEST 2006 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <&1 fi - - echo "Checking if your compiler accepts -Wdeclaration-after-statement" 2>&1 - echo 'int main(void) { return 0; }' > gcctest.c - if $cc -Wdeclaration-after-statement -o gcctest gcctest.c; then - echo "Yes, it does." 2>&1 - case "$ccflags" in - *-Wdeclaration-after-statement*) - echo "Leaving current flags $ccflags alone." 2>&1 - ;; - *) dflt="$dflt -Wdeclaration-after-statement" ;; - esac - else - echo "Nope, it doesn't, but that's ok." 2>&1 - fi ;; esac ;; @@ -7137,32 +7123,6 @@ $rm -f try try.* glibc.ver set d_gnulibc eval $setvar -echo " " -echo "Checking for C++..." >&4 -cat >try.c <<'EOCP' -#include -int main(void) -{ -#ifdef __cplusplus - printf("define\n"); -#else - printf("undef\n"); -#endif - return 0; -} -EOCP -set try -if eval $compile_ok && $run ./try > cplusplus; then - val=`$cat cplusplus` - echo "You are using a C++ compiler." -else - val="$undef" - echo "You are not using a C++ compiler." -fi -$rm -f try try.* cplusplus -set d_cplusplus -eval $setvar - : see if nm is to be used to determine whether a symbol is defined or not case "$usenm" in '') @@ -7610,6 +7570,33 @@ yes) esac;; esac' + +echo " " +echo "Checking for C++..." >&4 +cat >try.c <<'EOCP' +#include +int main(void) +{ +#ifdef __cplusplus + printf("define\n"); +#else + printf("undef\n"); +#endif + return 0; +} +EOCP +set try +if eval $compile_ok && $run ./try >cplusplus$$; then + val=`$cat cplusplus$$` + echo "You are using a C++ compiler." +else + val="$undef" + echo "You are not using a C++ compiler." +fi +$rm -f try try.* cplusplus$$ +set d_cplusplus +eval $setvar + : see if dlopen exists xxx_runnm="$runnm" xxx_ccflags="$ccflags" diff --git a/Porting/Glossary b/Porting/Glossary index 9e9f9e1..9a40c55 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -534,16 +534,16 @@ d_const (d_const.U): indicates to the C program that this C compiler knows about the const type. -d_cplusplus (d_cplusplus.U): - This variable conditionally defines the USE_CPLUSPLUS symbol, which - indicates that a C++ compiler was used to compiled Perl and will be - used to compile extensions. - d_copysignl (d_copysignl.U): This variable conditionally defines the HAS_COPYSIGNL symbol, which indicates to the C program that the copysignl() routine is available. If aintl is also present we can emulate modfl. +d_cplusplus (d_cplusplus.U): + This variable conditionally defines the USE_CPLUSPLUS symbol, which + indicates that a C++ compiler was used to compiled Perl and will be + used to compile extensions. + d_crypt (d_crypt.U): This variable conditionally defines the CRYPT symbol, which indicates to the C program that the crypt() routine is available diff --git a/config_h.SH b/config_h.SH index 1642058..8c2dcab 100644 --- a/config_h.SH +++ b/config_h.SH @@ -92,17 +92,6 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_chsize HAS_CHSIZE /**/ -/* HASCONST: - * This symbol, if defined, indicates that this C compiler knows about - * the const type. There is no need to actually test for that symbol - * within your programs. The mere use of the "const" keyword will - * trigger the necessary tests. - */ -#$d_const HASCONST /**/ -#ifndef HASCONST -#define const -#endif - /* HAS_CUSERID: * This symbol, if defined, indicates that the cuserid routine is * available to get character login names. @@ -1253,6 +1242,17 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_cmsghdr_s HAS_STRUCT_CMSGHDR /**/ +/* HASCONST: + * This symbol, if defined, indicates that this C compiler knows about + * the const type. There is no need to actually test for that symbol + * within your programs. The mere use of the "const" keyword will + * trigger the necessary tests. + */ +#$d_const HASCONST /**/ +#ifndef HASCONST +#define const +#endif + /* HAS_COPYSIGNL: * This symbol, if defined, indicates that the copysignl routine is * available. If aintl is also present we can emulate modfl. @@ -2432,6 +2432,13 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$d_open3 HAS_OPEN3 /**/ +/* HAS_POLL: + * This symbol, if defined, indicates that the poll routine is + * available to poll active file descriptors. You may safely + * include when both this symbol *and* I_POLL are defined. + */ +#$d_poll HAS_POLL /**/ + /* HAS_PROCSELFEXE: * This symbol is defined if PROCSELFEXE_PATH is a symlink * to the absolute pathname of the executing program. @@ -4424,12 +4431,5 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #define M_VOID /* Xenix strikes again */ #endif -/* HAS_POLL: - * This symbol, if defined, indicates that the poll routine is - * available to poll active file descriptors. You may safely - * include when both this symbol *and* I_POLL are defined. - */ -#$d_poll HAS_POLL /**/ - #endif !GROK!THIS!