From: Jarkko Hietaniemi Date: Tue, 11 Mar 2003 19:11:39 +0000 (+0000) Subject: Solaris cc wants prototype for exit(), so needed. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d1daaddfb35f3f1580ff0bf8608effdd23076e50;p=p5sagit%2Fp5-mst-13.2.git Solaris cc wants prototype for exit(), so needed. p4raw-id: //depot/perl@18923 --- diff --git a/Configure b/Configure index fb4add1..d74895d 100755 --- a/Configure +++ b/Configure @@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Thu Mar 6 08:25:05 EET 2003 [metaconfig 3.0 PL70] +# Generated on Tue Mar 11 22:13:14 EET 2003 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <&4 - $cat >try.c <<'EOCP' -#include -int main() -{ - printf("intsize=%d;\n", (int)sizeof(int)); - printf("longsize=%d;\n", (int)sizeof(long)); - printf("shortsize=%d;\n", (int)sizeof(short)); - exit(0); -} -EOCP - set try - if eval $compile_ok && $run ./try > /dev/null; then - eval `$run ./try` - echo "Your integers are $intsize bytes long." - echo "Your long integers are $longsize bytes long." - echo "Your short integers are $shortsize bytes long." - else - $cat >&4 <&4 -echo 'int main() { long long x = 7; return 0; }' > try.c -set try -if eval $compile; then - val="$define" - echo "You have long long." -else - val="$undef" - echo "You do not have long long." -fi -$rm try.* -set d_longlong -eval $setvar - -: check for length of long long -case "${d_longlong}${longlongsize}" in -$define) - echo " " - echo "Checking to see how big your long longs are..." >&4 - $cat >try.c <<'EOCP' -#include -int main() -{ - printf("%d\n", (int)sizeof(long long)); - return(0); -} -EOCP - set try - if eval $compile_ok; then - longlongsize=`$run ./try` - echo "Your long longs are $longlongsize bytes long." - else - dflt='8' - echo " " - echo "(I can't seem to compile the test program. Guessing...)" - rp="What is the size of a long long (in bytes)?" - . ./myread - longlongsize="$ans" - fi - if $test "X$longsize" = "X$longlongsize"; then - echo "(That isn't any different from an ordinary long.)" - fi - ;; -esac -$rm -f try.* try - : determine filename position in cpp output echo " " echo "Computing filename position in cpp output for #include directives..." >&4 @@ -5142,6 +5048,108 @@ do set $yyy; var=$2; eval "was=\$$2"; set $yyy; shift; shift; yyy=$@; done' +: see if stdlib is available +set stdlib.h i_stdlib +eval $inhdr + +: check for lengths of integral types +echo " " +case "$intsize" in +'') + echo "Checking to see how big your integers are..." >&4 + $cat >try.c <<'EOCP' +#include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif +int main() +{ + printf("intsize=%d;\n", (int)sizeof(int)); + printf("longsize=%d;\n", (int)sizeof(long)); + printf("shortsize=%d;\n", (int)sizeof(short)); + exit(0); +} +EOCP + set try + if eval $compile_ok && $run ./try > /dev/null; then + eval `$run ./try` + echo "Your integers are $intsize bytes long." + echo "Your long integers are $longsize bytes long." + echo "Your short integers are $shortsize bytes long." + else + $cat >&4 <&4 +echo 'int main() { long long x = 7; return 0; }' > try.c +set try +if eval $compile; then + val="$define" + echo "You have long long." +else + val="$undef" + echo "You do not have long long." +fi +$rm try.* +set d_longlong +eval $setvar + +: check for length of long long +case "${d_longlong}${longlongsize}" in +$define) + echo " " + echo "Checking to see how big your long longs are..." >&4 + $cat >try.c <<'EOCP' +#include +int main() +{ + printf("%d\n", (int)sizeof(long long)); + return(0); +} +EOCP + set try + if eval $compile_ok; then + longlongsize=`$run ./try` + echo "Your long longs are $longlongsize bytes long." + else + dflt='8' + echo " " + echo "(I can't seem to compile the test program. Guessing...)" + rp="What is the size of a long long (in bytes)?" + . ./myread + longlongsize="$ans" + fi + if $test "X$longsize" = "X$longlongsize"; then + echo "(That isn't any different from an ordinary long.)" + fi + ;; +esac +$rm -f try.* try + : see if inttypes.h is available : we want a real compile instead of Inhdr because some systems : have an inttypes.h which includes non-existent headers @@ -5932,6 +5940,10 @@ case "$doublesize" in echo "Checking to see how big your double precision numbers are..." >&4 $cat >try.c <<'EOCP' #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof(double)); @@ -6774,16 +6786,16 @@ $rm -f try.c try set i_malloc eval $setvar -: see if stdlib is available -set stdlib.h i_stdlib -eval $inhdr - : check for void type echo " " echo "Checking to see how well your C compiler groks the void type..." >&4 case "$voidflags" in '') $cat >try.c <<'EOCP' +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif #if TRY & 1 void sub() { #else @@ -6882,6 +6894,10 @@ case "$ptrsize" in fi $cat >>try.c <<'EOCP' #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof(VOID_PTR)); @@ -8943,6 +8959,10 @@ echo "Checking the size of $zzz..." >&4 cat > try.c < #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof($fpostype)); exit(0); @@ -10028,6 +10048,10 @@ else fi $cat >try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif #include #include $signal_t blech(s) int s; { exit(3); } @@ -10082,6 +10106,10 @@ echo " " echo 'Checking whether your C compiler can cast negative float to unsigned.' >&4 $cat >try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif #include #include $signal_t blech(s) int s; { exit(7); } @@ -13801,6 +13829,10 @@ case "$charsize" in echo "Checking to see how big your characters are (hey, you never know)..." >&4 $cat >try.c <<'EOCP' #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof(char)); @@ -15557,6 +15589,10 @@ case "$d_sigsetjmp" in '') $cat >try.c <<'EOP' #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif sigjmp_buf env; int set = 1; int main() @@ -16699,6 +16735,10 @@ EOM case "$d_u32align" in '') $cat >try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif #define U32 $u32type #define BYTEORDER 0x$byteorder #define U8 $u8type @@ -17704,6 +17744,10 @@ echo "Checking the size of $zzz..." >&4 cat > try.c < #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof($gidtype)); exit(0); @@ -18536,6 +18580,10 @@ EOM # include /* Might include */ #endif #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif $selecttype b; #define S sizeof(*(b)) #define MINBITS 64 @@ -18871,6 +18919,10 @@ echo "Checking the size of $zzz..." >&4 cat > try.c < #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof($sizetype)); exit(0); @@ -18974,6 +19026,10 @@ eval $typedef dflt="$ssizetype" $cat > try.c < +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif #include #define Size_t $sizetype #define SSize_t $dflt @@ -19056,6 +19112,10 @@ echo "Checking the size of $zzz..." >&4 cat > try.c < #include +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include +#endif int main() { printf("%d\n", (int)sizeof($uidtype)); exit(0);