X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/1509effa50d0917578f8ab4dd412918cb11d6fcb..HEAD:/Configure diff --git a/Configure b/Configure index 49c9000..5a7b447 100755 --- a/Configure +++ b/Configure @@ -16,7 +16,7 @@ # you should use metaconfig. Perl uses a modified version of this # tool, and this, together with the metaconfig units, are available # in the git repository: -# $ git clone https://github.com/perl5-metaconfig/metaconfig metaconfig +# $ git clone https://github.com/Perl/metaconfig metaconfig # The original dist package (including metaconfig) is available on github: # $ git clone https://github.com/rmanfredi/dist.git dist-git # @@ -28,7 +28,7 @@ # Porting/pumpkin.pod. # Generated using [metaconfig 3.5 PL0] -# (with additional metaconfig patches by perlbug@perl.org) +# with additional metaconfig patches from https://github.com/Perl/metaconfig cat >c1$$ <&4 + echo "AGH! Grep doesn't return a status. Attempting remedial action." >&4 cat >contains <<'EOSS' grep "$1" "$2" >.greptmp && cat .greptmp && test -s .greptmp EOSS -chmod +x contains +contains=./contains +chmod +x $contains esac : Find the path to the source tree @@ -2115,7 +2147,7 @@ THIS PACKAGE SEEMS TO BE INCOMPLETE. You have the option of continuing the configuration process, despite the distinct possibility that your kit is damaged, by typing 'y'es. If you do, don't blame me if something goes wrong. I advise you to type 'n'o -and contact the author (perlbug@perl.org). +and contact the author (https://github.com/Perl/perl5/issues). EOM echo $n "Continue? [n] $c" >&4 @@ -2193,6 +2225,7 @@ $startsh xxxm=\$dflt $myecho ans='!' +counter=42 case "\$fastread" in yes) case "\$dflt" in '') ;; @@ -2267,6 +2300,12 @@ while expr "X\$ans" : "X!" >/dev/null; do $myecho ;; esac + counter=\`echo \$counter | awk '{ print --\$0 }'\` + if [ \$counter = 0 ]; then + echo >&4 + echo >&4 Too many attempts asking the same question. Giving up. + exit 1 + fi done case "\$ans" in '') ans="\$xxxm";; @@ -2395,7 +2434,7 @@ Much effort has been expended to ensure that this shell script will run on any Unix system. If despite that it blows up on yours, your best bet is to edit Configure and run it again. If you can't run Configure for some reason, you'll have to generate a config.sh file by hand. Whatever problems you -have, let me (perlbug@perl.org) know how I blew it. +have, let me (https://github.com/Perl/perl5/issues) know how I blew it. This installation script affects things in two ways: @@ -2573,6 +2612,11 @@ for file in $loclist; do *) echo "I don't know where '$file' is, and my life depends on it." >&4 echo "Go find a public domain implementation or fix your PATH setting!" >&4 + + test -f /etc/debian_version && echo "Run \"apt install build-essential\" to install make and friends" >&4 + test -f /etc/SUSE-brand && echo "Run \"zypper install 'pattern:devel_C_C++'\" to install make and friends" >&4 + test -f /etc/redhat-release && echo "Run \"yum groupinstall 'Development Tools'\" to install make and friends" >&4 + test -f /etc/fedora-release && echo "Run \"dnf group install 'Development Tools'\" to install make and friends" >&4 exit 1 ;; esac @@ -2769,7 +2813,7 @@ EOM if $test -f UU/myread; then . ./UU/myread else - echo "Cannot find myread, sorry. Aborting." >&2 + echo "Cannot find myread, sorry. Aborting." >&4 exit 1 fi fi @@ -3364,7 +3408,7 @@ EOM (cd $src/hints; ls -C *.sh) | $sed 's/\.sh/ /g' >&4 dflt='' : Half the following guesses are probably wrong... If you have better - : tests or hints, please send them to perlbug@perl.org + : tests or hints, please send them to https://github.com/Perl/perl5/issues : The metaconfig authors would also appreciate a copy... $test -f /irix && osname=irix $test -f /xenix && osname=sco_xenix @@ -3472,7 +3516,10 @@ EOM osvers="$3" ;; dragonfly) osname=dragonfly - osvers="$3" + case "$3" in + [0-9]*) osvers="$3" ;; + *) osvers="$2" ;; + esac ;; dynixptx*) osname=dynixptx osvers=`echo "$4"|sed 's/^v//'` @@ -3500,6 +3547,9 @@ EOM ;; MiNT) osname=mint ;; + minix) osname=minix + osvers=`$uname -r` + ;; netbsd*) osname=netbsd osvers="$3" ;; @@ -3511,8 +3561,8 @@ EOM ;; nonstop-ux) osname=nonstopux ;; openbsd) osname=openbsd - osvers="$3" - ;; + osvers="$3" + ;; os2) osname=os2 osvers="$4" ;; @@ -3642,47 +3692,47 @@ EOM fi fi - case "$targetarch" in - '') ;; - *) hostarch=$osname - case "$targetarch" in - nto*|*-nto-*) - # Will load qnx.sh, which should change osname to nto - osname=qnx - osvers='' - ;; - *linux-android*) - # Catch arm-linux-androideabi, mipsel-linux-android, - # and i686-linux-android - osname=linux-android - osvers='' - ;; - *linux*) - # Something like arm-linux-gnueabihf is really just - # plain linux. - osname=linux - osvers='' - ;; - *solaris*|*sunos*) - osname=solaris - # XXX perhaps we should just assume - # osvers to be 2, or maybe take the value - # from targetarch. Using $run before the - # hints are run is somewhat icky. - set X `$run $uname -a 2>/dev/null` - shift - case "$3" in - 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; - *) osvers="$3" ;; - esac - ;; - *) + case "$targetarch" in + '') ;; + *) hostarch=$osname + case "$targetarch" in + nto*|*-nto-*) + # Will load qnx.sh, which should change osname to nto + osname=qnx + osvers='' + ;; + *linux-android*) + # Catch arm-linux-androideabi, mipsel-linux-android, + # and i686-linux-android + osname=linux-android + osvers='' + ;; + *linux*) + # Something like arm-linux-gnueabihf is really just + # plain linux. + osname=linux + osvers='' + ;; + *solaris*|*sunos*) + osname=solaris + # XXX perhaps we should just assume + # osvers to be 2, or maybe take the value + # from targetarch. Using $run before the + # hints are run is somewhat icky. + set X `$run $uname -a 2>/dev/null` + shift + case "$3" in + 5*) osvers=`echo $3 | $sed 's/^5/2/g'` ;; + *) osvers="$3" ;; + esac + ;; + *) osname=`echo $targetarch|sed 's,^[^-]*-,,'` osvers='' - ;; - esac - ;; - esac + ;; + esac + ;; + esac : Now look for a hint file osname_osvers, unless one has been : specified already. @@ -4163,14 +4213,9 @@ EOSC : determine root of directory hierarchy where package will be installed. case "$prefix" in -'') - dflt=`./loc . /usr/local /usr/local /local /opt /usr` +'') dflt=`./loc . /usr/local /usr/local /local /opt /usr` ;; -*?/) - dflt=`echo "$prefix" | sed 's/.$//'` - ;; -*) - dflt="$prefix" +*) dflt="$prefix" ;; esac $cat <&4 -if $test -r $rsrc/patchlevel.h;then - revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h` - patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h` - subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` - api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h` - api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h` - api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` - perl_patchlevel=`egrep ',"(MAINT|SMOKE)[0-9][0-9]*"' $rsrc/patchlevel.h|tail -1|sed 's/[^0-9]//g'` -else - revision=0 - patchlevel=0 - subversion=0 - api_revision=0 - api_version=0 - api_subversion=0 - perl_patchlevel=0 - $echo "(You do not have patchlevel.h. Eek.)" -fi -: Define a handy string here to avoid duplication in myconfig.SH and configpm. -version_patchlevel_string="version $patchlevel subversion $subversion" -case "$perl_patchlevel" in -0|'') ;; -*) perl_patchlevel=`echo $perl_patchlevel | sed 's/.* //'` - version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" - ;; -esac - -$echo "(You have $package $version_patchlevel_string.)" - -case "$osname" in -dos|vms) - : XXX Should be a Configure test for double-dots in filenames. - version=`echo $revision $patchlevel $subversion | \ - $awk '{ printf "%d_%d_%d", $1, $2, $3 }'` - api_versionstring=`echo $api_revision $api_version $api_subversion | \ - $awk '{ printf "%d_%d_%d", $1, $2, $3 }'` - ;; -*) - version=`echo $revision $patchlevel $subversion | \ - $awk '{ printf "%d.%d.%d", $1, $2, $3 }'` - api_versionstring=`echo $api_revision $api_version $api_subversion | \ - $awk '{ printf "%d.%d.%d", $1, $2, $3 }'` - ;; -esac -: Special case the 5.005_xx maintenance series, which used 5.005 -: without any subversion label as a subdirectory in $sitelib -if test "${api_revision}${api_version}${api_subversion}" = "550"; then - api_versionstring='5.005' -fi - : Do we want threads support and if so, what type case "$usethreads" in $define|true|[yY]*) dflt='y';; -*) # Catch case where user specified ithreads or 5005threads but +*) # Catch case where user specified ithreads but # forgot -Dusethreads (A.D. 4/2002) - case "$useithreads$use5005threads" in + case "$useithreads" in *$define*) dflt='y';; *) dflt='n';; esac @@ -4404,74 +4405,7 @@ esac set usethreads eval $setvar -if $test $patchlevel -lt 9; then - case "$usethreads" in - $define) - : Default to ithreads unless overridden on command line or with - : old config.sh - dflt='y' - case "$use5005threads" in - $define|true|[yY]*) - echo "5.005 threads are no longer supported" - exit 1 - ;; - esac - case "$useithreads" in - $undef|false|[nN]*) dflt='n';; - esac - rp='Use the newer interpreter-based ithreads?' - . ./myread - case "$ans" in - y|Y) val="$define" ;; - *) val="$undef" ;; - esac - set useithreads - eval $setvar - : Now set use5005threads to the opposite value. - case "$useithreads" in - $define) val="$undef" ;; - *) val="$define" ;; - esac - set use5005threads - eval $setvar - ;; - *) - useithreads="$undef" - use5005threads="$undef" - ;; - esac - - case "$useithreads$use5005threads" in - "$define$define") - $cat >&4 <&4 <try.c +3.*) + echo "int main(){}">try.c for incdir in $locincpth; do warn=`$cc $ccflags -I$incdir -c try.c 2>&1 | \ grep '^c[cp]p*[01]: warning: changing search order '` @@ -4758,6 +4692,61 @@ case "$gccversion" in esac esac +# Really old versions of gcc default to C89 and will error for this code. +# See if the compiler (gcc or otherwise) needs a flag to compile C99 code +# Initialisations in for loops seem to be the particular problem +# (Does this syntax conflict with something else that was valid C89?) +# We also add a declaration after a statement to detect whether the compiler +# (or the user supplied -Accflags) consider such declarations to be errors. +# This causes 'Configure with -Accflags="-Werror=declaration-after-statement"' +# to fail hard and early. +# +# Annoyingly -std=c99 will cause gcc to tell glibc not to define prototypes for +# syscall, drand48 etc when including , which messes up our build. +# I guess we *could* loop round trying -std=c99 first with checks both for the +# prototype found and the code compiling (because -std=gnu99 might do other +# things we don't want, particularly on non-GCC compilers) but +# 1) We would need to check for the prototype first (without any flags) +# 2) We would still end up with most Linux systems either being -std=gnu99 +# or "" (no flag), and so both common options would not rigorously check our +# portability to other platforms. +# So it doesn't seem worth the complexity and chance of different failure. +$cat >try.c <<'EOCP' +int main(int argc, char **argv) { + argc = argc + 1; + /* This is deliberately a declaration after a statement. */ + unsigned long long count = 0; + for (char **p = argv; *p; ++p) { + ++count; + } + return count == 1 ? 0 : argc; +} +EOCP +c99_for=no +for flag in '' '-std=gnu99' '-std=c99'; do + if $cc -o try $flag $ccflags $ldflags try.c 2>/dev/null && ./try; then + c99_for="$flag" + break; + fi +done +case "$c99_for" in +'') echo "Your C compiler doesn't need any special flags to compile C99 code" + ;; +no) echo >&4 "Your C compiler doesn't seem to be able to compile C99 code" + rp='Do you really want to continue?' + dflt='n' + . ./myread + case "$ans" in + [yY]) echo >&4 "Okay, continuing." ;; + *) exit 1 ;; + esac + ;; +*) echo "Your C compiler needs $c99_for to compile C99 code" + ccflags="$c99_for $ccflags" + ;; +esac +$rm -f try try.* + : What should the include directory be ? : Use sysroot if set, so findhdr looks in the right place. echo " " @@ -4966,27 +4955,35 @@ esac # Note that ccname for clang is also gcc. case "$ccname" in gcc) + realpath=`which realpath 2>/dev/null | sed 's/no realpath in.*//'` $echo 'extern int foo;' > try.c set X `$cppstdin -v try.c 2>&1 | $awk '/^#include &4 - -*** You requested the use of the quadmath library and use -*** of long doubles. -*** -*** Please select one or the other. -EOM - exit 1 - ;; -esac - : Looking for optional libraries echo " " echo "Checking for optional libraries..." >&4 @@ -5273,9 +5250,6 @@ esac case "$usecbacktrace" in "$define") libswanted="$libswanted bfd" ;; esac -case "$usequadmath" in -"$define") libswanted="$libswanted quadmath" ;; -esac libsfound='' libsfiles='' libsdirs='' @@ -5295,6 +5269,16 @@ for thislib in $libswanted; do $test -f "$xxx" && libstyle=shared fi if test ! -f "$xxx"; then + xxx=$thisdir/lib$thislib.$so$_a + $test -f "$xxx" && eval $libscheck + $test -f "$xxx" && libstyle="import" + fi + if test ! -f "$xxx"; then + xxx=$thisdir/$thislib.$so$_a + $test -f "$xxx" && eval $libscheck + $test -f "$xxx" && libstyle="import" + fi + if test ! -f "$xxx"; then xxx=$thisdir/lib$thislib.$so $test -f "$xxx" && eval $libscheck $test -f "$xxx" && libstyle=shared @@ -5329,14 +5313,14 @@ for thislib in $libswanted; do case " $dflt " in *"-l$thislib "*);; *) dflt="$dflt -l$thislib" - libsfound="$libsfound $xxx" - yyy=`basename $xxx` - libsfiles="$libsfiles $yyy" - yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"` - case " $libsdirs " in - *" $yyy "*) ;; - *) libsdirs="$libsdirs $yyy" ;; - esac + libsfound="$libsfound $xxx" + yyy=`basename $xxx` + libsfiles="$libsfiles $yyy" + yyy=`echo $xxx|$sed -e "s%/$yyy\\$%%"` + case " $libsdirs " in + *" $yyy "*) ;; + *) libsdirs="$libsdirs $yyy" ;; + esac ;; esac break @@ -5428,18 +5412,18 @@ esac : think is an option checkccflag='check=$1; flag=$2; callback=$3; echo " "; -echo "Checking if your compiler accepts $flag" 2>&1; +echo "Checking if your compiler accepts $flag" >&4; [ "X$sysroot" != "X" ] && echo "For sysroot = $sysroot"; echo "int main(void) { return 0; }" > gcctest.c; if $cc $_sysroot -O2 $flag -o gcctest gcctest.c 2>gcctest.out && $run ./gcctest; then - echo "Yes, it does." 2>&1; + echo "Yes, it does." >&4; if $test -s gcctest.out ; then echo "But your platform does not like it:"; cat gcctest.out; else case "$ccflags" in *$check*) - echo "Leaving current flags $ccflags alone." 2>&1 + echo "Leaving current flags $ccflags alone." >&4 ;; *) dflt="$dflt $flag"; eval $callback @@ -5447,7 +5431,7 @@ if $cc $_sysroot -O2 $flag -o gcctest gcctest.c 2>gcctest.out && $run ./gcctest; esac fi else - echo "Nope, it does not, but that is ok." 2>&1; + echo "Nope, it does not, but that is ok." >&4; fi ' @@ -5456,13 +5440,13 @@ fi case "$hint" in default|recommended) case "$gccversion" in - 1*) dflt="$dflt -fpcc-struct-return" ;; + 1.*) dflt="$dflt -fpcc-struct-return" ;; esac case "$optimize:$DEBUGGING" in *-g*:old) dflt="$dflt -DDEBUGGING";; esac case "$gccversion" in - 2*) if $test -d /etc/conf/kconfig.d && + 2.*) if $test -d /etc/conf/kconfig.d && $contains _POSIX_VERSION $usrinc/sys/unistd.h >/dev/null 2>&1 then # Interactive Systems (ISC) POSIX mode. @@ -5471,7 +5455,7 @@ default|recommended) ;; esac case "$gccversion" in - 1*) ;; + 1.*) ;; 2.[0-8]*) ;; ?*) set strict-aliasing -fno-strict-aliasing eval $checkccflag @@ -5492,23 +5476,24 @@ default|recommended) # is to add the flag to the flags passed to the compiler at link time, # as that way the compiler can do the right implementation dependant # thing. (NWC) - case "$osname" in - amigaos) ;; # -fstack-protector builds but doesn't work - *) case "$gccversion" in - ?*) set stack-protector-strong -fstack-protector-strong - eval $checkccflag - case "$dflt" in - *-fstack-protector-strong*) ;; # It got added. - *) # Try the plain/older -fstack-protector. - set stack-protector -fstack-protector - eval $checkccflag - ;; - esac - ;; + case "$ccflags" in + *-fno-stack-protector*) + echo "Do not add -fstack-protector nor -fstack-protector-strong" 2>&1 + ;; + *) case "$gccversion" in + ?*) set stack-protector-strong -fstack-protector-strong + eval $checkccflag + case "$dflt" in + *-fstack-protector-strong*) ;; # It got added. + *) # Try the plain/older -fstack-protector. + set stack-protector -fstack-protector + eval $checkccflag + ;; esac ;; + esac + ;; esac - ;; esac case "$mips_type" in @@ -5589,7 +5574,7 @@ case "$cppflags" in ;; esac case "$gccversion" in -1*) cppflags="$cppflags -D__GNUC__" +1.*) cppflags="$cppflags -D__GNUC__" esac case "$mips_type" in '');; @@ -5775,7 +5760,7 @@ compile=' mc_file=$1; shift; case "$usedevel" in $define|true|[yY]*) if $test ! -f "${mc_file}.c"; then -echo "Internal Configure script bug - compiler test file ${mc_file}.c is missing. Please report this to perlbug@perl.org" >&4; +echo "Internal Configure script bug - compiler test file ${mc_file}.c is missing. Please report this to https://github.com/Perl/perl5/issues" >&4; exit 1; fi; esac; @@ -5784,7 +5769,7 @@ $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null compile_ok=' mc_file=$1; shift; -$cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;' +$cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs > /dev/null 2>&1;' : stub, used only to satisfy other units i_stdlib='define' @@ -5800,6 +5785,7 @@ case "$intsize" in #ifdef I_STDLIB #include #endif +#include int main() { printf("intsize=%d;\n", (int)sizeof(int)); @@ -6873,6 +6859,7 @@ case "$doublesize" in #ifdef I_STDLIB #include #endif +#include int main() { printf("%d\n", (int)sizeof(double)); @@ -6894,21 +6881,17 @@ EOCP esac $rm_try -: see if this is a float.h system -set float.h i_float -eval $inhdr - : check for long doubles -echo " " +echo " " >&4 echo "Checking to see if you have long double..." >&4 echo 'int main() { long double x = 7.0; }' > try.c set try if eval $compile; then val="$define" - echo "You have long double." + echo "You have long double." >&4 else val="$undef" - echo "You do not have long double." + echo "You do not have long double." >&4 fi $rm_try set d_longdbl @@ -6921,7 +6904,7 @@ eval $inlibc : check for length of long double case "${d_longdbl}${longdblsize}" in $define) - echo " " + echo " " >&4 echo "Checking to see how big your long doubles are..." >&4 $cat >try.c <<'EOCP' #include @@ -6934,19 +6917,19 @@ EOCP set try if eval $compile; then longdblsize=`$run ./try` - echo "Your long doubles are $longdblsize bytes long." + echo "Your long doubles are $longdblsize bytes long." >&4 else dflt='8' - echo " " + echo " " >&4 echo "(I can't seem to compile the test program. Guessing...)" >&4 rp="What is the size of a long double (in bytes)?" . ./myread longdblsize="$ans" fi if $test "X$doublesize" = "X$longdblsize"; then - echo "That isn't any different from an ordinary double." - echo "I'll keep your setting anyway, but you may see some" - echo "harmless compilation warnings." + echo "That isn't any different from an ordinary double." >&4 + echo "I'll keep your setting anyway, but you may see some" >&4 + echo "harmless compilation warnings." >&4 fi ;; esac @@ -6956,13 +6939,10 @@ $echo "Checking the kind of long doubles you have..." >&4 case "$d_longdbl" in define) $cat <try.c -#$i_float I_FLOAT #$i_stdlib I_STDLIB #define LONGDBLSIZE $longdblsize #define DOUBLESIZE $doublesize -#ifdef I_FLOAT #include -#endif #ifdef I_STDLIB #include #endif @@ -7003,9 +6983,9 @@ int main() { * The Motorola 68881 had another "extended precision" format: * sign:1 exp:15 zero:16 integer:1 mantissa:63 * for total of 96 bits of bytes. The zero bits were unused. - * See "M68000 FAMILY PROGRAMMER’S REFERENCE MANUAL" for more details. - * If it ever becomes relevant, this format should be allocated - * a new doublekind code since it's quite different from the Intel x87. + * See "M68000 FAMILY PROGRAMMER'S REFERENCE MANUAL" for more details. + * If it ever becomes relevant, this format should be allocated a + * new doublekind code since it is quite different from the Intel x87. */ printf("4\n"); exit(0); @@ -7072,13 +7052,13 @@ case "$longdblkind" in 0) echo "Your long doubles are doubles." >&4 ;; 1) echo "You have IEEE 754 128-bit little endian long doubles." >&4 ;; 2) echo "You have IEEE 754 128-bit big endian long doubles." >&4 ;; -3) echo "You have x86 80-bit little endian long doubles." >& 4 ;; -4) echo "You have x86 80-bit big endian long doubles." >& 4 ;; -5) echo "You have 128-bit fully little-endian double-double long doubles (64-bit LEs in LE)." >& 4 ;; -6) echo "You have 128-bit fully big-endian double-double long doubles (64-bit BEs in BE)." >& 4 ;; -7) echo "You have 128-bit mixed-endian double-double long doubles (64-bit LEs in BE)." >& 4 ;; -8) echo "You have 128-bit mixed-endian double-double long doubles (64-bit BEs in LE)." >& 4 ;; -9) echo "You have 128-bit PDP-style mixed-endian long doubles (VAX format H)." >& 4 ;; +3) echo "You have x86 80-bit little endian long doubles." >&4 ;; +4) echo "You have x86 80-bit big endian long doubles." >&4 ;; +5) echo "You have 128-bit fully little-endian double-double long doubles (64-bit LEs in LE)." >&4 ;; +6) echo "You have 128-bit fully big-endian double-double long doubles (64-bit BEs in BE)." >&4 ;; +7) echo "You have 128-bit mixed-endian double-double long doubles (64-bit LEs in BE)." >&4 ;; +8) echo "You have 128-bit mixed-endian double-double long doubles (64-bit BEs in LE)." >&4 ;; +9) echo "You have 128-bit PDP-style mixed-endian long doubles (VAX format H)." >&4 ;; *) echo "Cannot figure out your long double." >&4 ;; esac d_long_double_style_ieee=$undef @@ -7103,40 +7083,113 @@ case "$longdblkind" in esac $rm_try -: determine the architecture name +: get the patchlevel echo " " -if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then - tarch=`arch`"-$osname" -elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then - if uname -m > tmparch 2>&1 ; then - tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \ - -e 's/$/'"-$osname/" tmparch` - else - tarch="$osname" - fi - $rm -f tmparch +echo "Getting the current patchlevel..." >&4 +if $test -r $rsrc/patchlevel.h;then + revision=`awk '/define[ ]+PERL_REVISION/ {print $3}' $rsrc/patchlevel.h` + patchlevel=`awk '/define[ ]+PERL_VERSION/ {print $3}' $rsrc/patchlevel.h` + subversion=`awk '/define[ ]+PERL_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` + api_revision=`awk '/define[ ]+PERL_API_REVISION/ {print $3}' $rsrc/patchlevel.h` + api_version=`awk '/define[ ]+PERL_API_VERSION/ {print $3}' $rsrc/patchlevel.h` + api_subversion=`awk '/define[ ]+PERL_API_SUBVERSION/ {print $3}' $rsrc/patchlevel.h` + perl_patchlevel=`egrep ',"(MAINT|SMOKE)[0-9][0-9]*"' $rsrc/patchlevel.h|tail -1|sed 's/[^0-9]//g'` else - tarch="$osname" + revision=0 + patchlevel=0 + subversion=0 + api_revision=0 + api_version=0 + api_subversion=0 + perl_patchlevel=0 + $echo "(You do not have patchlevel.h. Eek.)" fi -case "$myarchname" in -''|"$tarch") ;; -*) - echo "(Your architecture name used to be $myarchname.)" - archname='' - ;; -esac -case "$targetarch" in -'') ;; -*) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;; -esac -myarchname="$tarch" -case "$archname" in -'') dflt="$tarch";; -*) dflt="$archname";; +: Define a handy string here to avoid duplication in myconfig.SH and configpm. +version_patchlevel_string="version $patchlevel subversion $subversion" +case "$perl_patchlevel" in +0|'') ;; +*) perl_patchlevel=`echo $perl_patchlevel | sed 's/.* //'` + version_patchlevel_string="$version_patchlevel_string patch $perl_patchlevel" + ;; esac -rp='What is your architecture name' -. ./myread -archname="$ans" + +$echo "(You have $package $version_patchlevel_string.)" + +case "$osname" in +dos|vms) + : XXX Should be a Configure test for double-dots in filenames. + version=`echo $revision $patchlevel $subversion | \ + $awk '{ printf "%d_%d_%d", $1, $2, $3 }'` + api_versionstring=`echo $api_revision $api_version $api_subversion | \ + $awk '{ printf "%d_%d_%d", $1, $2, $3 }'` + ;; +*) + version=`echo $revision $patchlevel $subversion | \ + $awk '{ printf "%d.%d.%d", $1, $2, $3 }'` + api_versionstring=`echo $api_revision $api_version $api_subversion | \ + $awk '{ printf "%d.%d.%d", $1, $2, $3 }'` + ;; +esac +: Special case the 5.005_xx maintenance series, which used 5.005 +: without any subversion label as a subdirectory in $sitelib +if test "${api_revision}${api_version}${api_subversion}" = "550"; then + api_versionstring='5.005' +fi + +: Check if quadmath is requested +case "$usequadmath" in +"$define"|true|[yY]*) usequadmath="$define" ;; +*) usequadmath="$undef" ;; +esac + +: Fail if both uselongdouble and usequadmath are requested +case "$usequadmath:$uselongdouble" in +define:define) + $cat <&4 + +*** You requested the use of the quadmath library and use +*** of long doubles. +*** +*** Please select one or the other. +EOM + exit 1 + ;; +esac + +: determine the architecture name +echo " " +if xxx=`./loc arch blurfl $pth`; $test -f "$xxx"; then + tarch=`arch`"-$osname" +elif xxx=`./loc uname blurfl $pth`; $test -f "$xxx" ; then + if uname -m > tmparch 2>&1 ; then + tarch=`$sed -e 's/ *$//' -e 's/ /_/g' \ + -e 's/$/'"-$osname/" tmparch` + else + tarch="$osname" + fi + $rm -f tmparch +else + tarch="$osname" +fi +case "$myarchname" in +''|"$tarch") ;; +*) + echo "(Your architecture name used to be $myarchname.)" + archname='' + ;; +esac +case "$targetarch" in +'') ;; +*) archname=`echo $targetarch|sed 's,^[^-]*-,,'` ;; +esac +myarchname="$tarch" +case "$archname" in +'') dflt="$tarch";; +*) dflt="$archname";; +esac +rp='What is your architecture name' +. ./myread +archname="$ans" : optionally add API version to the architecture for versioned archlibs case "$useversionedarchname" in @@ -7257,7 +7310,7 @@ prefixit='case "$3" in none) eval "tp=\"\$$2\""; case "$tp" in - ""|" ") eval "$1=\"\$$2\"";; + ""|" "|none) eval "$1=\"\$$2\"";; *) eval "$1=";; esac;; esac;; @@ -7616,37 +7669,39 @@ sitelib_stem=`echo "$sitelibexp" | sed "s,/$version$,,"` : Determine list of previous versions to include in @INC $cat > getverlist <> getverlist <<'EOPL' -# The list found is store twice for each entry: the original name, and -# the binary broken down version as pack "sss", so sorting is easy and -# unambiguous. This will work for all versions that have a maximum of -# three digit groups, separate by '.'s or '_'s. Names are extended with -# ".0.0" to ensure at least three elements for the pack. -# -- H.Merijn Brand (m)'06 23-10-2006 - -# Can't have leading @ because metaconfig interprets it as a command! -;@inc_version_list=(); +# The list found is stored twice for each entry: the original name, and +# the binary broken down version into pack "s>s>s>", so sorting is easy +# and unambiguous. This will work for all versions that have a maximum +# of three digit per group separate by '.'s or '_'s. Names are extended +# with ".0.0" to ensure at least three elements for the pack. +# -- H.Merijn Brand (m)'06 23-10-2006 + +my @inc_version_list; +my @candidates; # XXX Redo to do opendir/readdir? if (-d $stem) { chdir($stem); ;@candidates = map { - [ $_, pack "sss", split m/[._]/, "$_.0.0" ] } glob("5.*"); + [ $_, pack "s>s>s>", split m/[._]/, "$_.0.0" ] } glob("5.*"); ;@candidates = sort { $a->[1] cmp $b->[1]} @candidates; } else { ;@candidates = (); } -($pversion, $aversion, $vsn5005) = map { - pack "sss", split m/[._]/, "$_.0.0" } $version, $api_versionstring, "5.005"; -foreach $d (@candidates) { +my ($pversion, $aversion, $vsn5005) = map { + pack "s>s>s>", split m/[._]/, "$_.0.0" } $version, $api_versionstring, "5.005"; +foreach my $d (@candidates) { if ($d->[1] lt $pversion) { if ($d->[1] ge $aversion) { unshift(@inc_version_list, grep { -d } $d->[0]."/$archname", $d->[0]); @@ -7718,36 +7773,6 @@ case "$inc_version_list" in esac $rm -f getverlist -: see if malloc/malloc.h has to be included -set malloc/malloc.h i_mallocmalloc -eval $inhdr - -: see if this is a malloc.h system -: we want a real compile instead of Inhdr because some systems have a -: malloc.h that just gives a compile error saying to use stdlib.h instead -echo " " -$cat >try.c < -#include -#$i_mallocmalloc I_MALLOCMALLOC -#ifdef I_MALLOCMALLOC -# include -#endif - -int main () { return 0; } -EOCP -set try -if eval $compile; then - echo " found." >&4 - val="$define" -else - echo " NOT found." >&4 - val="$undef" -fi -$rm_try -set i_malloc -eval $setvar - : check for length of pointer echo " " case "$ptrsize" in @@ -7806,7 +7831,6 @@ EOM ;; esac - : determine whether to use malloc wrapping echo " " case "$usemallocwrap" in @@ -7870,46 +7894,20 @@ esac : compute the return types of malloc and free echo " " -$cat >malloc.c < -#include -#ifdef I_MALLOC -#include -#endif -#ifdef I_STDLIB -#include -#endif -#ifdef TRY_MALLOC -void *malloc(); -#endif -#ifdef TRY_FREE -void free(); -#endif -END case "$malloctype" in '') - if $cc $ccflags -c -DTRY_MALLOC malloc.c >/dev/null 2>&1; then - malloctype='void *' - else - malloctype='char *' - fi + malloctype='void *' ;; esac echo "Your system wants malloc to return '$malloctype', it would seem." >&4 case "$freetype" in '') - if $cc $ccflags -c -DTRY_FREE malloc.c >/dev/null 2>&1; then - freetype='void' - else - freetype='int' - fi + freetype='void' ;; esac echo "Your system uses $freetype free(), it would seem." >&4 -$rm -f malloc.[co] + : determine where site specific architecture-dependent libraries go. : sitelib default is /usr/local/lib/perl5/site_perl/$version : sitearch default is /usr/local/lib/perl5/site_perl/$version/$archname @@ -8112,6 +8110,10 @@ while $test 1 ; do $define|true|[yY]*) dflt='y' ;; + $undef|false|[nN]*) + dflt='n' + dflt_dtrace="" + ;; ?*) dflt='y' dflt_dtrace=$usedtrace @@ -8548,7 +8550,7 @@ EOM if $test "X$sysroot" != X; then case "$gccversion" in '') ;; - *) dflt="$dflt --sysroot $sysroot" ;; + *) dflt="$dflt --sysroot=$sysroot" ;; esac fi @@ -8775,7 +8777,7 @@ case "$shrpdir" in *) $cat >&4 <$first) 2>/dev/null; then echo 'You cannot have filenames longer than 14 characters. Sigh.' >&4 val="$undef" else - echo 'You can have filenames longer than 14 characters.'>&4 - val="$define" + echo 'You can have filenames longer than 14 characters.'>&4 + val="$define" fi else $cat <<'EOM' @@ -9216,7 +9218,7 @@ case "$myhostname" in $test -s hosts } || { test "X$hostcat" != "X" && - $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ / + $hostcat | $sed -n -e "s/[ ]*#.*//; s/\$/ / /[ ]$myhostname[ . ]/p" > hosts } tmp_re="[ . ]" @@ -9249,7 +9251,7 @@ case "$myhostname" in .) dflt=.`$sed -n -e 's/ / /g' \ -e 's/^domain *\([^ ]*\).*/\1/p' $tans \ -e 1q 2>/dev/null` - ;; + ;; esac fi ;; @@ -9368,9 +9370,7 @@ $cat <&4 @@ -9658,7 +9654,6 @@ esac set usefaststdio eval $setvar - : define an is-a-typedef? function typedef='type=$1; var=$2; def=$3; shift; shift; shift; inclist=$@; case "$inclist" in @@ -9821,8 +9816,8 @@ EOM rp='Try to understand large files, if available?' . ./myread case "$ans" in - y|Y) val="$define" ;; - *) val="$undef" ;; + y|Y) val="$define" ;; + *) val="$undef" ;; esac ;; esac @@ -10063,46 +10058,6 @@ esac prefixvar=vendorscript . ./installprefix -: script used to emit important warnings -cat >warn <msg -else - cat >msg -fi -echo "*** WARNING:" >&4 -sed -e 's/^/*** /' &4 -echo "*** " >&4 -cat msg >>config.msg -echo " " >>config.msg -rm -f msg -EOS -chmod +x warn -$eunicefix warn - -: see which of string.h or strings.h is needed -echo " " -strings=`./findhdr string.h` -if $test "$strings" && $test -r "$strings"; then - echo "Using instead of ." >&4 - val="$define" -else - val="$undef" - strings=`./findhdr strings.h` - if $test "$strings" && $test -r "$strings"; then - echo "Using instead of ." >&4 - else - ./warn "No string header found -- You'll surely have problems." - fi -fi -set i_string -eval $setvar -case "$i_string" in -"$undef") strings=`./findhdr strings.h`;; -*) strings=`./findhdr string.h`;; -esac - : see if qgcvt exists set qgcvt d_qgcvt eval $inlibc @@ -10421,15 +10376,15 @@ esac $cat >>try.c < #endif -#$i_string I_STRING -#ifdef I_STRING -# include -#else -# include -#endif +#include -int checkit(char *expect, char *got) +void checkit(const char *expect, char *got) { if (strcmp(expect, got)) { printf("%s oddity: Expected %s, got %s\n", @@ -10475,6 +10425,15 @@ int checkit(char *expect, char *got) } } +void lencheck(int expect, int got) +{ + if (expect != got) { + printf("%s length mismatch: Expected %d, got %d\n", + myname, expect, got); + exit(1); + } +} + int main() { char buf[64]; @@ -10547,6 +10506,12 @@ int main() else checkit("1e+34", buf); + /* Test for an Ubuntu/Debian bug in gcvt and qgcvt. See: * + * https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1899553 */ + + Gconvert((DOUBLETYPE)0.4, 53, 0, buf); + lencheck(55, (int)strlen(buf)); + /* For Perl, if you add additional tests here, also add them to * t/base/num.t for benefit of platforms not using Configure or * overriding d_Gconvert */ @@ -10615,6 +10580,7 @@ for xxx_convert in $xxx_list; do fi else echo "$xxx_convert NOT found." >&4 + xxx_convert='' fi done @@ -10645,6 +10611,10 @@ $rm_try set fwalk d__fwalk eval $inlibc +: see if accept4 exists +set accept4 d_accept4 +eval $inlibc + : Initialize h_fcntl h_fcntl=false @@ -10771,7 +10741,7 @@ while test $# -ge 2; do shift 2 done cat >> try.c <<'EOCP' -#define _(args) args +#define _(args) args EOCP echo "$foo" >> try.c echo 'int no_real_function_has_this_name _((void)) { return 0; }' >> try.c @@ -10788,6 +10758,7 @@ hasproto='varname=$1; func=$2; shift; shift; while $test $# -ge 2; do case "$1" in $define) echo "#include <$2>";; + literal) echo "$2" ;; esac ; shift 2; done > try.c; @@ -10830,16 +10801,15 @@ set $varname; eval $setvar; $rm_try' -: see if we should include time.h, sys/time.h, or both +: see if we should include sys/time.h echo " " +i_time='define' if test "X$timeincl" = X; then - echo "Testing to see if we should include , or both." >&4 + echo "Testing to see if we should include ." >&4 $echo $n "I'm now running the test program...$c" $cat >try.c < -#ifdef I_TIME #include -#endif #ifdef I_SYSTIME #ifdef SYSTIMEKERNEL #define KERNEL @@ -10876,13 +10846,12 @@ EOCP sysselect='' for s_timeval in '-DS_TIMEVAL' ''; do for i_systimek in '' '-DSYSTIMEKERNEL'; do - for i_time in '' '-DI_TIME'; do for i_systime in '-DI_SYSTIME' ''; do case "$flags" in '') $echo $n ".$c" - set try $i_time $i_systime $i_systimek $sysselect $s_timeval $s_timezone + set try $i_systime $i_systimek $sysselect $s_timeval $s_timezone if eval $compile; then - set X $i_time $i_systime $i_systimek $sysselect $s_timeval + set X $i_systime $i_systimek $sysselect $s_timeval shift flags="$*" echo " " @@ -10894,7 +10863,6 @@ EOCP done done done - done timeincl='' echo " " case "$flags" in @@ -10904,12 +10872,6 @@ EOCP *) i_systimek="$undef";; esac case "$flags" in - *I_TIME*) i_time="$define" - timeincl=`./findhdr time.h`" $timeincl" - echo "We'll include ." >&4;; - *) i_time="$undef";; - esac - case "$flags" in *I_SYSTIME*) i_systime="$define" timeincl=`./findhdr sys/time.h`" $timeincl" echo "We'll include ." >&4;; @@ -10984,7 +10946,7 @@ case "$d_asctime_r" in esac case "$asctime_r_proto" in ''|0) d_asctime_r=undef - asctime_r_proto=0 + asctime_r_proto=0 echo "Disabling asctime_r, cannot determine prototype." >&4 ;; * ) case "$asctime_r_proto" in REENTRANT_PROTO*) ;; @@ -11021,6 +10983,25 @@ eval $inlibc set atoll d_atoll eval $inlibc +: See if a file contains compiler warnings +case "$osname" in + 'aix') + cat >compiler_warning <attrib.c <<'EOCP' void my_special_printf(char* pat,...) __attribute__((__format__(__printf__,1,2))); EOCP if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then - if $contains 'warning' attrib.out >/dev/null 2>&1; then + if $compiler_warning attrib.out >/dev/null 2>&1; then echo "Your C compiler doesn't support __attribute__((format))." val="$undef" else @@ -11061,14 +11042,21 @@ $cat >attrib.c < #endif +#$i_inttypes I_INTTYPES +#ifdef I_INTTYPES +#include +#endif +#ifndef INTPTR_MAX +#define intptr_t int +#endif int null_printf (char* pat,...) __attribute__((__format__(__printf__,1,2))); -int null_printf (char* pat,...) { return (int)pat; } +int null_printf (char* pat,...) { return (int)(intptr_t)pat; } int main () { exit(null_printf(NULL)); } EOCP if $cc $ccflags -o attrib attrib.c >attrib.out 2>&1 ; then : run the executable in case it produces a run-time warning if $run ./attrib >>attrib.out 2>&1; then - if $contains 'warning' attrib.out >/dev/null 2>&1; then + if $compiler_warning attrib.out >/dev/null 2>&1; then echo "Your C compiler doesn't allow __printf__ format to be null." val="$undef" else @@ -11103,7 +11091,7 @@ $cat >attrib.c <<'EOCP' char *go_get_some_memory( int how_many_bytes ) __attribute__((malloc)); EOCP if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then - if $contains 'warning' attrib.out >/dev/null 2>&1; then + if $compiler_warning attrib.out >/dev/null 2>&1; then echo "Your C compiler doesn't support __attribute__((malloc))." val="$undef" else @@ -11131,7 +11119,7 @@ $cat >attrib.c <<'EOCP' void do_something (char *some_pointer,...) __attribute__((nonnull(1))); EOCP if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then - if $contains 'warning' attrib.out >/dev/null 2>&1; then + if $compiler_warning attrib.out >/dev/null 2>&1; then echo "Your C compiler doesn't support __attribute__((nonnull))." val="$undef" else @@ -11159,7 +11147,7 @@ $cat >attrib.c <<'EOCP' void fall_over_dead( void ) __attribute__((noreturn)); EOCP if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then - if $contains 'warning' attrib.out >/dev/null 2>&1; then + if $compiler_warning attrib.out >/dev/null 2>&1; then echo "Your C compiler doesn't support __attribute__((noreturn))." val="$undef" else @@ -11187,7 +11175,7 @@ $cat >attrib.c <<'EOCP' int square( int n ) __attribute__((pure)); EOCP if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then - if $contains 'warning' attrib.out >/dev/null 2>&1; then + if $compiler_warning attrib.out >/dev/null 2>&1; then echo "Your C compiler doesn't support __attribute__((pure))." val="$undef" else @@ -11215,7 +11203,7 @@ $cat >attrib.c <<'EOCP' int do_something( int dummy __attribute__((unused)), int n ); EOCP if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then - if $contains 'warning' attrib.out >/dev/null 2>&1; then + if $compiler_warning attrib.out >/dev/null 2>&1; then echo "Your C compiler doesn't support __attribute__((unused))." val="$undef" else @@ -11243,7 +11231,7 @@ $cat >attrib.c <<'EOCP' int I_am_deprecated(void) __attribute__((deprecated)); EOCP if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then - if $contains 'warning' attrib.out >/dev/null 2>&1; then + if $compiler_warning attrib.out >/dev/null 2>&1; then echo "Your C compiler doesn't support __attribute__((deprecated))." val="$undef" else @@ -11271,7 +11259,7 @@ $cat >attrib.c <<'EOCP' int I_will_not_be_ignored(void) __attribute__((warn_unused_result)); EOCP if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then - if $contains 'warning' attrib.out >/dev/null 2>&1; then + if $compiler_warning attrib.out >/dev/null 2>&1; then echo "Your C compiler doesn't support __attribute__((warn_unused_result))." val="$undef" else @@ -11289,6 +11277,62 @@ set d_attribute_warn_unused_result eval $setvar $rm -f attrib* +: Look for GCC-style attribute always_inline +case "$d_attribute_always_inline" in +'') +echo " " +echo "Checking whether your compiler can handle __attribute__((always_inline)) ..." >&4 +$cat >attrib.c <<'EOCP' +#include +static __inline__ __attribute__((always_inline)) int I_will_always_be_inlined(void); +EOCP +if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then + if $compiler_warning attrib.out >/dev/null 2>&1; then + echo "Your C compiler doesn't support __attribute__((always_inline))." + val="$undef" + else + echo "Your C compiler supports __attribute__((always_inline))." + val="$define" + fi +else + echo "Your C compiler doesn't seem to understand __attribute__ at all." + val="$undef" +fi +;; +*) val="$d_attribute_always_inline" ;; +esac +set d_attribute_always_inline +eval $setvar +$rm -f attrib* + +: Look for GCC-style attribute visibility +case "$d_attribute_visibility" in +'') +echo " " +echo "Checking whether your compiler can handle __attribute__((visibility)) ..." >&4 +$cat >attrib.c <<'EOCP' +#include +__attribute__((visibility("hidden"))) int I_will_be_hidden(void); +EOCP +if $cc $ccflags -c attrib.c >attrib.out 2>&1 ; then + if $compiler_warning attrib.out >/dev/null 2>&1; then + echo "Your C compiler doesn't support __attribute__((visibility))." + val="$undef" + else + echo "Your C compiler supports __attribute__((visibility))." + val="$define" + fi +else + echo "Your C compiler doesn't seem to understand __attribute__ at all." + val="$undef" +fi +;; +*) val="$d_attribute_visibility" ;; +esac +set d_attribute_visibility +eval $setvar +$rm -f attrib* + : see if getpgrp exists set getpgrp d_getpgrp eval $inlibc @@ -11298,6 +11342,7 @@ case "$d_getpgrp" in echo " " echo "Checking to see which flavor of getpgrp is in use..." $cat >try.c < #$i_unistd I_UNISTD #include #ifdef I_UNISTD @@ -11364,6 +11409,7 @@ case "$d_setpgrp" in echo " " echo "Checking to see which flavor of setpgrp is in use..." $cat >try.c < #$i_unistd I_UNISTD #include #ifdef I_UNISTD @@ -11946,7 +11992,6 @@ set socketpair d_sockpair eval $inlibc -echo " " echo "Checking the availability sa_len in the sock struct ..." >&4 $cat >try.c < @@ -11963,7 +12008,6 @@ fi set d_sockaddr_sa_len; eval $setvar $rm_try -echo " " echo "Checking the availability struct sockaddr_in6 ..." >&4 $cat >try.c < @@ -11981,7 +12025,23 @@ fi set d_sockaddr_in6; eval $setvar $rm_try -echo " " +echo "Checking the availability struct sockaddr_storage ..." >&4 +$cat >try.c < +#include +#include +int main() { +struct sockaddr_storage sastor; +return (sastor.ss_family); +} +EOF +val="$undef" +set try; if eval $compile; then + val="$define" +fi +set d_sockaddr_storage; eval $setvar +$rm_try + echo "Checking the availability sin6_scope_id in struct sockaddr_in6 ..." >&4 $cat >try.c < @@ -11999,7 +12059,6 @@ fi set d_sin6_scope_id; eval $setvar $rm_try -echo " " echo "Checking the availability struct ip_mreq ..." >&4 $cat >try.c < @@ -12017,7 +12076,6 @@ fi set d_ip_mreq; eval $setvar $rm_try -echo " " echo "Checking the availability struct ip_mreq_source ..." >&4 $cat >try.c < @@ -12035,7 +12093,6 @@ fi set d_ip_mreq_source; eval $setvar $rm_try -echo " " echo "Checking the availability struct ipv6_mreq ..." >&4 $cat >try.c < @@ -12053,7 +12110,6 @@ fi set d_ipv6_mreq; eval $setvar $rm_try -echo " " echo "Checking the availability struct ipv6_mreq_source ..." >&4 $cat >try.c < @@ -12071,7 +12127,6 @@ fi set d_ipv6_mreq_source; eval $setvar $rm_try -echo " " echo "Checking the availability of certain socket constants..." >&4 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'` @@ -12104,31 +12159,9 @@ case "$d_cmsghdr_s" in *) echo "No, it doesn't." ;; esac - -: check for const keyword -echo " " -echo 'Checking to see if your C compiler knows about "const"...' >&4 -$cat >const.c <<'EOCP' -typedef struct spug { int drokk; } spug; -int main() -{ - const char *foo; - const spug y = { 0 }; -} -EOCP -if $cc -c $ccflags const.c >/dev/null 2>&1 ; then - val="$define" - echo "Yup, it does." -else - val="$undef" - echo "Nope, it doesn't." -fi -set d_const -eval $setvar - -: see if copysign exists -set copysign d_copysign -eval $inlibc +: see if copysign exists +set copysign d_copysign +eval $inlibc : see if copysignl exists set copysignl d_copysignl @@ -12201,7 +12234,7 @@ case "$d_crypt_r" in esac case "$crypt_r_proto" in ''|0) d_crypt_r=undef - crypt_r_proto=0 + crypt_r_proto=0 echo "Disabling crypt_r, cannot determine prototype." >&4 ;; * ) case "$crypt_r_proto" in REENTRANT_PROTO*) ;; @@ -12258,7 +12291,7 @@ case "$d_ctermid_r" in esac case "$ctermid_r_proto" in ''|0) d_ctermid_r=undef - ctermid_r_proto=0 + ctermid_r_proto=0 echo "Disabling ctermid_r, cannot determine prototype." >&4 ;; * ) case "$ctermid_r_proto" in REENTRANT_PROTO*) ;; @@ -12311,7 +12344,7 @@ case "$d_ctime_r" in esac case "$ctime_r_proto" in ''|0) d_ctime_r=undef - ctime_r_proto=0 + ctime_r_proto=0 echo "Disabling ctime_r, cannot determine prototype." >&4 ;; * ) case "$ctime_r_proto" in REENTRANT_PROTO*) ;; @@ -12336,37 +12369,6 @@ esac set cuserid d_cuserid eval $inlibc -: see if this is a limits.h system -set limits.h i_limits -eval $inhdr - -: See if number of significant digits in a double precision number is known -echo " " -$cat >dbl_dig.c < -#endif -#ifdef I_FLOAT -#include -#endif -#ifdef DBL_DIG -printf("Contains DBL_DIG"); -#endif -EOM -$cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null -if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then - echo "DBL_DIG found." >&4 - val="$define" -else - echo "DBL_DIG NOT found." >&4 - val="$undef" -fi -$rm -f dbl_dig.? -set d_dbl_dig -eval $setvar - : see if dbm.h is available : see if dbmclose exists set dbmclose d_dbmclose @@ -12539,14 +12541,10 @@ $cat >dirfd.c < #else #ifdef I_SYS_DIR -#ifdef hp9000s500 -#include /* may be wrong in the future */ -#else #include #endif #endif #endif -#endif int main() { DIR *dirp = opendir("."); if (dirfd(dirp) >= 0) @@ -12614,7 +12612,7 @@ case "$dlsrc" in dl_dlopen.xs) echo "Checking whether your dlsym() needs a leading underscore ..." >&4 $cat >dyna.c <<'EOM' -fred () { } +void fred (void) { } EOM $cat >fred.c<fred.c< #endif -extern int fred() ; +extern void fred(void) ; int main() { @@ -12714,7 +12712,7 @@ case "$d_drand48_r" in esac case "$drand48_r_proto" in ''|0) d_drand48_r=undef - drand48_r_proto=0 + drand48_r_proto=0 echo "Disabling drand48_r, cannot determine prototype." >&4 ;; * ) case "$drand48_r_proto" in REENTRANT_PROTO*) ;; @@ -12744,6 +12742,86 @@ eval $hasproto set dup2 d_dup2 eval $inlibc +: see if dup3 exists +set dup3 d_dup3 +eval $inlibc + +: see if localeconv_l exists +set localeconv_l d_localeconv_l +eval $inlibc + +: see if this is an xlocale.h system +set xlocale.h i_xlocale +eval $inhdr + +: see if newlocale exists +set newlocale d_newlocale +eval $inlibc + +: see if freelocale exists +set freelocale d_freelocale +eval $inlibc + +: see if uselocale exists +set uselocale d_uselocale +eval $inlibc + +: see if duplocale exists +set duplocale d_duplocale +eval $inlibc + +: see if querylocale exists +set querylocale d_querylocale +eval $inlibc + +: if we have xlocale.h, check whether it is needed +case "$i_xlocale$d_newlocale$xlocale_needed" in +"$define$define") + echo "Checking if xlocale.h is needed..." >&4 + $cat >try.c < +#include +#ifdef TRY_XLOCALE +#include +#endif +#$d_localeconv_l HAVE_LOCALECONV_L + +#ifdef HAVE_LOCALECONV_L +struct lconv *(*lcptr)(locale_t) = localeconv_l; +#endif + +int main(void) { + locale_t lc = newlocale(LC_ALL_MASK, "C", (locale_t)0); + +#ifdef HAVE_LOCALECONV_L + /* FreeBSD hides only localeconv_l() in xlocale.h */ + struct lconv *lcbuf = localeconv_l(lc); + printf("decimal: %s\n", lcbuf->decimal_point); +#endif + + freelocale(lc); + return 0; +} +EOF + set try + if eval $compile && $run ./try > /dev/null 2>&1 ; then + echo "xlocale.h isn't needed" >&4 + xlocale_needed=$undef + else + set try -DTRY_XLOCALE + if eval $compile && $run ./try > /dev/null 2>&1 ; then + xlocale_needed=$define + echo "xlocale.h is needed" >&4 + else + echo "I can't build my test either way" >&4 + xlocale_needed=$undef + fi + fi + $rm_try + ;; +*) xlocale_needed=$undef ;; +esac + : see if eaccess exists set eaccess d_eaccess eval $inlibc @@ -12801,7 +12879,7 @@ case "$d_endgrent_r" in esac case "$endgrent_r_proto" in ''|0) d_endgrent_r=undef - endgrent_r_proto=0 + endgrent_r_proto=0 echo "Disabling endgrent_r, cannot determine prototype." >&4 ;; * ) case "$endgrent_r_proto" in REENTRANT_PROTO*) ;; @@ -12854,7 +12932,7 @@ case "$d_endhostent_r" in esac case "$endhostent_r_proto" in ''|0) d_endhostent_r=undef - endhostent_r_proto=0 + endhostent_r_proto=0 echo "Disabling endhostent_r, cannot determine prototype." >&4 ;; * ) case "$endhostent_r_proto" in REENTRANT_PROTO*) ;; @@ -12903,7 +12981,7 @@ case "$d_endnetent_r" in esac case "$endnetent_r_proto" in ''|0) d_endnetent_r=undef - endnetent_r_proto=0 + endnetent_r_proto=0 echo "Disabling endnetent_r, cannot determine prototype." >&4 ;; * ) case "$endnetent_r_proto" in REENTRANT_PROTO*) ;; @@ -12952,7 +13030,7 @@ case "$d_endprotoent_r" in esac case "$endprotoent_r_proto" in ''|0) d_endprotoent_r=undef - endprotoent_r_proto=0 + endprotoent_r_proto=0 echo "Disabling endprotoent_r, cannot determine prototype." >&4 ;; * ) case "$endprotoent_r_proto" in REENTRANT_PROTO*) ;; @@ -13089,7 +13167,7 @@ case "$d_endpwent_r" in esac case "$endpwent_r_proto" in ''|0) d_endpwent_r=undef - endpwent_r_proto=0 + endpwent_r_proto=0 echo "Disabling endpwent_r, cannot determine prototype." >&4 ;; * ) case "$endpwent_r_proto" in REENTRANT_PROTO*) ;; @@ -13138,7 +13216,7 @@ case "$d_endservent_r" in esac case "$endservent_r_proto" in ''|0) d_endservent_r=undef - endservent_r_proto=0 + endservent_r_proto=0 echo "Disabling endservent_r, cannot determine prototype." >&4 ;; * ) case "$endservent_r_proto" in REENTRANT_PROTO*) ;; @@ -13358,12 +13436,7 @@ extern int errno; #ifdef I_UNISTD #include #endif -#$i_string I_STRING -#ifdef I_STRING #include -#else -#include -#endif $signal_t blech(int x) { exit(3); } EOCP $cat >> try.c <<'EOCP' @@ -13592,6 +13665,7 @@ $cat >try.c < #endif +#include #define FILE_ptr(fp) $stdio_ptr #define FILE_cnt(fp) $stdio_cnt int main() { @@ -13729,7 +13803,7 @@ int main() { EOP set try if eval $compile && $to try.c; then - case `$run ./try` in + case `$run ./try` in Pass_changed) echo "Increasing ptr in your stdio decreases cnt by the same amount. Good." >&4 d_stdio_ptr_lval_sets_cnt="$define" ;; @@ -13794,7 +13868,7 @@ case "$d_stdstdio:$d_stdio_ptr_lval" in "$define:$define") case "$d_stdio_cnt_lval$d_stdio_ptr_lval_sets_cnt" in *$define*) - echo "You seem to have 'fast stdio' to directly manipulate the stdio buffers." >& 4 + echo "You seem to have 'fast stdio' to directly manipulate the stdio buffers." >&4 val="$define" ;; esac @@ -13803,8 +13877,6 @@ esac set d_faststdio eval $setvar - - : see if fchdir exists set fchdir d_fchdir eval $inlibc @@ -13993,6 +14065,13 @@ eval $inlibc set fegetround d_fegetround eval $inlibc +: see if ffs exists +set ffs d_ffs +eval $inlibc +: see if ffsl exists +set ffsl d_ffsl +eval $inlibc + : see if fgetpos exists set fgetpos d_fgetpos eval $inlibc @@ -14030,17 +14109,10 @@ eval $inlibc set fp_class d_fp_class eval $inlibc -: see if this is a math.h system -set math.h i_math -eval $inhdr - : check for fpclassify echo "Checking to see if you have fpclassify..." >&4 $cat >try.c < -#endif int main() { return fpclassify(1.0) == FP_NORMAL ? 0 : 1; } EOCP set try @@ -14105,30 +14177,6 @@ $rm_try set d_fpos64_t eval $setvar -: see if this is an xlocale.h system -set xlocale.h i_xlocale -eval $inhdr - -: see if newlocale exists -set newlocale d_newlocale -eval $inlibc - -: see if freelocale exists -set freelocale d_freelocale -eval $inlibc - -: see if uselocale exists -set uselocale d_uselocale -eval $inlibc - -: see if duplocale exists -set duplocale d_duplocale -eval $inlibc - -: see if querylocale exists -set querylocale d_querylocale -eval $inlibc - : see if frexpl exists set frexpl d_frexpl eval $inlibc @@ -14174,7 +14222,6 @@ eval $inlibc set fstatvfs d_fstatvfs eval $inlibc - : see if fsync exists set fsync d_fsync eval $inlibc @@ -14192,9 +14239,11 @@ echo " " echo "Checking if you have a working futimes()" >&4 $cat >try.c < +#include #include #include #include +#include int main () { @@ -14311,6 +14360,86 @@ eval $inlibc set getcwd d_getcwd eval $inlibc +: check for getenv behavior +case "$d_getenv_preserves_other_thread" in +'') +$echo "Checking to see if getenv() preserves a different thread's results" >&4 +$cat >try.c < +#endif +#include +#include +#$i_pthread I_PTHREAD +#ifdef I_PTHREAD +# include +#endif + +void * +thread_start(void * arg) +{ + return (void *) getenv("HOME"); +} + +int main() { + char * main_buffer; + char save_main_buffer[1000]; + pthread_t subthread; + pthread_attr_t attr; + + main_buffer = getenv("PATH"); + + /* If too large for our generous allowance, return we couldn't figure it + * out. */ + if (strlen(main_buffer) >= sizeof(save_main_buffer)) { + exit(2); + } + + strcpy(save_main_buffer, main_buffer); + + if (pthread_attr_init(&attr) != 0) { + exit(2); + } + + if (pthread_create(&subthread, &attr, thread_start, NULL) != 0) { + exit(2); + } + + if (pthread_join(subthread, NULL) != 0) { + exit(2); + } + + exit(! (strcmp(main_buffer, save_main_buffer) == 0)); +} +EOCP +val= +set try +if eval $compile_ok; then + $run ./try + rc=$? + case "$rc" in + 0) echo "getenv() didn't destroy another thread's buffer" >&4 + val=$define + ;; + 1) echo "getenv() does destroy another thread's buffer" >&4 + val=$undef + ;; + *) echo "Couldn't determine if getenv() destroys another thread's return value (code=$rc); assuming it does" >&4 + val=$undef + ;; + esac +else + echo "(I can't seem to compile the test program.)" >&4 + echo "Assuming that your C library's getenv destroys another thread's return value." >&4 + val=$undef +fi +set d_getenv_preserves_other_thread +eval $setvar +$rm_try +;; +esac + : see if getespwnam exists set getespwnam d_getespwnam eval $inlibc @@ -14363,7 +14492,7 @@ case "$d_getgrent_r" in esac case "$getgrent_r_proto" in ''|0) d_getgrent_r=undef - getgrent_r_proto=0 + getgrent_r_proto=0 echo "Disabling getgrent_r, cannot determine prototype." >&4 ;; * ) case "$getgrent_r_proto" in REENTRANT_PROTO*) ;; @@ -14416,7 +14545,7 @@ case "$d_getgrgid_r" in esac case "$getgrgid_r_proto" in ''|0) d_getgrgid_r=undef - getgrgid_r_proto=0 + getgrgid_r_proto=0 echo "Disabling getgrgid_r, cannot determine prototype." >&4 ;; * ) case "$getgrgid_r_proto" in REENTRANT_PROTO*) ;; @@ -14473,7 +14602,7 @@ case "$d_getgrnam_r" in esac case "$getgrnam_r_proto" in ''|0) d_getgrnam_r=undef - getgrnam_r_proto=0 + getgrnam_r_proto=0 echo "Disabling getgrnam_r, cannot determine prototype." >&4 ;; * ) case "$getgrnam_r_proto" in REENTRANT_PROTO*) ;; @@ -14651,7 +14780,7 @@ case "$d_gethostbyaddr_r" in esac case "$gethostbyaddr_r_proto" in ''|0) d_gethostbyaddr_r=undef - gethostbyaddr_r_proto=0 + gethostbyaddr_r_proto=0 echo "Disabling gethostbyaddr_r, cannot determine prototype." >&4 ;; * ) case "$gethostbyaddr_r_proto" in REENTRANT_PROTO*) ;; @@ -14700,7 +14829,7 @@ case "$d_gethostbyname_r" in esac case "$gethostbyname_r_proto" in ''|0) d_gethostbyname_r=undef - gethostbyname_r_proto=0 + gethostbyname_r_proto=0 echo "Disabling gethostbyname_r, cannot determine prototype." >&4 ;; * ) case "$gethostbyname_r_proto" in REENTRANT_PROTO*) ;; @@ -14761,7 +14890,7 @@ case "$d_gethostent_r" in esac case "$gethostent_r_proto" in ''|0) d_gethostent_r=undef - gethostent_r_proto=0 + gethostent_r_proto=0 echo "Disabling gethostent_r, cannot determine prototype." >&4 ;; * ) case "$gethostent_r_proto" in REENTRANT_PROTO*) ;; @@ -14827,7 +14956,7 @@ case "$d_getlogin_r" in esac case "$getlogin_r_proto" in ''|0) d_getlogin_r=undef - getlogin_r_proto=0 + getlogin_r_proto=0 echo "Disabling getlogin_r, cannot determine prototype." >&4 ;; * ) case "$getlogin_r_proto" in REENTRANT_PROTO*) ;; @@ -14920,7 +15049,7 @@ case "$d_getnetbyaddr_r" in esac case "$getnetbyaddr_r_proto" in ''|0) d_getnetbyaddr_r=undef - getnetbyaddr_r_proto=0 + getnetbyaddr_r_proto=0 echo "Disabling getnetbyaddr_r, cannot determine prototype." >&4 ;; * ) case "$getnetbyaddr_r_proto" in REENTRANT_PROTO*) ;; @@ -14973,7 +15102,7 @@ case "$d_getnetbyname_r" in esac case "$getnetbyname_r_proto" in ''|0) d_getnetbyname_r=undef - getnetbyname_r_proto=0 + getnetbyname_r_proto=0 echo "Disabling getnetbyname_r, cannot determine prototype." >&4 ;; * ) case "$getnetbyname_r_proto" in REENTRANT_PROTO*) ;; @@ -15034,7 +15163,7 @@ case "$d_getnetent_r" in esac case "$getnetent_r_proto" in ''|0) d_getnetent_r=undef - getnetent_r_proto=0 + getnetent_r_proto=0 echo "Disabling getnetent_r, cannot determine prototype." >&4 ;; * ) case "$getnetent_r_proto" in REENTRANT_PROTO*) ;; @@ -15122,7 +15251,7 @@ case "$d_getprotobyname_r" in esac case "$getprotobyname_r_proto" in ''|0) d_getprotobyname_r=undef - getprotobyname_r_proto=0 + getprotobyname_r_proto=0 echo "Disabling getprotobyname_r, cannot determine prototype." >&4 ;; * ) case "$getprotobyname_r_proto" in REENTRANT_PROTO*) ;; @@ -15171,7 +15300,7 @@ case "$d_getprotobynumber_r" in esac case "$getprotobynumber_r_proto" in ''|0) d_getprotobynumber_r=undef - getprotobynumber_r_proto=0 + getprotobynumber_r_proto=0 echo "Disabling getprotobynumber_r, cannot determine prototype." >&4 ;; * ) case "$getprotobynumber_r_proto" in REENTRANT_PROTO*) ;; @@ -15224,7 +15353,7 @@ case "$d_getprotoent_r" in esac case "$getprotoent_r_proto" in ''|0) d_getprotoent_r=undef - getprotoent_r_proto=0 + getprotoent_r_proto=0 echo "Disabling getprotoent_r, cannot determine prototype." >&4 ;; * ) case "$getprotoent_r_proto" in REENTRANT_PROTO*) ;; @@ -15298,7 +15427,7 @@ case "$d_getpwent_r" in esac case "$getpwent_r_proto" in ''|0) d_getpwent_r=undef - getpwent_r_proto=0 + getpwent_r_proto=0 echo "Disabling getpwent_r, cannot determine prototype." >&4 ;; * ) case "$getpwent_r_proto" in REENTRANT_PROTO*) ;; @@ -15351,7 +15480,7 @@ case "$d_getpwnam_r" in esac case "$getpwnam_r_proto" in ''|0) d_getpwnam_r=undef - getpwnam_r_proto=0 + getpwnam_r_proto=0 echo "Disabling getpwnam_r, cannot determine prototype." >&4 ;; * ) case "$getpwnam_r_proto" in REENTRANT_PROTO*) ;; @@ -15404,7 +15533,7 @@ case "$d_getpwuid_r" in esac case "$getpwuid_r_proto" in ''|0) d_getpwuid_r=undef - getpwuid_r_proto=0 + getpwuid_r_proto=0 echo "Disabling getpwuid_r, cannot determine prototype." >&4 ;; * ) case "$getpwuid_r_proto" in REENTRANT_PROTO*) ;; @@ -15467,7 +15596,7 @@ case "$d_getservbyname_r" in esac case "$getservbyname_r_proto" in ''|0) d_getservbyname_r=undef - getservbyname_r_proto=0 + getservbyname_r_proto=0 echo "Disabling getservbyname_r, cannot determine prototype." >&4 ;; * ) case "$getservbyname_r_proto" in REENTRANT_PROTO*) ;; @@ -15516,7 +15645,7 @@ case "$d_getservbyport_r" in esac case "$getservbyport_r_proto" in ''|0) d_getservbyport_r=undef - getservbyport_r_proto=0 + getservbyport_r_proto=0 echo "Disabling getservbyport_r, cannot determine prototype." >&4 ;; * ) case "$getservbyport_r_proto" in REENTRANT_PROTO*) ;; @@ -15569,7 +15698,7 @@ case "$d_getservent_r" in esac case "$getservent_r_proto" in ''|0) d_getservent_r=undef - getservent_r_proto=0 + getservent_r_proto=0 echo "Disabling getservent_r, cannot determine prototype." >&4 ;; * ) case "$getservent_r_proto" in REENTRANT_PROTO*) ;; @@ -15627,7 +15756,7 @@ case "$d_getspnam_r" in esac case "$getspnam_r_proto" in ''|0) d_getspnam_r=undef - getspnam_r_proto=0 + getspnam_r_proto=0 echo "Disabling getspnam_r, cannot determine prototype." >&4 ;; * ) case "$getspnam_r_proto" in REENTRANT_PROTO*) ;; @@ -15691,7 +15820,7 @@ case "$d_gmtime_r" in esac case "$gmtime_r_proto" in ''|0) d_gmtime_r=undef - gmtime_r_proto=0 + gmtime_r_proto=0 echo "Disabling gmtime_r, cannot determine prototype." >&4 ;; * ) case "$gmtime_r_proto" in REENTRANT_PROTO*) ;; @@ -15842,10 +15971,7 @@ $rm -f isblank* : check for isfinite echo "Checking to see if you have isfinite..." >&4 $cat >try.c < -#endif int main() { return isfinite(0.0); } EOCP set try @@ -15867,10 +15993,7 @@ eval $inlibc : check for isinf echo "Checking to see if you have isinf..." >&4 $cat >try.c < -#endif int main() { return isinf(0.0); } EOCP set try @@ -15892,11 +16015,8 @@ eval $inlibc : check for isless echo "Checking to see if you have isless..." >&4 $cat >try.c < -#endif -int main() { return isless(0.0); } +int main() { return isless(2.0, 1.0); } EOCP set try if eval $compile; then @@ -15913,10 +16033,7 @@ eval $setvar : check for isnan echo "Checking to see if you have isnan..." >&4 $cat >try.c < -#endif int main() { return isnan(0.0); } EOCP set try @@ -15938,10 +16055,7 @@ eval $inlibc : check for isnormal echo "Checking to see if you have isnormal..." >&4 $cat >try.c < -#endif int main() { return isnormal(0.0); } EOCP set try @@ -15991,31 +16105,30 @@ EOCP fi; $rm_try ;; +*) d_lc_monetary_2008="$undef" + ;; esac : see if lchown exists echo " " -$cat > try.c <<'EOCP' -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char lchown(); below. */ -#include -/* Override any gcc2 internal prototype to avoid an error. */ -/* We use char because int might match the return type of a gcc2 - builtin and then its argument prototype would still apply. */ -char lchown(); -int main() { - /* The GNU C library defines this for functions which it implements - to always fail with ENOSYS. Some functions are actually named - something starting with __ and the normal name is an alias. */ -#if defined (__stub_lchown) || defined (__stub___lchown) -choke me -#else -lchown(); +$cat > try.c < +#include +#include +#$i_unistd I_UNISTD +#ifdef I_UNISTD +# include #endif -; return 0; } +int main(int argc, char *argv[]) +{ + if (lchown("./try.c", -1, getgid()) == -1) { + exit(EXIT_FAILURE); + } + exit(EXIT_SUCCESS); +} EOCP set try -if eval $compile; then +if eval $compile && ./try; then $echo "lchown() found." >&4 val="$define" else @@ -16024,18 +16137,13 @@ else fi set d_lchown eval $setvar +$rm_try : See if number of significant digits in a double precision number is known echo " " $cat >ldbl_dig.c < -#endif -#ifdef I_FLOAT #include -#endif #ifdef LDBL_DIG printf("Contains LDBL_DIG"); #endif @@ -16062,31 +16170,27 @@ eval $inlibc : check to see if math.h defines _LIB_VERSION d_libm_lib_version="$undef" -case $i_math in - $define) - echo " " - echo "Checking to see if your libm supports _LIB_VERSION..." >&4 - $cat >try.c <&4 +$cat >try.c < #include +#include int main (int argc, char *argv[]) { printf ("%d\n", _LIB_VERSION); return (0); } /* main */ EOCP - set try - if eval $compile; then - foo=`$run ./try` - echo "Yes, it does ($foo)" >&4 - d_libm_lib_version="$define" - else - echo "No, it does not (probably harmless)" >&4 - fi - $rm_try - ;; - - esac +set try +if eval $compile; then + foo=`$run ./try` + echo "Yes, it does ($foo)" >&4 + d_libm_lib_version="$define" +else + echo "No, it does not (probably harmless)" >&4 + fi +$rm_try : see if link exists set link d_link @@ -16108,12 +16212,38 @@ eval $inlibc set llroundl d_llroundl eval $inlibc -: see if localeconv_l exists -set localeconv_l d_localeconv_l -eval $inlibc +: see if malloc/malloc.h has to be included +set malloc/malloc.h i_mallocmalloc +eval $inhdr -: see if localtime_r exists -set localtime_r d_localtime_r +: see if this is a malloc.h system +: we want a real compile instead of Inhdr because some systems have a +: malloc.h that just gives a compile error saying to use stdlib.h instead +echo " " +$cat >try.c < +#include +#$i_mallocmalloc I_MALLOCMALLOC +#ifdef I_MALLOCMALLOC +# include +#endif + +int main () { return 0; } +EOCP +set try +if eval $compile; then + echo " found." >&4 + val="$define" +else + echo " NOT found." >&4 + val="$undef" +fi +$rm_try +set i_malloc +eval $setvar + +: see if localtime_r exists +set localtime_r d_localtime_r eval $inlibc case "$d_localtime_r" in "$define") @@ -16136,7 +16266,7 @@ case "$d_localtime_r" in esac case "$localtime_r_proto" in ''|0) d_localtime_r=undef - localtime_r_proto=0 + localtime_r_proto=0 echo "Disabling localtime_r, cannot determine prototype." >&4 ;; * ) case "$localtime_r_proto" in REENTRANT_PROTO*) ;; @@ -16168,7 +16298,6 @@ REENTRANT_PROTO*) #$i_unistd I_UNISTD #$i_time I_TIME #$i_stdlib I_STDLIB -#$i_string I_STRING #$i_malloc I_MALLOC #ifdef I_SYS_TYPES # include @@ -16182,16 +16311,13 @@ REENTRANT_PROTO*) #ifdef I_STDLIB #include #endif -#ifdef I_STRING -# include -#else -# include -#endif +#include #ifdef I_MALLOC # include #endif int main() { + int result = 0; time_t t = time(0L); char w_tz[]="TZ" "=GMT+5", e_tz[]="TZ" "=GMT-5", @@ -16210,8 +16336,10 @@ int main() localtime_r(&t, &tm_w); if( memcmp(&tm_e, &tm_w, sizeof(struct tm)) == 0 ) - return 1; - return 0; + result = 1; + + free(tz_e);free(tz_w); + return result; } EOCP set try @@ -16284,6 +16412,10 @@ eval $inlibc set malloc_good_size d_malloc_good_size eval $inlibc +: see if malloc_usable_size exists +set malloc_usable_size d_malloc_usable_size +eval $inlibc + : see if mblen exists set mblen d_mblen eval $inlibc @@ -16305,12 +16437,46 @@ set mbtowc d_mbtowc eval $inlibc : see if memmem exists -set memmem d_memmem -eval $inlibc +: We need both a prototype in string.h and the symbol in libc. +echo " " +d_memmem_proto='' +xx1="#$d_gnulibc HAS_GNULIBC" +xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)' +xx3='# define _GNU_SOURCE' +xx4='#endif' +set d_memmem_proto memmem literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h +eval $hasproto +case "$d_memmem_proto" in + define) # see if memmem exists + set memmem d_memmem + eval $inlibc + ;; + *) val=$undef + set d_memmem + eval $setvar + ;; +esac : see if memrchr exists -set memrchr d_memrchr -eval $inlibc +: We need both a prototype in string.h and the symbol in libc. +echo " " +d_memrchr_proto='' +xx1="#$d_gnulibc HAS_GNULIBC" +xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)' +xx3='# define _GNU_SOURCE' +xx4='#endif' +set d_memrchr_proto memrchr literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h +eval $hasproto +case "$d_memrchr_proto" in + define) # see if memrchr exists + set memrchr d_memrchr + eval $inlibc + ;; + *) val=$undef + set d_memrchr + eval $setvar + ;; +esac : see if mkdir exists set mkdir d_mkdir @@ -16324,6 +16490,10 @@ eval $inlibc set mkfifo d_mkfifo eval $inlibc +: see if mkostemp exists +set mkostemp d_mkostemp +eval $inlibc + : see if mkstemp exists set mkstemp d_mkstemp eval $inlibc @@ -16336,7 +16506,7 @@ eval $inlibc set mktime d_mktime eval $inlibc -: see if this is a sys/mman.h system +: see if sys/mman.h has to be included set sys/mman.h i_sysmman eval $inhdr @@ -16361,8 +16531,6 @@ END ;; esac - - : see if sqrtl exists set sqrtl d_sqrtl eval $inlibc @@ -16381,7 +16549,7 @@ eval $inlibc : see if prototype for modfl is available echo " " -set d_modflproto modfl $i_math math.h +set d_modflproto modfl define math.h eval $hasproto if $test "$uselongdouble" = "$define"; then @@ -16492,7 +16660,6 @@ case "$d_msghdr_s" in *) echo "No, it doesn't." ;; esac - : see if msync exists set msync d_msync eval $inlibc @@ -16529,9 +16696,42 @@ eval $inlibc set langinfo.h i_langinfo eval $inhdr -: see if nl_langinfo exists +: see if nl_langinfo and/or nl_langinfo_l exist set nl_langinfo d_nl_langinfo eval $inlibc +set nl_langinfo_l d_nl_langinfo_l +eval $inlibc + +: Look for non 'int'-sized bitfields +case "$d_non_int_bitfields" in +'') +echo " " >&4 +echo "Checking whether your compiler can handle struct bitfields that aren't 'int' or 'unsigned int' ..." >&4 +$cat >try.c <<'EOCP' +#include +struct foo { + unsigned char byte:1; + unsigned short halfword:1; +} bar; +EOCP +if $cc $ccflags -c try.c >try.out 2>&1 ; then + if $compiler_warning try.out >/dev/null 2>&1; then + echo "Your C compiler doesn't support struct bitfields that aren't 'int' or 'unsigned int'." >&4 + val="$undef" + else + echo "Your C compiler supports struct bitfields besides 'int' and 'unsigned int'." >&4 + val="$define" + fi +else + echo "Your C compiler doesn't seem to understand struct bitfields that aren't 'int' or 'unsigned int' at all." >&4 + val="$undef" +fi +;; +*) val="$d_non_int_bitfields" ;; +esac +set d_non_int_bitfields +eval $setvar +$rm_try : see if this is a quadmath.h system set quadmath.h i_quadmath @@ -16569,17 +16769,49 @@ case "$usequadmath:$i_quadmath" in define:define) nvtype="__float128" nvsize=16 - case "$libs" in - *quadmath*) ;; - *) $cat <&4 + : libquadmath is not in the usual places, and the place + : changes if the compiler is upgraded. So ask the compiler if it + : can find it. + : We do not need to save this, if it fails we abort. + libs="$libs -lquadmath" + set try + $cat >try.c < +#include +int main(int argc, char *argv[]) { + __float128 x = 1.0; + if (fabsq(logq(x)) > 1e-6) { + fputs("quadmath is broken\n", stderr); + return 1; + } + puts("define"); + return 0; +} +EOM + yyy='' + if eval $compile_ok; then + yyy=`$run ./try` + case "$yyy" in + define) ;; + *) cat <&4 + +*** You requested the use of the quadmath library, but +*** it appears to be nonfunctional. +*** Cannot continue, aborting. + +EOM + exit 1 + ;; + esac + else + $cat <&4 *** You requested the use of the quadmath library, but you *** do not seem to have the quadmath library installed. *** Cannot continue, aborting. EOM exit 1 - ;; - esac + fi ;; define:*) $cat <&4 @@ -16736,6 +16968,10 @@ $cat <try.c #ifdef I_STDLIB #include #endif +#$i_inttypes I_INTTYPES +#ifdef I_INTTYPES +#include +#endif #include #include #ifdef SIGFPE @@ -16780,12 +17016,12 @@ fi case "$nv_preserves_uv_bits" in \-[1-9]*) nv_preserves_uv_bits=`expr 0 - $nv_preserves_uv_bits` - $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." 2>&1 + $echo "Your NVs can preserve all $nv_preserves_uv_bits bits of your UVs." >&4 d_nv_preserves_uv="$define" ;; -[1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." 2>&1 +[1-9]*) $echo "Your NVs can preserve only $nv_preserves_uv_bits bits of your UVs." >&4 d_nv_preserves_uv="$undef" ;; -*) $echo "Can't figure out how many bits your NVs preserve." 2>&1 +*) $echo "Can't figure out how many bits your NVs preserve." >&4 nv_preserves_uv_bits="0" ;; esac $rm_try @@ -16877,12 +17113,7 @@ $cat <try.c #ifdef I_STDLIB #include #endif -#$i_string I_STRING -#ifdef I_STRING -# include -#else -# include -#endif +#include #include #include #ifdef SIGFPE @@ -17072,6 +17303,557 @@ fi set pause d_pause eval $inlibc +: see if locale.h is available +set locale.h i_locale +eval $inhdr + +: see if this system has wctype.h +set wctype.h i_wctype +eval $inhdr + +: see if towupper exists +set towupper d_towupper +eval $inlibc + +: check for setlocale function and behavior +case "$d_setlocale" in +'') +$cat >&4 <try.c < +#include +#$i_locale I_LOCALE +#ifdef I_LOCALE +# include +#endif +#$i_wctype I_WCTYPE +#ifdef I_WCTYPE +# include +#endif + +int main() { + const char * invalid_name = "\a"; /* This is really invalid! */ + int accepts_any_locale_name = 0; + int has_C_UTF8 = 0; + unsigned char bad_setlocale = 255; + + /* If LC_CTYPE isn't defined the compilation will fail, and locales will be + * disabled. It's hard to imagine an instance where meaningful locale + * handling could be done without LC_CTYPE */ + const char * name = setlocale(LC_CTYPE, "C"); + + if (name == NULL || strcmp(name, "C") != 0) { + exit(bad_setlocale); + } + + name = setlocale(LC_CTYPE, invalid_name); + if (name != NULL) { + + /* Let it pass if it accepts the name but gives back one of the C + * locales */ + if (strcmp(name, "C") != 0 && strcmp(name, "C.UTF-8") != 0) { + accepts_any_locale_name = 1; + } + } + + name = setlocale(LC_CTYPE, "C.UTF-8"); + if (name != NULL) { + unsigned char y_with_diaeresis = ('A' == 193) ? 0xDF : 0xFF; + +#$d_towupper HAS_TOWUPPER +#ifdef HAS_TOWUPPER + + /* We assume that if the machine doesn't have the C99 towupper, it + * doesn't have C.UTF-8, even if we successfully changed locales to + * include it. This seems safer even on platforms that didn't accept + * the really invalid name */ + + if (towupper(y_with_diaeresis) == 0x178) { + has_C_UTF8 = 1; + } + +#endif + + } + + exit( 0 /* (separator - min_separator) << 3 + | uses_name_value_pair_names << 2 + */ + | has_C_UTF8 << 1 + | accepts_any_locale_name); + +} +EOCP +val= +set d_setlocale +eval $setvar +case $d_setlocale in + $undef) d_setlocale_accepts_any_locale_name="$undef" + d_has_C_UTF8="false" + ;; + *) set try + if eval $compile; then + echo "Your system has setlocale()..." >&4 + $run ./try + case $? in + 0) echo "and it seems sane; you don't have a C.UTF-8 locale" >&4 + d_setlocale="$define" + d_setlocale_accepts_any_locale_name="$undef" + d_has_C_UTF8="false" + ;; + 1) echo "and it seems sane, but accepts any locale name as valid" >&4 + d_setlocale="$define" + d_setlocale_accepts_any_locale_name="$define" + d_has_C_UTF8="false" + ;; + 2) echo "and it seems sane; you have a C.UTF-8 locale" >&4 + d_setlocale="$define" + d_setlocale_accepts_any_locale_name="$undef" + d_has_C_UTF8="true" + ;; + 3) echo "and it seems sane, but accepts any locale name as valid" >&4 + d_setlocale="$define" + d_setlocale_accepts_any_locale_name="$define" + d_has_C_UTF8="true" + ;; + *) echo "but it doesn't seem to work, so we won't use it." >&4 + d_setlocale="$undef" + d_setlocale_accepts_any_locale_name="$undef" + d_has_C_UTF8="false" + ;; + esac + else + echo "your system does not have setlocale()" >&4 + d_setlocale="$undef" + d_setlocale_accepts_any_locale_name="$undef" + d_has_C_UTF8="false" + fi +esac +$rm_try +;; +*) val="$d_setlocale" + set d_setlocale + eval $setvar + case "$d_setlocale" in + $undef) echo "There may be other ways to set the locale on your system, so we need to ask:" >&4 + ;; + esac + rp="Does your system have the C.UTF-8 locale?" + dflt=n + . ./myread + case "$ans" in + [Yy]*) d_has_C_UTF8="true" + c_utf8_locale=" or C.UTF-8" + ;; + *) d_has_C_UTF8="false" + c_utf8_locale="" + ;; + esac + case "$d_setlocale" in + $define) + rp="When you set your locale to something besides C$c_utf8_locale, does it actually do so? (Answer no if it just pretends to set it)" >&4 + dflt=n + . ./myread + case "$ans" in + true|[Yy]*) + d_setlocale_accepts_any_locale_name="$define" + ;; + *) d_setlocale_accepts_any_locale_name="$undef" + ;; + esac + ;; + *) d_setlocale_accepts_any_locale_name="$undef" + ;; + esac +esac + +: Check the syntax of LC_ALL when categories are set to different locales +echo " " +$echo "Checking the syntax of LC_ALL when categories are set to different locales..." >&4 + +case $d_setlocale in + $define) +$rm -f try try.* +$cat >try.c <<'EOF' +#include +#include +#include +#include +#include + +#ifndef LC_ALL + +int +main (const int argc, const char ** argv) +{ +} + +#else +# define C_ARRAY_LENGTH(a) (sizeof(a)/sizeof((a)[0])) +# define strEQ(s1,s2) (strcmp(s1,s2) == 0) +# define strNE(s1,s2) (strcmp(s1,s2) != 0) +# define Copy(s,d,n,t) (void)memcpy((char*)(d),(const char*)(s), (n) * sizeof(t)) +# define memEQ(s1,s2,l) (memcmp(((const void *) (s1)), ((const void *) (s2)), l) == 0) +# define memNE(s1,s2,l) (! memEQ(s1,s2,l)) + +int +main (const int argc, const char ** argv) +{ + + int debug = 0; + + /* All categories Perl knows about on any system. If any are missing, this + * won't work for that system, and they must be added here and in perl.h, + * locale.c */ + const int categories[] = { + +# ifdef LC_CTYPE + LC_CTYPE, +# endif +# ifdef LC_NUMERIC + LC_NUMERIC, +# endif +# ifdef LC_COLLATE + LC_COLLATE, +# endif +# ifdef LC_TIME + LC_TIME, +# endif +# ifdef LC_MESSAGES + LC_MESSAGES, +# endif +# ifdef LC_MONETARY + LC_MONETARY, +# endif +# ifdef LC_ADDRESS + LC_ADDRESS, +# endif +# ifdef LC_IDENTIFICATION + LC_IDENTIFICATION, +# endif +# ifdef LC_MEASUREMENT + LC_MEASUREMENT, +# endif +# ifdef LC_PAPER + LC_PAPER, +# endif +# ifdef LC_TELEPHONE + LC_TELEPHONE, +# endif +# ifdef LC_NAME + LC_NAME, +# endif +# ifdef LC_SYNTAX + LC_SYNTAX, +# endif +# ifdef LC_TOD + LC_TOD +# endif + + }; + + const char * category_names[] = { + +# ifdef LC_CTYPE + "LC_CTYPE", +# endif +# ifdef LC_NUMERIC + "LC_NUMERIC", +# endif +# ifdef LC_COLLATE + "LC_COLLATE", +# endif +# ifdef LC_TIME + "LC_TIME", +# endif +# ifdef LC_MESSAGES + "LC_MESSAGES", +# endif +# ifdef LC_MONETARY + "LC_MONETARY", +# endif +# ifdef LC_ADDRESS + "LC_ADDRESS", +# endif +# ifdef LC_IDENTIFICATION + "LC_IDENTIFICATION", +# endif +# ifdef LC_MEASUREMENT + "LC_MEASUREMENT", +# endif +# ifdef LC_PAPER + "LC_PAPER", +# endif +# ifdef LC_TELEPHONE + "LC_TELEPHONE", +# endif +# ifdef LC_NAME + "LC_NAME", +# endif +# ifdef LC_SYNTAX + "LC_SYNTAX", +# endif +# ifdef LC_TOD + "LC_TOD" +# endif + + }; + + char alternate[1024] = { '\0' } ; + + /* This is a list of locales that are likely to be found on any machine + * (Windows and non-Windows) */ + const char * candidates[] = { + "POSIX", + "C.UTF-8", + "en_US", + "en_US.UTF-8", + "American", + "English" + }; + char separator[1024]; + size_t separator_len = 0; + unsigned int distincts_count = 0; + + /* We look through the candidates for one which returns the same non-C + * locale for every category */ + for (unsigned int i = 0; i < C_ARRAY_LENGTH(candidates); i++) { + const char * candidate = candidates[i]; + distincts_count = 0; + alternate[0] = '\0'; + + for (unsigned int j = 0; j < C_ARRAY_LENGTH(categories); j++) { + const int category = categories[j]; + const char * locale_name = setlocale(category, candidate); + + if (locale_name == NULL) { /* Not on this system */ + break; + } + + if (debug) fprintf(stderr, + "i=%d,j=%d;" + " Return of setlocale(%d=%s, '%s') is '%s'\n", + i, j, + category, category_names[j], + candidate, locale_name); + + /* If the candidate is indistinguishable from C, break to try the + * next candidate */ + if (strEQ(locale_name, "C")) { + break; + } + + /* Save the name the first time through, and on subsequent ones */ + /* make sure the name is the same as before, so the code below can + * be assured of finding it when searching */ + if (j == 0) { + strncpy(alternate, locale_name, sizeof(alternate)); + } + else if (strNE(alternate, locale_name)) { + break; + } + + distincts_count++; + } + + /* Done with this candidate. If every category returned the same non-C + * name, this candidate works. It not, loop to try the next candidate + * */ + if (distincts_count == C_ARRAY_LENGTH(categories)) { + break; + } + } + + /* Here, either found a suitable candidate, or exhausted the possibilities. + * In the latter case, give up */ + if (distincts_count < C_ARRAY_LENGTH(categories)) { + fprintf(stderr, "Couldn't find a locale distinguishable from C\n"); + return 1; + } + + /* An example syntax, from cygwin, is: + * LC_COLLATE/LC_CTYPE/LC_MONETARY/LC_NUMERIC/LC_TIME/LC_MESSAGES + * The locales for a given category are always in the same position, + * indicated above, with a slash separating them */ + + int map_LC_ALL_position_to_category[C_ARRAY_LENGTH(categories)]; + + /* Initialize */ + for (unsigned int i = 0; i < C_ARRAY_LENGTH(categories); i++) { + map_LC_ALL_position_to_category[i] = INT_MAX; + } + + const char * lc_all = NULL; + + /* We need to find the category that goes in each position */ + for (unsigned int i = 0; i < C_ARRAY_LENGTH(categories); i++) { + + /* First set everything to 'C' */ + if (! setlocale(LC_ALL, "C")) { + fprintf(stderr, "Failed to set LC_ALL to C\n"); + return 1; + } + + /* Then set this category to the alternate */ + if (! setlocale(categories[i], alternate)) { + fprintf(stderr, "Failed to set %d to to '%s'\n", + categories[i], alternate); + return 1; + } + + /* Then find what the system says LC_ALL looks like with just this one + * category not set to 'C' */ + lc_all = setlocale(LC_ALL, NULL); + if (! lc_all) { + fprintf(stderr, "Failed to retrieve LC_ALL\n"); + return 1; + } + + if (debug) fprintf(stderr, "LC_ALL is '%s'\n", lc_all); + + /* Assume is name=value pairs if the result contains both an equals and + * a semi-colon. */ + if (strchr(lc_all, '=') && strchr(lc_all, ';')) { + fprintf(stdout, "\"=;\"\n\n"); + return 0; + } + + /* Here isn't name=value pairs. Find the position of the alternate */ + const char * alt_pos = strstr(lc_all, alternate); + if (! alt_pos) { + fprintf(stderr, "Couldn't find '%s' in '%'s\n", alternate, lc_all); + return 1; + } + + /* Parse the LC_ALL string from the beginning up to where the alternate + * locale is */ + const char * s = lc_all; + int count = 0; + while (s < alt_pos) { + + /* Count the 'C' locales before the non-C one. (Note the letter + * 'C' can only occur as the entire 'C' locale, since all of them + * are that locale before 'alt_pos') */ + const char * next_C = (const char *) memchr(s, 'C', alt_pos - s); + if (next_C) { + count++; + s = next_C + 1; + continue; + } + + /* Here, there is no 'C' between 's' and the alternate locale, so + * 'count' gives the total number of occurrences of 'C' in that + * span. If count is 0, this is the first category in an LC_ALL + * string, and we know its position, but not the separator. */ + if (count == 0) { + break; + } + + /* When 'count' isn't 0, 's' points to one past the previous 'C'. + * The separator starts here, ending just before the non-C locale. + */ + + const char * new_sep = s; + unsigned int new_sep_len = alt_pos - s; + + /* If we don't already have a separator saved, save this as it */ + if (separator_len == 0) { + separator_len = new_sep_len; + Copy(s, separator, separator_len, char); + separator[separator_len] = '\0'; + } + else { /* Otherwise make sure it's the same string as previously + * calculated */ + if ( new_sep_len != separator_len + || memNE(separator, new_sep, separator_len)) + { + fprintf(stderr, "Unexpectedly got distinct separators" + " '%s' vs '%s\n", separator, new_sep); + return 1; + } + } + + /* Here, we have found the position of category[i] in LC_ALL. */ + break; + + } /* End of loop parsing the LC_ALL string */ + + if (map_LC_ALL_position_to_category[count] != INT_MAX) { + fprintf(stderr, "Categories %d and %d both appear to occupy" + " position %d in LC_ALL; there is something" + " wrong with the calculation\n", + categories[count], categories[i], + count); + return 1; + } + + /* Save the position of this category */ + map_LC_ALL_position_to_category[count] = categories[i]; + + } /* End of loop through all the categories */ + + fprintf(stdout, "\"%s\"\n{", separator); + for (unsigned int i = 0; i < C_ARRAY_LENGTH(categories) - 1; i++) { + fprintf(stdout, " %d,", map_LC_ALL_position_to_category[i]); + } + fprintf(stdout, " %d }\n", map_LC_ALL_position_to_category[ + C_ARRAY_LENGTH(categories) - 1]); + return 0; + +} + +#endif +EOF +set try +if eval $compile_ok; then + output=`$run ./try 2>/dev/null` + echo "'$output'" >&4 + separator=`echo "$output" | $sed 1q` + echo "'$separator'" >&4 + case $separator in + "\"=;\"") + d_perl_lc_all_uses_name_value_pairs="$define" + d_perl_lc_all_separator="$undef" + perl_lc_all_separator= + d_perl_lc_all_category_positions_init="$undef" + perl_lc_all_category_positions_init= + ;; + "") d_perl_lc_all_uses_name_value_pairs="$undef" + d_perl_lc_all_separator="$undef" + perl_lc_all_separator= + d_perl_lc_all_category_positions_init="$undef" + perl_lc_all_category_positions_init= + ;; + *) d_perl_lc_all_uses_name_value_pairs="$undef" + d_perl_lc_all_separator="$define" + perl_lc_all_separator="$separator" + d_perl_lc_all_category_positions_init="$define" + perl_lc_all_category_positions_init=`echo "$output" | sed -n 2p` + ;; + esac +else + $echo "Failed to compile lc_all probe" >&4 +fi +$rm -f try try.* +;; +*) d_perl_lc_all_separator="$undef" + perl_lc_all_separator= + d_perl_lc_all_category_positions_init="$undef" + perl_lc_all_category_positions_init= + + # No setlocale(), but using this default allows our code to compile + # and run without having to have a bunch more #ifdef's + d_perl_lc_all_uses_name_value_pairs="$define" +;; +esac + +: see if pipe2 exists +set pipe2 d_pipe2 +eval $inlibc + : see if poll exists set poll d_poll eval $inlibc @@ -17339,7 +18121,7 @@ case "$d_random_r" in esac case "$random_r_proto" in ''|0) d_random_r=undef - random_r_proto=0 + random_r_proto=0 echo "Disabling random_r, cannot determine prototype." >&4 ;; * ) case "$random_r_proto" in REENTRANT_PROTO*) ;; @@ -17394,7 +18176,7 @@ case "$d_readdir64_r" in esac case "$readdir64_r_proto" in ''|0) d_readdir64_r=undef - readdir64_r_proto=0 + readdir64_r_proto=0 echo "Disabling readdir64_r, cannot determine prototype." >&4 ;; * ) case "$readdir64_r_proto" in REENTRANT_PROTO*) ;; @@ -17439,7 +18221,7 @@ case "$d_readdir_r" in esac case "$readdir_r_proto" in ''|0) d_readdir_r=undef - readdir_r_proto=0 + readdir_r_proto=0 echo "Disabling readdir_r, cannot determine prototype." >&4 ;; * ) case "$readdir_r_proto" in REENTRANT_PROTO*) ;; @@ -17713,21 +18495,31 @@ END extern int errno; #endif int main() { - struct semid_ds arg; + union semun +#ifndef HAS_UNION_SEMUN + { + int val; + struct semid_ds *buf; + unsigned short *array; + } +#endif + arg; + struct semid_ds argbuf; int sem, st; #if defined(IPC_PRIVATE) && defined(S_IRWXU) && defined(S_IRWXG) && defined(S_IRWXO) && defined(IPC_CREAT) sem = semget(IPC_PRIVATE, 1, S_IRWXU|S_IRWXG|S_IRWXO|IPC_CREAT); if (sem > -1) { + arg.buf = &argbuf; # ifdef IPC_STAT - st = semctl(sem, 0, IPC_STAT, &arg); + st = semctl(sem, 0, IPC_STAT, arg); if (st == 0) printf("semid_ds\n"); else # endif /* IPC_STAT */ printf("semctl IPC_STAT failed: errno = %d\n", errno); # ifdef IPC_RMID - if (semctl(sem, 0, IPC_RMID, &arg) != 0) + if (semctl(sem, 0, IPC_RMID, arg) != 0) # endif /* IPC_RMID */ printf("semctl IPC_RMID failed: errno = %d\n", errno); } else @@ -17779,6 +18571,10 @@ eval $inlibc set setegid d_setegid eval $inlibc +: see if setenv exists +set setenv d_setenv +eval $inlibc + : see if seteuid exists set seteuid d_seteuid eval $inlibc @@ -17811,7 +18607,7 @@ case "$d_setgrent_r" in esac case "$setgrent_r_proto" in ''|0) d_setgrent_r=undef - setgrent_r_proto=0 + setgrent_r_proto=0 echo "Disabling setgrent_r, cannot determine prototype." >&4 ;; * ) case "$setgrent_r_proto" in REENTRANT_PROTO*) ;; @@ -17860,7 +18656,7 @@ case "$d_sethostent_r" in esac case "$sethostent_r_proto" in ''|0) d_sethostent_r=undef - sethostent_r_proto=0 + sethostent_r_proto=0 echo "Disabling sethostent_r, cannot determine prototype." >&4 ;; * ) case "$sethostent_r_proto" in REENTRANT_PROTO*) ;; @@ -17889,14 +18685,6 @@ eval $inlibc set setlinebuf d_setlinebuf eval $inlibc -: see if setlocale exists -set setlocale d_setlocale -eval $inlibc - -: see if locale.h is available -set locale.h i_locale -eval $inhdr - : see if setlocale_r exists set setlocale_r d_setlocale_r eval $inlibc @@ -17917,7 +18705,7 @@ case "$d_setlocale_r" in esac case "$setlocale_r_proto" in ''|0) d_setlocale_r=undef - setlocale_r_proto=0 + setlocale_r_proto=0 echo "Disabling setlocale_r, cannot determine prototype." >&4 ;; * ) case "$setlocale_r_proto" in REENTRANT_PROTO*) ;; @@ -17966,7 +18754,7 @@ case "$d_setnetent_r" in esac case "$setnetent_r_proto" in ''|0) d_setnetent_r=undef - setnetent_r_proto=0 + setnetent_r_proto=0 echo "Disabling setnetent_r, cannot determine prototype." >&4 ;; * ) case "$setnetent_r_proto" in REENTRANT_PROTO*) ;; @@ -18031,7 +18819,7 @@ case "$d_setprotoent_r" in esac case "$setprotoent_r_proto" in ''|0) d_setprotoent_r=undef - setprotoent_r_proto=0 + setprotoent_r_proto=0 echo "Disabling setprotoent_r, cannot determine prototype." >&4 ;; * ) case "$setprotoent_r_proto" in REENTRANT_PROTO*) ;; @@ -18080,7 +18868,7 @@ case "$d_setpwent_r" in esac case "$setpwent_r_proto" in ''|0) d_setpwent_r=undef - setpwent_r_proto=0 + setpwent_r_proto=0 echo "Disabling setpwent_r, cannot determine prototype." >&4 ;; * ) case "$setpwent_r_proto" in REENTRANT_PROTO*) ;; @@ -18149,7 +18937,7 @@ case "$d_setservent_r" in esac case "$setservent_r_proto" in ''|0) d_setservent_r=undef - setservent_r_proto=0 + setservent_r_proto=0 echo "Disabling setservent_r, cannot determine prototype." >&4 ;; * ) case "$setservent_r_proto" in REENTRANT_PROTO*) ;; @@ -18397,11 +19185,8 @@ eval $inhdr : see if signbit exists $echo $n "Checking to see if you have signbit() available to work on $nvtype... $c" >&4 $cat >try.c < -#endif +#include #ifdef I_SUNMATH /* Solaris special math library */ # include #endif @@ -18488,6 +19273,71 @@ set d_sigsetjmp eval $setvar $rm_try +: see if snprintf exists +set snprintf d_snprintf +eval $inlibc + +: see if vsnprintf exists +set vsnprintf d_vsnprintf +eval $inlibc + +case "$d_snprintf-$d_vsnprintf" in +"$define-$define") + $cat <try.c <<'EOCP' +/* v?snprintf testing logic courtesy of Russ Allbery. + * According to C99: + * - if the buffer is too short it still must be \0-terminated + * - if the buffer is too short the potentially required length + * must be returned and not -1 + * - if the buffer is NULL the potentially required length + * must be returned and not -1 or core dump + */ +#include +#include + +char buf[2]; + +int test (char *format, ...) +{ + va_list args; + int count; + + va_start (args, format); + count = vsnprintf (buf, sizeof buf, format, args); + va_end (args); + return count; +} + +int main () +{ + return ((test ("%s", "abcd") == 4 && buf[0] == 'a' && buf[1] == '\0' + && snprintf (NULL, 0, "%s", "abcd") == 4) ? 0 : 1); +} +EOCP + set try + if eval $compile; then + `$run ./try` + case "$?" in + 0) echo "Your snprintf() and vsnprintf() seem to be working okay." ;; + *) cat <&4 +Your snprintf() and snprintf() don't seem to be working okay. +EOM + d_snprintf="$undef" + d_vsnprintf="$undef" + ;; + esac + else + echo "(I can't seem to compile the test program--assuming they don't)" + d_snprintf="$undef" + d_vsnprintf="$undef" + fi + $rm_try + ;; +esac + : see if sockatmark exists set sockatmark d_sockatmark eval $inlibc @@ -18521,7 +19371,7 @@ case "$d_srand48_r" in esac case "$srand48_r_proto" in ''|0) d_srand48_r=undef - srand48_r_proto=0 + srand48_r_proto=0 echo "Disabling srand48_r, cannot determine prototype." >&4 ;; * ) case "$srand48_r_proto" in REENTRANT_PROTO*) ;; @@ -18562,7 +19412,7 @@ case "$d_srandom_r" in esac case "$srandom_r_proto" in ''|0) d_srandom_r=undef - srandom_r_proto=0 + srandom_r_proto=0 echo "Disabling srandom_r, cannot determine prototype." >&4 ;; * ) case "$srandom_r_proto" in REENTRANT_PROTO*) ;; @@ -18625,7 +19475,6 @@ case "$d_statfs_s" in *) echo "No, it doesn't." ;; esac - : see if struct statfs knows about f_flags case "$d_statfs_s" in define) @@ -18755,7 +19604,7 @@ $cat >&4 <try.c <try.c < int main() { if (&STDIO_STREAM_ARRAY[fileno(stdin)] == stdin) @@ -18766,7 +19615,7 @@ EOCP do set try -DSTDIO_STREAM_ARRAY=$s if eval $compile; then - case "`$run ./try`" in + case "`$run ./try`" in yes) stdio_stream_array=$s; break ;; esac fi @@ -18790,45 +19639,6 @@ esac set strcoll d_strcoll eval $inlibc -: see if strerror and/or sys_errlist[] exist -echo " " -if test "X$d_strerror" = X -o "X$d_syserrlst" = X; then - if set strerror val -f d_strerror; eval $csym; $val; then - echo 'strerror() found.' >&4 - d_strerror="$define" - d_strerrm='strerror(e)' - if set sys_errlist val -a d_syserrlst; eval $csym; $val; then - echo "(You also have sys_errlist[], so we could roll our own strerror.)" - d_syserrlst="$define" - else - echo "(Since you don't have sys_errlist[], strerror() is welcome.)" - d_syserrlst="$undef" - fi - elif xxx=`./findhdr string.h`; test "$xxx" || xxx=`./findhdr strings.h`; \ - $contains '#[ ]*define.*strerror' "$xxx" >/dev/null 2>&1; then - echo 'strerror() found in string header.' >&4 - d_strerror="$define" - d_strerrm='strerror(e)' - if set sys_errlist val -a d_syserrlst; eval $csym; $val; then - echo "(Most probably, strerror() uses sys_errlist[] for descriptions.)" - d_syserrlst="$define" - else - echo "(You don't appear to have any sys_errlist[], how can this be?)" - d_syserrlst="$undef" - fi - elif set sys_errlist val -a d_syserrlst; eval $csym; $val; then - echo "strerror() not found, but you have sys_errlist[] so we'll use that." >&4 - d_strerror="$undef" - d_syserrlst="$define" - d_strerrm='((e)<0||(e)>=sys_nerr?"unknown":sys_errlist[e])' - else - echo 'strerror() and sys_errlist[] NOT found.' >&4 - d_strerror="$undef" - d_syserrlst="$undef" - d_strerrm='"unknown"' - fi -fi - : see if strerror_l exists set strerror_l d_strerror_l eval $inlibc @@ -18838,7 +19648,7 @@ set strerror_r d_strerror_r eval $inlibc case "$d_strerror_r" in "$define") - hdrs="$i_systypes sys/types.h define stdio.h $i_string string.h" + hdrs="$i_systypes sys/types.h define stdio.h define string.h" case "$d_strerror_r_proto:$usethreads" in ":define") d_strerror_r_proto=define set d_strerror_r_proto strerror_r $hdrs @@ -18861,7 +19671,7 @@ case "$d_strerror_r" in esac case "$strerror_r_proto" in ''|0) d_strerror_r=undef - strerror_r_proto=0 + strerror_r_proto=0 echo "Disabling strerror_r, cannot determine prototype." >&4 ;; * ) case "$strerror_r_proto" in REENTRANT_PROTO*) ;; @@ -18887,12 +19697,46 @@ set strftime d_strftime eval $inlibc : see if strlcat exists -set strlcat d_strlcat -eval $inlibc +: We need both a prototype in string.h and the symbol in libc. +echo " " +d_strlcat_proto='' +xx1="#$d_gnulibc HAS_GNULIBC" +xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)' +xx3='# define _GNU_SOURCE' +xx4='#endif' +set d_strlcat_proto strlcat literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h +eval $hasproto +case "$d_strlcat_proto" in + define) # see if strlcat exists + set strlcat d_strlcat + eval $inlibc + ;; + *) val=$undef + set d_strlcat + eval $setvar + ;; +esac : see if strlcpy exists -set strlcpy d_strlcpy -eval $inlibc +: We need both a prototype in string.h and the symbol in libc. +echo " " +d_strlcpy_proto='' +xx1="#$d_gnulibc HAS_GNULIBC" +xx2='#if defined(HAS_GNULIBC) && !defined(_GNU_SOURCE)' +xx3='# define _GNU_SOURCE' +xx4='#endif' +set d_strlcpy_proto strlcpy literal "$xx1" literal "$xx2" literal "$xx3" literal "$xx4" define string.h +eval $hasproto +case "$d_strlcpy_proto" in + define) # see if strlcpy exists + set strlcpy d_strlcpy + eval $inlibc + ;; + *) val=$undef + set d_strlcpy + eval $setvar + ;; +esac : see if strnlen exists set strnlen d_strnlen @@ -18902,6 +19746,10 @@ eval $inlibc set strtod d_strtod eval $inlibc +: see if strtod_l exists +set strtod_l d_strtod_l +eval $inlibc + : see if strtol exists set strtol d_strtol eval $inlibc @@ -18932,9 +19780,9 @@ EOM #define strtoll _strtoll #endif #include -extern long long int strtoll(char *s, char **, int); +#include static int bad = 0; -int check(char *s, long long ell, int een) { +void check(const char *s, long long ell, int een) { long long gll; errno = 0; gll = strtoll(s, 0, 10); @@ -18987,11 +19835,11 @@ case "$d_strtoul" in Checking whether your strtoul() works okay... EOM $cat >try.c <<'EOCP' +#include #include #include -extern unsigned long int strtoul(char *s, char **, int); static int bad = 0; -void check(char *s, unsigned long eul, int een) { +void check(const char *s, unsigned long eul, int een) { unsigned long gul; errno = 0; gul = strtoul(s, 0, 10); @@ -19011,7 +19859,7 @@ EOCP check("-1", 18446744073709551615UL, 0); check("-18446744073709551614", 2, 0); check("-18446744073709551615", 1, 0); - check("-18446744073709551616", 18446744073709551615UL, ERANGE); + check("-18446744073709551616", 18446744073709551615UL, ERANGE); check("-18446744073709551617", 18446744073709551615UL, ERANGE); #endif EOCP @@ -19024,7 +19872,7 @@ EOCP check("-1", 4294967295UL, 0); check("-4294967294", 2, 0); check("-4294967295", 1, 0); - check("-4294967296", 4294967295UL, ERANGE); + check("-4294967296", 4294967295UL, ERANGE); check("-4294967297", 4294967295UL, ERANGE); #endif EOCP @@ -19067,14 +19915,14 @@ case "$d_longlong-$d_strtoull" in Checking whether your strtoull() works okay... EOM $cat >try.c <<'EOCP' +#include #include #ifdef __hpux #define strtoull __strtoull #endif #include -extern unsigned long long int strtoull(char *s, char **, int); static int bad = 0; -int check(char *s, long long eull, int een) { +void check(const char *s, long long eull, int een) { long long gull; errno = 0; gull = strtoull(s, 0, 10); @@ -19090,7 +19938,7 @@ int main() { check("-1", 18446744073709551615ULL, 0); check("-18446744073709551614", 2LL, 0); check("-18446744073709551615", 1LL, 0); - check("-18446744073709551616", 18446744073709551615ULL, ERANGE); + check("-18446744073709551616", 18446744073709551615ULL, ERANGE); check("-18446744073709551617", 18446744073709551615ULL, ERANGE); #endif if (!bad) @@ -19124,11 +19972,11 @@ case "$d_strtouq" in Checking whether your strtouq() works okay... EOM $cat >try.c <<'EOCP' +#include #include #include -extern unsigned long long int strtouq(char *s, char **, int); static int bad = 0; -void check(char *s, unsigned long long eull, int een) { +void check(const char *s, unsigned long long eull, int een) { unsigned long long gull; errno = 0; gull = strtouq(s, 0, 10); @@ -19144,7 +19992,7 @@ int main() { check("-1", 18446744073709551615ULL, 0); check("-18446744073709551614", 2LL, 0); check("-18446744073709551615", 1LL, 0); - check("-18446744073709551616", 18446744073709551615ULL, ERANGE); + check("-18446744073709551616", 18446744073709551615ULL, ERANGE); check("-18446744073709551617", 18446744073709551615ULL, ERANGE); #endif if (!bad) @@ -19173,6 +20021,10 @@ esac set strxfrm d_strxfrm eval $inlibc +: see if strxfrm_l exists +set strxfrm_l d_strxfrm_l +eval $inlibc + : see if symlink exists set symlink d_symlink eval $inlibc @@ -19181,15 +20033,31 @@ eval $inlibc set syscall d_syscall eval $inlibc +: see if this is a sys/syscall.h system +set sys/syscall.h i_syssyscall +eval $inhdr + : see if prototype for syscall is available echo " " -set d_syscallproto syscall $i_unistd unistd.h +set d_syscallproto syscall $i_unistd unistd.h $i_syssyscall sys/syscall.h eval $hasproto : see if sysconf exists set sysconf d_sysconf eval $inlibc +: see if sys_errlist[] exists +echo " " +if test "X$d_syserrlst" = X; then + if set sys_errlist val -a d_syserrlst; eval $csym; $val; then + echo "You have sys_errlist[], so we could roll our own strerror." + d_syserrlst="$define" + else + echo "You don't have sys_errlist[], so strerror() is welcome." + d_syserrlst="$undef" + fi +fi + : see if system exists set system d_system eval $inlibc @@ -19207,95 +20075,131 @@ echo " " set d_telldirproto telldir $i_systypes sys/types.h $i_dirent dirent.h eval $hasproto -: see if tgamma exists -set tgamma d_tgamma -eval $inlibc +: see if tgamma exists +set tgamma d_tgamma +eval $inlibc + +: see what flavor, if any, of thread local storage is supported +echo " " +echo "Checking to see if your system supports C11 thread local storage..." +$cat > try.c <<'EOCP' +#include +#include +#include + +static int plus_one = 1; +static int minus_one = -1; + +PROBE_MACRO int *minion; + +int callback (const void *a, const void *b) { + int val_a = *minion * *(const int *)a; + int val_b = *minion * *(const int *)b; + return val_a < val_b ? -1 : val_a > val_b; +} + +#define SIZE 8 + +void *thread_function(void *arg) { + /* thread local variables should start zeroed in each thread. */ + if (minion != NULL) { + fprintf(stderr, "__thread variable started with %p, should be NULL\n", + minion); + exit(2); + } + minion = &minus_one; + + int array[SIZE]; + unsigned int i; + for (i = 0; i < SIZE; ++i) { + /* "Hash randomisation" - this array isn't in sorted order: */ + array[i ^ 5] = i * i; + } -: check for thread_safe_nl_langinfo_l item -$cat <try.c < -#endif -#$i_string I_STRING -#ifdef I_STRING -# include -#endif -#$i_langinfo I_LANGINFO -#ifdef I_LANGINFO -# include -#endif -#$i_pthread I_PTHREAD -#ifdef I_PTHREAD -# include -#endif -#$i_locale I_LOCALE -#ifdef I_LOCALE -# include -#endif + int bad = 0; + for (i = 0; i < SIZE; ++i) { + int want = (SIZE - 1 - i) * (SIZE - 1 - i); + int have = array[i]; + if (want != have) { + ++bad; + fprintf(stderr, "array[%u] - want %i, have %i\n", i, want, have); + } + } + if (bad) + exit(3); -void * -thread_start(void * arg) -{ - nl_langinfo(RADIXCHAR); + return NULL; } -int main() { - char * main_buffer; - char save_main_buffer[1000]; - pthread_t subthread; - pthread_attr_t attr; - - main_buffer = nl_langinfo_l(CODESET, newlocale(LC_ALL_MASK, "C", 0)); - - /* If too large for our generous allowance, just assume we don't have - * it. */ - if (strlen(main_buffer) >= sizeof(save_main_buffer)) { - exit(1); - } +int main(int argc, char **argv) { + if (minion != NULL) { + fprintf(stderr, "__thread variable started with %p, should be NULL\n", + minion); + exit(4); + } - strcpy(save_main_buffer, main_buffer); + minion = &plus_one; - if (pthread_attr_init(&attr) != 0) { - exit(1); - } + pthread_t tid; + int result = pthread_create(&tid, NULL, thread_function, NULL); + if (result) { + fprintf(stderr, "pthread_create failed (%d)\n", result); + exit(5); + } - if (pthread_create(&subthread, &attr, thread_start, NULL) != 0) { - exit(1); - } + result = pthread_join(tid, NULL); + if (result) { + fprintf(stderr, "pthread_join failed (%d)\n", result); + exit(6); + } - if (pthread_join(subthread, NULL) != 0) { - exit(1); - } + if (minion == NULL) { + fprintf(stderr, "__thread variable should not be NULL\n"); + exit(7); + } + if (!(minion == &plus_one && *minion == 1)) { + fprintf(stderr, "__thread variable should be %d @ %p, not %d @ %p\n", + 1, &plus_one, *minion, minion); + exit(8); + } - exit(! (strcmp(main_buffer, save_main_buffer) == 0)); + return 0; } EOCP -case "$usethreads" in - define) - set try - if eval $compile; then - echo "Your system has nl_langinfo_l()..." >&4 - if $run ./try; then - echo "and it is thread-safe (just as I'd hoped)." >&4 - d_thread_safe_nl_langinfo_l="$define" - echo "$d_thread_safe_nl_langinfo_l" >&4 - else - echo "but it isn't thread-safe, so we won't use it." >&4 + +# Respect a hint (or previous) value for perl_thread_local, if there is one. +case "$perl_thread_local" in +'') # Check the various possibilities, and break out on success. + for thread_local in _Thread_local __thread; do + set try -DPROBE_MACRO=$thread_local + if eval $compile && $run ./try; then + $echo "Your compiler supports $thread_local." >&4 + val=$define + perl_thread_local="$thread_local"; + break; fi - else - echo "your system does not have nl_langinfo_l()" >&4 - fi + $echo "Your compiler does NOT support $thread_local." >&4 + val="$undef" + done + ;; +*thread*|*Thread*) # Some variant of thread local exists. + echo "Keeping your $hint value of $perl_thread_local." + val=$define + ;; +*) # Unrecognized previous value -- blindly trust the supplied + # value and hope it makes sense. Use old value for + # d_thread_local, if there is one. + echo "Keeping your $hint value of $perl_thread_local." + case "$d_thread_local" in + '') val=$define ;; + *) val=$d_thread_local ;; + esac ;; - *) echo "Since threads aren't selected, we won't bother looking for nl_langinfo_l()" >&4 esac -if test X"$d_thread_safe_nl_langinfo_l" = X; then - d_thread_safe_nl_langinfo_l="$undef" -fi +set d_thread_local +eval $setvar $rm_try : see if time exists @@ -19362,7 +20266,7 @@ case "$d_tmpnam_r" in esac case "$tmpnam_r_proto" in ''|0) d_tmpnam_r=undef - tmpnam_r_proto=0 + tmpnam_r_proto=0 echo "Disabling tmpnam_r, cannot determine prototype." >&4 ;; * ) case "$tmpnam_r_proto" in REENTRANT_PROTO*) ;; @@ -19383,6 +20287,10 @@ case "$d_tmpnam_r" in ;; esac +: see if towlower exists +set towlower d_towlower +eval $inlibc + : see if trunc exists set trunc d_trunc eval $inlibc @@ -19419,7 +20327,7 @@ case "$d_ttyname_r" in esac case "$ttyname_r_proto" in ''|0) d_ttyname_r=undef - ttyname_r_proto=0 + ttyname_r_proto=0 echo "Disabling ttyname_r, cannot determine prototype." >&4 ;; * ) case "$ttyname_r_proto" in REENTRANT_PROTO*) ;; @@ -19489,6 +20397,10 @@ EOM #ifdef I_STDLIB #include #endif +#$i_inttypes I_INTTYPES +#ifdef I_INTTYPES +#include +#endif #include typedef $uvtype UV; int main() @@ -19700,14 +20612,10 @@ case "$d_closedir" in #include #else #ifdef I_SYS_DIR -#ifdef hp9000s500 -#include /* may be wrong in the future */ -#else #include #endif #endif #endif -#endif int main() { return closedir(opendir(".")); } EOM set try @@ -19740,6 +20648,10 @@ eval $inlibc set waitpid d_waitpid eval $inlibc +: see if wcrtomb exists +set wcrtomb d_wcrtomb +eval $inlibc + : look for wcscmp echo " " $cat >try.c <<'EOCP' @@ -19943,10 +20855,6 @@ $define) echo " " echo "Checking Berkeley DB version ..." >&4 $cat >try.c < #include #$i_stdlib I_STDLIB @@ -20037,16 +20945,13 @@ define) echo " " echo "Checking return type needed for hash for Berkeley DB ..." >&4 $cat >try.c < #include #ifndef DB_VERSION_MAJOR u_int32_t hash_cb (const void* ptr, size_t size) { + return 0; } HASHINFO info; int main() @@ -20056,7 +20961,7 @@ int main() #endif EOCP if $cc $ccflags -c try.c >try.out 2>&1 ; then - if $contains warning try.out >>/dev/null 2>&1 ; then + if $compiler_warning try.out >>/dev/null 2>&1 ; then db_hashtype='int' else db_hashtype='u_int32_t' @@ -20080,16 +20985,13 @@ define) echo " " echo "Checking return type needed for prefix for Berkeley DB ..." >&4 cat >try.c < #include #ifndef DB_VERSION_MAJOR size_t prefix_cb (const DBT *key1, const DBT *key2) { + return 0; } BTREEINFO info; int main() @@ -20099,7 +21001,7 @@ int main() #endif EOCP if $cc $ccflags -c try.c >try.out 2>&1 ; then - if $contains warning try.out >>/dev/null 2>&1 ; then + if $compiler_warning try.out >>/dev/null 2>&1 ; then db_prefixtype='int' else db_prefixtype='size_t' @@ -20156,14 +21058,8 @@ $cat >try.c < -#endif -#ifdef I_STRING -# include -#endif +#include #include /* Note that whether the sign bit is on or off * for NaN depends on the CPU/FPU, and possibly @@ -20201,10 +21097,12 @@ int main(int argc, char *argv[]) { memset((char *)&ldinf + 10, '\0', LONG_DOUBLESIZE - 10); memset((char *)&ldnan + 10, '\0', LONG_DOUBLESIZE - 10); # endif +#endif if (argc == 2) { switch (argv[1][0]) { case '1': bytes(&dinf, sizeof(dinf)); break; case '2': bytes(&dnan, sizeof(dnan)); break; +#ifdef HAS_LONG_DOUBLE case '3': bytes(&ldinf, sizeof(ldinf)); break; case '4': bytes(&ldnan, sizeof(ldnan)); break; #endif @@ -20352,11 +21250,8 @@ $rm_try : Check the length of the double mantissa $echo "Checking how many mantissa bits your doubles have..." >&4 $cat >try.c < -#endif +#include #ifdef I_SUNMATH # include #endif @@ -20382,11 +21277,8 @@ $rm_try : Check the length of the longdouble mantissa $echo "Checking how many mantissa bits your long doubles have..." >&4 $cat >try.c < -#endif +#include #ifdef I_SUNMATH # include #endif @@ -20612,8 +21504,8 @@ int main() { STDIO_STREAM_ARRAY[i]._flag) fflush(&STDIO_STREAM_ARRAY[i]); } - } # endif + } #endif _exit(42); } @@ -20647,7 +21539,7 @@ if $test "X$fflushNULL" = X -o "X$fflushall" = X; then fi : check for fflush NULL behavior case "$fflushNULL" in -'') set try -DTRY_FFLUSH_NULL $output +'') set try -DTRY_FFLUSH_NULL $output if eval $compile; then $run ./try 2>/dev/null code="$?" @@ -20781,7 +21673,7 @@ Good, at least fflush(stdin) seems to behave okay when stdin is a pipe. EOM : now check for fflushall behaviour case "$fflushall" in - '') set try -DTRY_FFLUSH_ALL $output + '') set try -DTRY_FFLUSH_ALL $output if eval $compile; then $cat >&4 <&4 fi - : Check if GID is signed echo " " case "$gidtype" in @@ -20951,7 +21842,6 @@ else echo "(I can't compile the test program--guessing unsigned.)" >&4 fi - : Check 64bit sizes echo " " @@ -20974,7 +21864,7 @@ EOCP case "$yyy" in 12345678901) sPRId64='"d"'; sPRIi64='"i"'; sPRIu64='"u"'; - sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"'; + sPRIo64='"o"'; sPRIx64='"x"'; sPRIXU64='"X"'; echo "We will use %d." ;; esac @@ -20996,7 +21886,7 @@ EOCP case "$yyy" in 12345678901) sPRId64='"ld"'; sPRIi64='"li"'; sPRIu64='"lu"'; - sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"'; + sPRIo64='"lo"'; sPRIx64='"lx"'; sPRIXU64='"lX"'; echo "We will use %ld." ;; esac @@ -21019,20 +21909,20 @@ EOCP case "$yyy" in 12345678901) sPRId64=PRId64; sPRIi64=PRIi64; sPRIu64=PRIu64; - sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIXU64; + sPRIo64=PRIo64; sPRIx64=PRIx64; sPRIXU64=PRIX64; echo "We will use the C9X style." ;; esac fi fi -if $test X"$sPRId64" = X -a X"$quadtype" != X; then - $cat >try.c <try.c <<'EOCP' #include #include int main() { - $quadtype q = 12345678901; - printf("%Ld\n", q); + long long q = 12345678901LL; /* AIX cc requires the LL suffix. */ + printf("%lld\n", q); } EOCP set try @@ -21040,21 +21930,21 @@ EOCP yyy=`$run ./try` case "$yyy" in 12345678901) - sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"'; - sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"'; - echo "We will use %Ld." + sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"'; + sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"'; + echo "We will use the %lld style." ;; esac fi fi -if $test X"$sPRId64" = X -a X"$quadtype" = X"long long"; then - $cat >try.c <<'EOCP' +if $test X"$sPRId64" = X -a X"$quadtype" != X; then + $cat >try.c < #include int main() { - long long q = 12345678901LL; /* AIX cc requires the LL suffix. */ - printf("%lld\n", q); + $quadtype q = 12345678901; + printf("%qd\n", q); } EOCP set try @@ -21062,9 +21952,9 @@ EOCP yyy=`$run ./try` case "$yyy" in 12345678901) - sPRId64='"lld"'; sPRIi64='"lli"'; sPRIu64='"llu"'; - sPRIo64='"llo"'; sPRIx64='"llx"'; sPRIXU64='"llX"'; - echo "We will use the %lld style." + sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"'; + sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"'; + echo "We will use %qd." ;; esac fi @@ -21076,7 +21966,7 @@ if $test X"$sPRId64" = X -a X"$quadtype" != X; then #include int main() { $quadtype q = 12345678901; - printf("%qd\n", q); + printf("%Ld\n", q); } EOCP set try @@ -21084,9 +21974,9 @@ EOCP yyy=`$run ./try` case "$yyy" in 12345678901) - sPRId64='"qd"'; sPRIi64='"qi"'; sPRIu64='"qu"'; - sPRIo64='"qo"'; sPRIx64='"qx"'; sPRIXU64='"qX"'; - echo "We will use %qd." + sPRId64='"Ld"'; sPRIi64='"Li"'; sPRIu64='"Lu"'; + sPRIo64='"Lo"'; sPRIx64='"Lx"'; sPRIXU64='"LX"'; + echo "We will use %Ld." ;; esac fi @@ -21244,6 +22134,49 @@ EOM *) groupstype="$gidtype";; esac +: Check format strings for internal 32bit types +echo " " +$echo "Checking the format strings to be used for Perl's internal 32bit-types..." >&4 + +case "$i32dformat" in +'') case "$i32type" in + int) + i32dformat='"d"' + u32uformat='"u"' + u32oformat='"o"' + u32xformat='"x"' + u32XUformat='"X"' + ;; + long) + i32dformat='"ld"' + u32uformat='"lu"' + u32oformat='"lo"' + u32xformat='"lx"' + u32XUformat='"lX"' + ;; + int_least32_t) : will not happen currently + i32dformat=PRIdLEAST32 + u32uformat=PRIuLEAST32 + u32oformat=PRIoLEAST32 + u32xformat=PRIxLEAST32 + u32XUformat=PRIXLEAST32 + ;; + int32_t) + i32dformat=PRId32 + u32uformat=PRIu32 + u32oformat=PRIo32 + u32xformat=PRIx32 + u32XUformat=PRIX32 + ;; + esac ;; +esac + +case "$i32dformat" in +'') echo "$0: Fatal: failed to find format strings for 32-bit integers, cannot continue." >&4 + exit 1 + ;; +esac + : check whether make sets MAKE echo " " echo "Checking if your $make program sets \$(MAKE)..." >&4 @@ -21302,6 +22235,9 @@ int main(int ac, char **av) { signal(SIGSEGV, exit); +#ifdef SIGBUS + signal(SIGBUS, exit); +#endif myprintf("%s%cs all right, then\n", "that", '\''); exit(0); @@ -21490,13 +22426,15 @@ pager="$ans" : see if ar generates random libraries by itself echo " " echo "Checking how to generate random libraries on your machine..." >&4 -echo 'int bar1() { return bar2(); }' > bar1.c +echo 'extern int bar2(); int bar1() { return bar2(); }' > bar1.c echo 'int bar2() { return 2; }' > bar2.c $cat > foo.c < #endif +#include +extern int bar1(); int main() { printf("%d\n", bar1()); exit(0); } EOP $cc $ccflags -c bar1.c >/dev/null 2>&1 @@ -21542,25 +22480,15 @@ else fi $rm -f foo* bar* -: see if this is a values.h system -set values.h i_values -eval $inhdr - : Check the max offset that gmtime and localtime accept echo "Checking max offsets that gmtime () accepts" -case $i_values in - define) yyy="#include " ;; - *) yyy="" ;; - esac - case "$sGMTIME_min/$sGMTIME_max" in 0/0|/) $cat >try.c < #include #include -$yyy int i; struct tm *tmp; @@ -21639,7 +22567,6 @@ case "$sLOCALTIME_min/$sLOCALTIME_max" in #include #include #include -$yyy int i; struct tm *tmp; @@ -21733,7 +22660,7 @@ EOM for nfd in 'int' 'size_t' 'unsigned long' 'unsigned' ; do for tmo in 'struct timeval *' 'const struct timeval *'; do case "$val" in - '') try="$extern_C select _(($nfd, $xxx, $xxx, $xxx, $tmo));" + '') try="$extern_C int select _(($nfd, $xxx, $xxx, $xxx, $tmo));" if ./protochk "$try" $hdrs; then echo "Your system accepts $xxx." val="$xxx" @@ -22108,17 +23035,17 @@ case "$doinit" in yes) echo "Generating a list of signal names and numbers..." >&4 . ./signal_cmd - sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst` - sig_name=`$awk 'BEGIN { printf "ZERO " } - !/^NSIG/ { printf "%s ", $1 }' signal.lst` - sig_num=`$awk 'BEGIN { printf "0 " } - !/^NSIG/ { printf "%d ", $2 }' signal.lst` - sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " } - !/^NSIG/ { printf "\"%s\", ", $1 } - END { printf "0\n" }' signal.lst` - sig_num_init=`$awk 'BEGIN { printf "0, " } - !/^NSIG/ { printf "%d, ", $2} - END { printf "0\n"}' signal.lst` + sig_count=`$awk '/^NSIG/ { printf "%d", $2 }' signal.lst` + sig_name=`$awk 'BEGIN { printf "ZERO " } + !/^NSIG/ { printf "%s ", $1 }' signal.lst` + sig_num=`$awk 'BEGIN { printf "0 " } + !/^NSIG/ { printf "%d ", $2 }' signal.lst` + sig_name_init=`$awk 'BEGIN { printf "\"ZERO\", " } + !/^NSIG/ { printf "\"%s\", ", $1 } + END { printf "0\n" }' signal.lst` + sig_num_init=`$awk 'BEGIN { printf "0, " } + !/^NSIG/ { printf "%d, ", $2} + END { printf "0\n"}' signal.lst` ;; esac echo "The following $sig_count signals are available:" @@ -22177,7 +23104,6 @@ else echo "(I can't compile the test program--guessing $sizesize.)" >&4 fi - : check for socklen_t echo " " echo "Checking to see if you have socklen_t..." >&4 @@ -22298,6 +23224,74 @@ EOM fi $rm_try +: Check the size of st_dev +$echo " " +$echo "Checking the size of st_dev..." >&4 +$cat > try.c < +#include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif +int main() { + struct stat st; + printf("%d\n", (int)sizeof(st.st_dev)); + exit(0); +} +EOCP +set try +if eval $compile_ok; then + val=`$run ./try` + case "$val" in + '') st_dev_size=4 + $echo "(I can't execute the test program--guessing $st_dev_size.)" >&4 + ;; + *) st_dev_size=$val + $echo "Your st_dev is $st_dev_size bytes long." + ;; + esac +else + st_dev_size=4 + $echo "(I can't compile the test program--guessing $st_dev_size.)" >&4 +fi +$rm_try + +: Check if st_dev is signed +$echo " " +$echo "Checking the sign of st_dev..." >&4 +$cat > try.c < +#include +int main() { + struct stat foo; + foo.st_dev = -1; + if (foo.st_dev < 0) + printf("-1\n"); + else + printf("1\n"); +} +EOCP +set try +if eval $compile; then + val=`$run ./try` + case "$val" in + '') st_dev_sign=1 + $echo "(I can't execute the test program--guessing unsigned.)" >&4 + ;; + *) st_dev_sign=$val + case "$st_dev_sign" in + 1) $echo "Your st_dev is unsigned." ;; + -1) $echo "Your st_dev is signed." ;; + esac + ;; + esac +else + st_dev_sign=1 + $echo "(I can't compile the test program--guessing unsigned.)" >&4 +fi +$rm_try + : Check the size of st_ino $echo " " $echo "Checking the size of st_ino..." >&4 @@ -22450,7 +23444,6 @@ else echo "(I can't compile the test program--guessing unsigned.)" >&4 fi - : Check format string for UID echo " " $echo "Checking the format string to be used for uids..." >&4 @@ -22490,6 +23483,34 @@ case "$uidsign" in ;; esac +: Ask about strict by default. +case "$usedefaultstrict" in + $define|true|[Yy]*) + dflt="y" + ;; + *) + dflt="n" + ;; + esac + +cat <&4 @@ -22746,10 +23767,6 @@ case "$yacc" in ;; esac -: see if this is a assert.h system -set assert.h i_assert -eval $inhdr - : see if this is a bfd.h system set bfd.h i_bfd eval $inhdr @@ -22809,30 +23826,6 @@ else i_machcthr="$undef" fi -: see if memory.h is available. -val='' -set memory.h val -eval $inhdr - -: See if it conflicts with string.h -case "$val" in -$define) - case "$strings" in - '') ;; - *) - $cppstdin $cppflags $cppminus < $strings > mem.h - if $contains 'memcpy' mem.h >/dev/null 2>&1; then - echo " " - echo "We won't be including ." - val="$undef" - fi - $rm -f mem.h - ;; - esac -esac -set i_memory -eval $setvar - : see if this is a mntent.h system set mntent.h i_mntent eval $inhdr @@ -22897,7 +23890,7 @@ FAVOR_BSD FILE_OFFSET_BITS FORTIFY_SOURCE FreeBSD GCC_NEW_VARARGS gcos gcx gimpel GLIBC GLIBC_MINOR GNUC GNUC_MINOR GNU_LIBRARY GNU_SOURCE GO32 gould GOULD_PN H3050R H3050RX hbullx20 hcx host_mips hp200 hp300 HP700 hp700 -hp800 hp9000 hp9000s200 hp9000s300 hp9000s400 hp9000s500 +hp800 hp9000 hp9000s200 hp9000s300 hp9000s400 hp9000s700 hp9000s800 hp9k8 hppa hpux HPUX_SOURCE hp_osf i186 i286 i386 i486 i586 i686 i8086 i80960 i860 I960 IA32 IA64 iAPX286 ibm ibm032 ibmesa IBMR2 ibmrt ILP32 ILP64 @@ -22911,7 +23904,7 @@ M68000 m68k m88100 m88k M88KBCS_TARGET MACH machine MachTen MATH_HAS_NO_SIDE_EFFECTS mc300 mc500 mc68000 mc68010 mc68020 mc68030 mc68040 mc68060 mc68k mc68k32 mc700 mc88000 mc88100 merlin mert MiNT mips MIPSEB MIPSEL MIPS_FPSET MIPS_ISA MIPS_SIM -MIPS_SZINT MIPS_SZLONG MIPS_SZPTR MODERN_C motorola mpeix MSDOS +MIPS_SZINT MIPS_SZLONG MIPS_SZPTR MODERN_C motorola MSDOS MTXINU MULTIMAX MVS mvs M_AMD64 M_ARM M_ARMT M_COFF M_I186 M_I286 M_I386 M_I8086 M_I86 M_I86SM M_IA64 M_IX86 M_PPC M_SYS3 M_SYS5 M_SYSIII M_SYSV M_UNIX M_X86 M_XENIX @@ -22996,7 +23989,7 @@ cat <<'EOSH' >> Cppsym.try printf "#ifdef _%s\nprintf(\"_%s=%%s\\n\", STRINGIFY(_%s));\n#endif\n", $1, $1, $1 printf "#ifdef __%s\nprintf(\"__%s=%%s\\n\", STRINGIFY(__%s));\n#endif\n", $1, $1, $1 printf "#ifdef __%s__\nprintf(\"__%s__=%%s\\n\", STRINGIFY(__%s__));\n#endif\n", $1, $1, $1 -}' >> try.c +}' >> try.c echo 'return 0;}' >> try.c EOSH cat <> Cppsym.try @@ -23039,7 +24032,7 @@ EOF for i in \`$cc -v -c tmp.c 2>&1 $postprocess_cc_v\` do case "\$i" in - -D*) echo "\$i" | $sed 's/^-D//';; + -D*) echo "\$i" | $sed 's/^-D//;s/['\''\"]//g';; -A*) $test "$gccversion" && echo "\$i" | $sed 's/^-A//' | $sed 's/\(.*\)(\(.*\))/\1=\2/';; esac done @@ -23102,7 +24095,7 @@ fi : add -D_FORTIFY_SOURCE if feasible and not already there case "$gccversion" in -[4567].*) case "$optimize$ccflags" in +[456789].*|[1-9][0-9]*) case "$optimize$ccflags" in *-O*) case "$ccflags$cppsymbols" in *_FORTIFY_SOURCE=*) # Don't add it again. echo "You seem to have -D_FORTIFY_SOURCE already, not adding it." >&4 @@ -23120,6 +24113,24 @@ case "$gccversion" in ;; esac +: script used to emit important warnings +cat >warn <msg +else + cat >msg +fi +echo "*** WARNING:" >&4 +sed -e 's/^/*** /' &4 +echo "*** " >&4 +cat msg >>config.msg +echo " " >>config.msg +rm -f msg +EOS +chmod +x warn +$eunicefix warn + : see if this is a termio system val="$undef" val2="$undef" @@ -23410,11 +24421,6 @@ for xxx in $xs_extensions ; do $define) avail_ext="$avail_ext $xxx" ;; esac ;; - I18N/Langinfo|i18n_lan) - case "$i_langinfo$d_nl_langinfo" in - $define$define) avail_ext="$avail_ext $xxx" ;; - esac - ;; IPC/SysV|ipc/sysv) : XXX Do we need a useipcsysv variable here case "${d_msg}${d_sem}${d_shm}" in @@ -23468,6 +24474,11 @@ for xxx in $xs_extensions ; do true|$define|y) avail_ext="$avail_ext $xxx" ;; esac ;; + I18N/Langinfo|langinfo) + case "$uselanginfo" in + true|define|y) avail_ext="$avail_ext $xxx" ;; + esac + ;; Sys/Syslog|sys/syslog) case $osname in amigaos) ;; # not really very useful on AmigaOS @@ -23479,14 +24490,6 @@ for xxx in $xs_extensions ; do ;; esac ;; - Thread|thread) - case "$usethreads" in - true|$define|y) - case "$use5005threads" in - $define|true|[yY]*) avail_ext="$avail_ext $xxx" ;; - esac - esac - ;; threads|threads/shared) # threads and threads::shared are special cases. # To stop people from asking "Perl 5.8.0 was supposed @@ -23731,7 +24734,7 @@ case " $extensions" in *" Fcntl "*"_File "*" IO "*) ;; # GDBM_File *" Fcntl "*" IO "*"_File "*) ;; # NDBM_File *) echo "WARNING: Extensions DB_File or *DBM_File, Fcntl, and IO not configured." >&4 - echo "WARNING: The Perl you are building will be quite crippled." >& 4 + echo "WARNING: The Perl you are building will be quite crippled." >&4 ;; esac @@ -23891,6 +24894,7 @@ chmod='$chmod' chown='$chown' clocktype='$clocktype' comm='$comm' +compiler_warning='$compiler_warning' compress='$compress' contains='$contains' cp='$cp' @@ -23924,6 +24928,7 @@ d_PRIu64='$d_PRIu64' d_PRIx64='$d_PRIx64' d_SCNfldbl='$d_SCNfldbl' d__fwalk='$d__fwalk' +d_accept4='$d_accept4' d_access='$d_access' d_accessx='$d_accessx' d_acosh='$d_acosh' @@ -23936,6 +24941,7 @@ d_asinh='$d_asinh' d_atanh='$d_atanh' d_atolf='$d_atolf' d_atoll='$d_atoll' +d_attribute_always_inline='$d_attribute_always_inline' d_attribute_deprecated='$d_attribute_deprecated' d_attribute_format='$d_attribute_format' d_attribute_malloc='$d_attribute_malloc' @@ -23943,6 +24949,7 @@ d_attribute_nonnull='$d_attribute_nonnull' d_attribute_noreturn='$d_attribute_noreturn' d_attribute_pure='$d_attribute_pure' d_attribute_unused='$d_attribute_unused' +d_attribute_visibility='$d_attribute_visibility' d_attribute_warn_unused_result='$d_attribute_warn_unused_result' d_backtrace='$d_backtrace' d_bsd='$d_bsd' @@ -23964,7 +24971,6 @@ d_class='$d_class' d_clearenv='$d_clearenv' d_closedir='$d_closedir' d_cmsghdr_s='$d_cmsghdr_s' -d_const='$d_const' d_copysign='$d_copysign' d_copysignl='$d_copysignl' d_cplusplus='$d_cplusplus' @@ -23976,7 +24982,6 @@ d_ctermid_r='$d_ctermid_r' d_ctime64='$d_ctime64' d_ctime_r='$d_ctime_r' d_cuserid='$d_cuserid' -d_dbl_dig='$d_dbl_dig' d_dbminitproto='$d_dbminitproto' d_difftime64='$d_difftime64' d_difftime='$d_difftime' @@ -23999,6 +25004,7 @@ d_double_style_vax='$d_double_style_vax' d_drand48_r='$d_drand48_r' d_drand48proto='$d_drand48proto' d_dup2='$d_dup2' +d_dup3='$d_dup3' d_duplocale='$d_duplocale' d_eaccess='$d_eaccess' d_endgrent='$d_endgrent' @@ -24032,6 +25038,8 @@ d_fdclose='$d_fdclose' d_fdim='$d_fdim' d_fds_bits='$d_fds_bits' d_fegetround='$d_fegetround' +d_ffs='$d_ffs' +d_ffsl='$d_ffsl' d_fgetpos='$d_fgetpos' d_finite='$d_finite' d_finitel='$d_finitel' @@ -24067,6 +25075,7 @@ d_gdbm_ndbm_h_uses_prototypes='$d_gdbm_ndbm_h_uses_prototypes' d_gdbmndbm_h_uses_prototypes='$d_gdbmndbm_h_uses_prototypes' d_getaddrinfo='$d_getaddrinfo' d_getcwd='$d_getcwd' +d_getenv_preserves_other_thread='$d_getenv_preserves_other_thread' d_getespwnam='$d_getespwnam' d_getfsstat='$d_getfsstat' d_getgrent='$d_getgrent' @@ -24127,6 +25136,7 @@ d_gmtime64='$d_gmtime64' d_gmtime_r='$d_gmtime_r' d_gnulibc='$d_gnulibc' d_grpasswd='$d_grpasswd' +d_has_C_UTF8='$d_has_C_UTF8' d_hasmntopt='$d_hasmntopt' d_htonl='$d_htonl' d_hypot='$d_hypot' @@ -24193,6 +25203,7 @@ d_lstat='$d_lstat' d_madvise='$d_madvise' d_malloc_good_size='$d_malloc_good_size' d_malloc_size='$d_malloc_size' +d_malloc_usable_size='$d_malloc_usable_size' d_mblen='$d_mblen' d_mbrlen='$d_mbrlen' d_mbrtowc='$d_mbrtowc' @@ -24203,6 +25214,7 @@ d_memrchr='$d_memrchr' d_mkdir='$d_mkdir' d_mkdtemp='$d_mkdtemp' d_mkfifo='$d_mkfifo' +d_mkostemp='$d_mkostemp' d_mkstemp='$d_mkstemp' d_mkstemps='$d_mkstemps' d_mktime64='$d_mktime64' @@ -24235,6 +25247,8 @@ d_nextafter='$d_nextafter' d_nexttoward='$d_nexttoward' d_nice='$d_nice' d_nl_langinfo='$d_nl_langinfo' +d_nl_langinfo_l='$d_nl_langinfo_l' +d_non_int_bitfields='$d_non_int_bitfields' d_nv_preserves_uv='$d_nv_preserves_uv' d_nv_zero_is_allbits_zero='$d_nv_zero_is_allbits_zero' d_off64_t='$d_off64_t' @@ -24245,8 +25259,12 @@ d_open3='$d_open3' d_openat='$d_openat' d_pathconf='$d_pathconf' d_pause='$d_pause' +d_perl_lc_all_category_positions_init='$d_perl_lc_all_category_positions_init' +d_perl_lc_all_separator='$d_perl_lc_all_separator' +d_perl_lc_all_uses_name_value_pairs='$d_perl_lc_all_uses_name_value_pairs' d_perl_otherlibdirs='$d_perl_otherlibdirs' d_phostname='$d_phostname' +d_pipe2='$d_pipe2' d_pipe='$d_pipe' d_poll='$d_poll' d_portable='$d_portable' @@ -24303,6 +25321,7 @@ d_semget='$d_semget' d_semop='$d_semop' d_sendmsg='$d_sendmsg' d_setegid='$d_setegid' +d_setenv='$d_setenv' d_seteuid='$d_seteuid' d_setgrent='$d_setgrent' d_setgrent_r='$d_setgrent_r' @@ -24312,6 +25331,7 @@ d_sethostent_r='$d_sethostent_r' d_setitimer='$d_setitimer' d_setlinebuf='$d_setlinebuf' d_setlocale='$d_setlocale' +d_setlocale_accepts_any_locale_name='$d_setlocale_accepts_any_locale_name' d_setlocale_r='$d_setlocale_r' d_setnent='$d_setnent' d_setnetent_r='$d_setnetent_r' @@ -24354,8 +25374,10 @@ d_sigprocmask='$d_sigprocmask' d_sigsetjmp='$d_sigsetjmp' d_sin6_scope_id='$d_sin6_scope_id' d_sitearch='$d_sitearch' +d_snprintf='$d_snprintf' d_sockaddr_in6='$d_sockaddr_in6' d_sockaddr_sa_len='$d_sockaddr_sa_len' +d_sockaddr_storage='$d_sockaddr_storage' d_sockatmark='$d_sockatmark' d_sockatmarkproto='$d_sockatmarkproto' d_socket='$d_socket' @@ -24381,8 +25403,6 @@ d_stdio_stream_array='$d_stdio_stream_array' d_stdiobase='$d_stdiobase' d_stdstdio='$d_stdstdio' d_strcoll='$d_strcoll' -d_strerrm='$d_strerrm' -d_strerror='$d_strerror' d_strerror_l='$d_strerror_l' d_strerror_r='$d_strerror_r' d_strftime='$d_strftime' @@ -24390,6 +25410,7 @@ d_strlcat='$d_strlcat' d_strlcpy='$d_strlcpy' d_strnlen='$d_strnlen' d_strtod='$d_strtod' +d_strtod_l='$d_strtod_l' d_strtol='$d_strtol' d_strtold='$d_strtold' d_strtold_l='$d_strtold_l' @@ -24399,6 +25420,7 @@ d_strtoul='$d_strtoul' d_strtoull='$d_strtoull' d_strtouq='$d_strtouq' d_strxfrm='$d_strxfrm' +d_strxfrm_l='$d_strxfrm_l' d_suidsafe='$d_suidsafe' d_symlink='$d_symlink' d_syscall='$d_syscall' @@ -24412,13 +25434,15 @@ d_tcsetpgrp='$d_tcsetpgrp' d_telldir='$d_telldir' d_telldirproto='$d_telldirproto' d_tgamma='$d_tgamma' -d_thread_safe_nl_langinfo_l='$d_thread_safe_nl_langinfo_l' +d_thread_local='$d_thread_local' d_time='$d_time' d_timegm='$d_timegm' d_times='$d_times' d_tm_tm_gmtoff='$d_tm_tm_gmtoff' d_tm_tm_zone='$d_tm_tm_zone' d_tmpnam_r='$d_tmpnam_r' +d_towlower='$d_towlower' +d_towupper='$d_towupper' d_trunc='$d_trunc' d_truncate='$d_truncate' d_truncl='$d_truncl' @@ -24444,8 +25468,10 @@ d_vfork='$d_vfork' d_void_closedir='$d_void_closedir' d_voidsig='$d_voidsig' d_voidtty='$d_voidtty' +d_vsnprintf='$d_vsnprintf' d_wait4='$d_wait4' d_waitpid='$d_waitpid' +d_wcrtomb='$d_wcrtomb' d_wcscmp='$d_wcscmp' d_wcstombs='$d_wcstombs' d_wcsxfrm='$d_wcsxfrm' @@ -24550,6 +25576,7 @@ html3dir='$html3dir' html3direxp='$html3direxp' i16size='$i16size' i16type='$i16type' +i32dformat='$i32dformat' i32size='$i32size' i32type='$i32type' i64size='$i64size' @@ -24557,7 +25584,6 @@ i64type='$i64type' i8size='$i8size' i8type='$i8type' i_arpainet='$i_arpainet' -i_assert='$i_assert' i_bfd='$i_bfd' i_bsdioctl='$i_bsdioctl' i_crypt='$i_crypt' @@ -24568,7 +25594,6 @@ i_dlfcn='$i_dlfcn' i_execinfo='$i_execinfo' i_fcntl='$i_fcntl' i_fenv='$i_fenv' -i_float='$i_float' i_fp='$i_fp' i_fp_class='$i_fp_class' i_gdbm='$i_gdbm' @@ -24579,13 +25604,10 @@ i_ieeefp='$i_ieeefp' i_inttypes='$i_inttypes' i_langinfo='$i_langinfo' i_libutil='$i_libutil' -i_limits='$i_limits' i_locale='$i_locale' i_machcthr='$i_machcthr' i_malloc='$i_malloc' i_mallocmalloc='$i_mallocmalloc' -i_math='$i_math' -i_memory='$i_memory' i_mntent='$i_mntent' i_ndbm='$i_ndbm' i_netdb='$i_netdb' @@ -24604,7 +25626,6 @@ i_socks='$i_socks' i_stdbool='$i_stdbool' i_stdint='$i_stdint' i_stdlib='$i_stdlib' -i_string='$i_string' i_sunmath='$i_sunmath' i_sysaccess='$i_sysaccess' i_sysdir='$i_sysdir' @@ -24626,6 +25647,7 @@ i_syssockio='$i_syssockio' i_sysstat='$i_sysstat' i_sysstatfs='$i_sysstatfs' i_sysstatvfs='$i_sysstatvfs' +i_syssyscall='$i_syssyscall' i_systime='$i_systime' i_systimek='$i_systimek' i_systimes='$i_systimes' @@ -24641,9 +25663,9 @@ i_time='$i_time' i_unistd='$i_unistd' i_ustat='$i_ustat' i_utime='$i_utime' -i_values='$i_values' i_vfork='$i_vfork' i_wchar='$i_wchar' +i_wctype='$i_wctype' i_xlocale='$i_xlocale' ignore_versioned_solibs='$ignore_versioned_solibs' inc_version_list='$inc_version_list' @@ -24787,8 +25809,11 @@ patchlevel='$patchlevel' path_sep='$path_sep' perl5='$perl5' perl='$perl' +perl_lc_all_category_positions_init='$perl_lc_all_category_positions_init' +perl_lc_all_separator='$perl_lc_all_separator' perl_patchlevel='$perl_patchlevel' perl_static_inline='$perl_static_inline' +perl_thread_local='$perl_thread_local' perladmin='$perladmin' perllibs='$perllibs' perlpath='$perlpath' @@ -24900,6 +25925,8 @@ srand48_r_proto='$srand48_r_proto' srandom_r_proto='$srandom_r_proto' src='$src' ssizetype='$ssizetype' +st_dev_sign='$st_dev_sign' +st_dev_size='$st_dev_size' st_ino_sign='$st_ino_sign' st_ino_size='$st_ino_size' startperl='$startperl' @@ -24913,7 +25940,6 @@ stdio_filbuf='$stdio_filbuf' stdio_ptr='$stdio_ptr' stdio_stream_array='$stdio_stream_array' strerror_r_proto='$strerror_r_proto' -strings='$strings' submit='$submit' subversion='$subversion' sysman='$sysman' @@ -24941,8 +25967,12 @@ troff='$troff' ttyname_r_proto='$ttyname_r_proto' u16size='$u16size' u16type='$u16type' +u32XUformat='$u32XUformat' +u32oformat='$u32oformat' u32size='$u32size' u32type='$u32type' +u32uformat='$u32uformat' +u32xformat='$u32xformat' u64size='$u64size' u64type='$u64type' u8size='$u8size' @@ -24954,17 +25984,18 @@ uidtype='$uidtype' uname='$uname' uniq='$uniq' uquadtype='$uquadtype' -use5005threads='$use5005threads' use64bitall='$use64bitall' use64bitint='$use64bitint' usecbacktrace='$usecbacktrace' usecrosscompile='$usecrosscompile' +usedefaultstrict='$usedefaultstrict' usedevel='$usedevel' usedl='$usedl' usedtrace='$usedtrace' usefaststdio='$usefaststdio' useithreads='$useithreads' usekernprocpathname='$usekernprocpathname' +uselanginfo='$uselanginfo' uselargefiles='$uselargefiles' uselongdouble='$uselongdouble' usemallocwrap='$usemallocwrap' @@ -25018,6 +26049,7 @@ version_patchlevel_string='$version_patchlevel_string' versiononly='$versiononly' vi='$vi' xlibpth='$xlibpth' +xlocale_needed='$xlocale_needed' yacc='$yacc' yaccflags='$yaccflags' zcat='$zcat'