From: H.Merijn Brand Date: Wed, 18 Apr 2007 19:04:40 +0000 (+0000) Subject: 1. Move #30327 to the generation location X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=43dddb5979cb03af335f65a6070fe864ce8afd7e;p=p5sagit%2Fp5-mst-13.2.git 1. Move #30327 to the generation location 2. Regen after backports 3. Include Jarkko's $run and \n patch p4raw-id: //depot/perl@30977 --- diff --git a/Configure b/Configure index d969c3a..532aed1 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 Fri Mar 9 20:00:14 CET 2007 [metaconfig 3.0 PL70] +# Generated on Wed Apr 18 21:01:29 CEST 2007 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <&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 + : is a C symbol defined? csym='tlook=$1; case "$3" in @@ -7582,10 +7609,10 @@ true-*) tx=no; eval "tval=\$$4"; case "$tval" in "") tx=yes;; esac;; esac; case "$tx" in yes) + tval=false; case "$d_cplusplus" in $define) extern_C=\"C\";; esac; - tval=false; if $test "$runnm" = true; then if $contains $tlook $tf >/dev/null 2>&1; then tval=true; @@ -7637,33 +7664,6 @@ 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" @@ -12968,11 +12968,11 @@ if eval $compile; then 0) echo "Yes, it does" >&4 d_futimes="$define" ;; - *) echo "No, it has futimes, but it isn't working ($rc) (probably harmless)\n" >&4 + *) echo "No, it has futimes, but it isn't working ($rc) (probably harmless)" >&4 ;; esac else - echo "No, it does not (probably harmless)\n" >&4 + echo "No, it does not (probably harmless)" >&4 fi $rm -f try.* try core core.try.* @@ -14694,7 +14694,7 @@ int main() EOCP set try if eval $compile; then - if ./try; then + if $run ./try; then d_localtime_r_needs_tzset=undef; else d_localtime_r_needs_tzset=define; @@ -15976,7 +15976,7 @@ exit(0); EOCP set try if eval $compile_ok; then - if ./try 2>/dev/null; then + if $run ./try 2>/dev/null; then echo "Yes, it can." val="$define" else @@ -16052,7 +16052,7 @@ exit(0); EOCP set try if eval $compile_ok; then - if ./try 2>/dev/null; then + if $run ./try 2>/dev/null; then echo "Yes, it can." val="$define" else @@ -18021,7 +18021,7 @@ int main() EOCP xxx_prompt=y set try - if eval $compile && ./try > /dev/null; then + if eval $compile && $run ./try > /dev/null; then dflt=`$run ./try` case "$dflt" in [1-4][1-4][1-4][1-4]|12345678|87654321) diff --git a/Porting/config_h.pl b/Porting/config_h.pl index 7c1deec..cf69b2a 100755 --- a/Porting/config_h.pl +++ b/Porting/config_h.pl @@ -3,7 +3,7 @@ # This script reorders config_h.SH after metaconfig # Changing metaconfig is too complicated # -# Copyright (C) 2005-2005 by H.Merijn Brand (m)'05 [25-05-2005] +# Copyright (C) 2005-2007 by H.Merijn Brand (m)'07 [18-04-2007] # # You may distribute under the terms of either the GNU General Public # License or the Artistic License, as specified in the README file. @@ -55,6 +55,25 @@ do { } } while ($changed); +# 30327 +for (grep m{echo .Extracting \$CONFIG_H} => @ch) { + my $case = join "\n", + qq{case "\$CONFIG_H" in}, + qq{already-done) echo "Not re-extracting config.h" ;;}, + qq{*)}, ""; + s{^(?=echo .Extracting)}{$case}m; + } +push @ch, ";;\nesac\n"; + + open $ch, "> $cSH" or die "Cannot write $cSH: $!\n"; +print $ch <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!' +echo "Extracting $CONFIG_H (with variable substitutions)" +sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-def!#undef!' /* * This file was produced by running the config_h.SH script, which * gets its values from $CONFIG_SH, which is generally produced by @@ -528,13 +533,6 @@ already-done) echo "Not re-extracting config.h" ;; */ #$d_strcoll HAS_STRCOLL /**/ -/* USE_STRUCT_COPY: - * This symbol, if defined, indicates that this C compiler knows how - * to copy structures. If undefined, you'll need to use a block copy - * routine of some sort instead. - */ -#$d_strctcpy USE_STRUCT_COPY /**/ - /* HAS_STRTOD: * This symbol, if defined, indicates that the strtod routine is * available to provide better numeric string conversion than atof(). @@ -613,15 +611,6 @@ already-done) echo "Not re-extracting config.h" ;; */ #$d_usleep HAS_USLEEP /**/ -/* HASVOLATILE: - * This symbol, if defined, indicates that this C compiler knows about - * the volatile declaration. - */ -#$d_volatile HASVOLATILE /**/ -#ifndef HASVOLATILE -#define volatile -#endif - /* HAS_WAIT4: * This symbol, if defined, indicates that wait4() exists. */ @@ -662,26 +651,6 @@ already-done) echo "Not re-extracting config.h" ;; #$i_dbm I_DBM /**/ #$i_rpcsvcdbm I_RPCSVC_DBM /**/ -/* I_DIRENT: - * This symbol, if defined, indicates to the C program that it should - * include . Using this symbol also triggers the definition - * of the Direntry_t define which ends up being 'struct dirent' or - * 'struct direct' depending on the availability of . - */ -/* DIRNAMLEN: - * This symbol, if defined, indicates to the C program that the length - * of directory entry names is provided by a d_namlen field. Otherwise - * you need to do strlen() on the d_name field. - */ -/* Direntry_t: - * This symbol is set to 'struct direct' or 'struct dirent' depending on - * whether dirent is available or not. You should use this pseudo type to - * portably declare your directory entries. - */ -#$i_dirent I_DIRENT /**/ -#$d_dirnamlen DIRNAMLEN /**/ -#define Direntry_t $direntrytype - /* I_DLFCN: * This symbol, if defined, indicates that exists and should * be included. @@ -2217,6 +2186,13 @@ already-done) echo "Not re-extracting config.h" ;; #$d_statblks USE_STAT_BLOCKS /**/ #endif +/* USE_STRUCT_COPY: + * This symbol, if defined, indicates that this C compiler knows how + * to copy structures. If undefined, you'll need to use a block copy + * routine of some sort instead. + */ +#$d_strctcpy USE_STRUCT_COPY /**/ + /* HAS_STRERROR: * This symbol, if defined, indicates that the strerror routine is * available to translate error numbers to strings. See the writeup @@ -2340,6 +2316,15 @@ already-done) echo "Not re-extracting config.h" ;; */ #define Signal_t $signal_t /* Signal handler's return type */ +/* HASVOLATILE: + * This symbol, if defined, indicates that this C compiler knows about + * the volatile declaration. + */ +#$d_volatile HASVOLATILE /**/ +#ifndef HASVOLATILE +#define volatile +#endif + /* Fpos_t: * This symbol holds the type used to declare file positions in libc. * It can be fpos_t, long, uint, etc... It may be necessary to include @@ -2385,6 +2370,26 @@ already-done) echo "Not re-extracting config.h" ;; #define Groups_t $groupstype /* Type for 2nd arg to [sg]etgroups() */ #endif +/* I_DIRENT: + * This symbol, if defined, indicates to the C program that it should + * include . Using this symbol also triggers the definition + * of the Direntry_t define which ends up being 'struct dirent' or + * 'struct direct' depending on the availability of . + */ +/* DIRNAMLEN: + * This symbol, if defined, indicates to the C program that the length + * of directory entry names is provided by a d_namlen field. Otherwise + * you need to do strlen() on the d_name field. + */ +/* Direntry_t: + * This symbol is set to 'struct direct' or 'struct dirent' depending on + * whether dirent is available or not. You should use this pseudo type to + * portably declare your directory entries. + */ +#$i_dirent I_DIRENT /**/ +#$d_dirnamlen DIRNAMLEN /**/ +#define Direntry_t $direntrytype + /* I_GRP: * This symbol, if defined, indicates to the C program that it should * include . @@ -4488,5 +4493,5 @@ already-done) echo "Not re-extracting config.h" ;; #endif !GROK!THIS! - ;; +;; esac