diff options
-rwxr-xr-x | Configure | 203 | ||||
-rw-r--r-- | NetWare/config_H.wc | 6 | ||||
-rw-r--r-- | Porting/Glossary | 5 | ||||
-rw-r--r-- | Porting/config_H | 6 | ||||
-rwxr-xr-x | cflags.SH | 2 | ||||
-rwxr-xr-x | config_h.SH | 6 | ||||
-rw-r--r-- | ext/POSIX/POSIX.xs | 2 | ||||
-rw-r--r-- | ext/POSIX/lib/POSIX.pm | 2 | ||||
-rw-r--r-- | ext/SDBM_File/sdbm.h | 6 | ||||
-rw-r--r-- | hints/irix_6.sh | 6 | ||||
-rw-r--r-- | perl.h | 6 | ||||
-rw-r--r-- | plan9/config.plan9 | 6 | ||||
-rw-r--r-- | plan9/config_h.sample | 6 | ||||
-rw-r--r-- | uconfig.h | 8 | ||||
-rw-r--r-- | win32/config_H.ce | 6 | ||||
-rw-r--r-- | win32/config_H.gc | 6 | ||||
-rw-r--r-- | win32/config_H.vc | 6 |
17 files changed, 107 insertions, 181 deletions
@@ -5790,6 +5790,107 @@ mc_file=$1; shift; $cc -o ${mc_file} $optimize $ccflags $ldflags $* ${mc_file}.c $libs;' +: stub, used only to satisfy other units +i_stdlib='define' + +: 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 <stdio.h> +#$i_stdlib I_STDLIB +#ifdef I_STDLIB +#include <stdlib.h> +#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 <<EOM +! +Help! I can't compile and run the intsize test program: please enlighten me! +(This is probably a misconfiguration in your system or libraries, and +you really ought to fix it. Still, I'll try anyway.) +! +EOM + dflt=4 + rp="What is the size of an integer (in bytes)?" + . ./myread + intsize="$ans" + dflt=$intsize + rp="What is the size of a long integer (in bytes)?" + . ./myread + longsize="$ans" + dflt=2 + rp="What is the size of a short integer (in bytes)?" + . ./myread + shortsize="$ans" + fi + ;; +esac +$rm_try + +: check for long long +echo " " +echo "Checking to see if you have long long..." >&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 <stdio.h> +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_try + : determine filename position in cpp output echo " " echo "Computing filename position in cpp output for #include directives..." >&4 @@ -5902,108 +6003,6 @@ 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 <stdio.h> -#$i_stdlib I_STDLIB -#ifdef I_STDLIB -#include <stdlib.h> -#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 <<EOM -! -Help! I can't compile and run the intsize test program: please enlighten me! -(This is probably a misconfiguration in your system or libraries, and -you really ought to fix it. Still, I'll try anyway.) -! -EOM - dflt=4 - rp="What is the size of an integer (in bytes)?" - . ./myread - intsize="$ans" - dflt=$intsize - rp="What is the size of a long integer (in bytes)?" - . ./myread - longsize="$ans" - dflt=2 - rp="What is the size of a short integer (in bytes)?" - . ./myread - shortsize="$ans" - fi - ;; -esac -$rm_try - -: check for long long -echo " " -echo "Checking to see if you have long long..." >&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 <stdio.h> -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_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 diff --git a/NetWare/config_H.wc b/NetWare/config_H.wc index 8598a5a8a1..1ed624a499 100644 --- a/NetWare/config_H.wc +++ b/NetWare/config_H.wc @@ -730,12 +730,6 @@ */ #define I_STDDEF /**/ -/* I_STDLIB: - * This symbol, if defined, indicates that <stdlib.h> exists and should - * be included. - */ -#define I_STDLIB /**/ - /* I_STRING: * This symbol, if defined, indicates to the C program that it should * include <string.h> (USG systems) instead of <strings.h> (BSD systems). diff --git a/Porting/Glossary b/Porting/Glossary index df598c0464..5fcaeec9a8 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -3616,11 +3616,6 @@ i_stdint (i_stdint.U): indicates to the C program that <stdint.h> exists and should be included. -i_stdlib (i_stdlib.U): - This variable conditionally defines the I_STDLIB symbol, which - indicates to the C program that <stdlib.h> exists and should - be included. - i_string (i_string.U): This variable conditionally defines the I_STRING symbol, which indicates that <string.h> should be included rather than <strings.h>. diff --git a/Porting/config_H b/Porting/config_H index 97622adcd0..000fa36d2a 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -682,12 +682,6 @@ */ #define I_STDDEF /**/ -/* I_STDLIB: - * This symbol, if defined, indicates that <stdlib.h> exists and should - * be included. - */ -#define I_STDLIB /**/ - /* I_STRING: * This symbol, if defined, indicates to the C program that it should * include <string.h> (USG systems) instead of <strings.h> (BSD systems). @@ -73,9 +73,7 @@ cat >_cflags.c <<__EOT__ #include <setjmp.h> /* Just in case the inclusion of perl.h did not * pull in enough system headers, let's try again. */ -#ifdef I_STDLIB #include <stdlib.h> -#endif #ifdef I_STDDEF #include <stddef.h> #endif diff --git a/config_h.SH b/config_h.SH index a8c9672796..5e259a1e89 100755 --- a/config_h.SH +++ b/config_h.SH @@ -731,12 +731,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un */ #$i_stddef I_STDDEF /**/ -/* I_STDLIB: - * This symbol, if defined, indicates that <stdlib.h> exists and should - * be included. - */ -#$i_stdlib I_STDLIB /**/ - /* I_STRING: * This symbol, if defined, indicates to the C program that it should * include <string.h> (USG systems) instead of <strings.h> (BSD systems). diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 2d52326176..ab50226ff3 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -1336,9 +1336,7 @@ static NV_PAYLOAD_TYPE S_getpayload(NV nv) #if defined(I_TERMIOS) #include <termios.h> #endif -#ifdef I_STDLIB #include <stdlib.h> -#endif #ifndef __ultrix__ #include <string.h> #endif diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm index 2d7238a4ac..2fd13c2225 100644 --- a/ext/POSIX/lib/POSIX.pm +++ b/ext/POSIX/lib/POSIX.pm @@ -4,7 +4,7 @@ use warnings; our ($AUTOLOAD, %SIGRT); -our $VERSION = '1.78'; +our $VERSION = '1.79'; require XSLoader; diff --git a/ext/SDBM_File/sdbm.h b/ext/SDBM_File/sdbm.h index d5511daeef..cfb455261f 100644 --- a/ext/SDBM_File/sdbm.h +++ b/ext/SDBM_File/sdbm.h @@ -153,10 +153,8 @@ extern long sdbm_hash(const char *, int); # endif #endif -/* Use all the "standard" definitions? */ -#if defined(STANDARD_C) && defined(I_STDLIB) -# include <stdlib.h> -#endif /* STANDARD_C */ +/* Use all the "standard" definitions */ +#include <stdlib.h> #define MEM_SIZE Size_t diff --git a/hints/irix_6.sh b/hints/irix_6.sh index 832fde29bf..f16ae461d1 100644 --- a/hints/irix_6.sh +++ b/hints/irix_6.sh @@ -580,10 +580,7 @@ $define|true|[yY]*) #define sPRIfldbl $sPRIfldbl -#define I_STDLIB $i_stdlib -#ifdef I_STDLIB #include <stdlib.h> -#endif int main() { @@ -622,10 +619,7 @@ EOP #define sPRIfldbl $sPRIfldbl -#define I_STDLIB $i_stdlib -#ifdef I_STDLIB #include <stdlib.h> -#endif int main() { @@ -771,10 +771,8 @@ # endif #endif -/* Use all the "standard" definitions? */ -#if defined(STANDARD_C) && defined(I_STDLIB) -# include <stdlib.h> -#endif +/* Use all the "standard" definitions */ +#include <stdlib.h> /* If this causes problems, set i_unistd=undef in the hint file. */ #ifdef I_UNISTD diff --git a/plan9/config.plan9 b/plan9/config.plan9 index 0fcfa82d9f..0daf313683 100644 --- a/plan9/config.plan9 +++ b/plan9/config.plan9 @@ -728,12 +728,6 @@ */ #define I_STDDEF /**/ -/* I_STDLIB: - * This symbol, if defined, indicates that <stdlib.h> exists and should - * be included. - */ -#define I_STDLIB /**/ - /* I_STRING: * This symbol, if defined, indicates to the C program that it should * include <string.h> (USG systems) instead of <strings.h> (BSD systems). diff --git a/plan9/config_h.sample b/plan9/config_h.sample index bd8861027e..dcf3bdcc92 100644 --- a/plan9/config_h.sample +++ b/plan9/config_h.sample @@ -692,12 +692,6 @@ */ #define I_STDDEF /**/ -/* I_STDLIB: - * This symbol, if defined, indicates that <stdlib.h> exists and should - * be included. - */ -#define I_STDLIB /**/ - /* I_STRING: * This symbol, if defined, indicates to the C program that it should * include <string.h> (USG systems) instead of <strings.h> (BSD systems). @@ -696,12 +696,6 @@ */ #define I_STDDEF /**/ -/* I_STDLIB: - * This symbol, if defined, indicates that <stdlib.h> exists and should - * be included. - */ -#define I_STDLIB /**/ - /* I_STRING: * This symbol, if defined, indicates to the C program that it should * include <string.h> (USG systems) instead of <strings.h> (BSD systems). @@ -5281,6 +5275,6 @@ #endif /* Generated from: - * 9ac22558a2db3bead054c2b016d0b70095e52fce40430a65015f21cd91dcc943 config_h.SH + * 71879525dcc4fa1f709eedff386a3384fad9b06f7f066a51ecc7f6bba9331b24 config_h.SH * 408e88881e8a567afeba7b56cb949d7886e8473896575932bfdef72ee9c32249 uconfig.sh * ex: set ro: */ diff --git a/win32/config_H.ce b/win32/config_H.ce index 71007f3ed9..331bca2023 100644 --- a/win32/config_H.ce +++ b/win32/config_H.ce @@ -674,12 +674,6 @@ */ #define I_STDDEF /**/ -/* I_STDLIB: - * This symbol, if defined, indicates that <stdlib.h> exists and should - * be included. - */ -#define I_STDLIB /**/ - /* I_STRING: * This symbol, if defined, indicates to the C program that it should * include <string.h> (USG systems) instead of <strings.h> (BSD systems). diff --git a/win32/config_H.gc b/win32/config_H.gc index 7451d62b32..3d19d6145a 100644 --- a/win32/config_H.gc +++ b/win32/config_H.gc @@ -684,12 +684,6 @@ */ #define I_STDDEF /**/ -/* I_STDLIB: - * This symbol, if defined, indicates that <stdlib.h> exists and should - * be included. - */ -#define I_STDLIB /**/ - /* I_STRING: * This symbol, if defined, indicates to the C program that it should * include <string.h> (USG systems) instead of <strings.h> (BSD systems). diff --git a/win32/config_H.vc b/win32/config_H.vc index 6af02b3164..7ca7306a97 100644 --- a/win32/config_H.vc +++ b/win32/config_H.vc @@ -684,12 +684,6 @@ */ #define I_STDDEF /**/ -/* I_STDLIB: - * This symbol, if defined, indicates that <stdlib.h> exists and should - * be included. - */ -#define I_STDLIB /**/ - /* I_STRING: * This symbol, if defined, indicates to the C program that it should * include <string.h> (USG systems) instead of <strings.h> (BSD systems). |