diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1999-10-30 12:41:50 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-10-30 12:41:50 +0000 |
commit | de1c2614758a00c0d93fc45414417a54cdf923b3 (patch) | |
tree | c97732539c1a6c948e0e0236d27caa5959944a65 | |
parent | a22e52b96b9903703a79e4a00983091457f7aff2 (diff) | |
download | perl-de1c2614758a00c0d93fc45414417a54cdf923b3.tar.gz |
Add HAS_QUAD ($Config{d_quad}); use it.
p4raw-id: //depot/cfgperl@4497
-rwxr-xr-x | Configure | 130 | ||||
-rw-r--r-- | Porting/Glossary | 4 | ||||
-rw-r--r-- | Porting/config.sh | 5 | ||||
-rw-r--r-- | Porting/config_H | 17 | ||||
-rw-r--r-- | config_h.SH | 15 | ||||
-rw-r--r-- | perl.h | 6 |
6 files changed, 101 insertions, 76 deletions
@@ -20,7 +20,7 @@ # $Id: Head.U,v 3.0.1.9 1997/02/28 15:02:09 ram Exp $ # -# Generated on Sat Oct 30 02:37:12 EET DST 1999 [metaconfig 3.0 PL70] +# Generated on Sat Oct 30 14:59:39 EET DST 1999 [metaconfig 3.0 PL70] # (with additional metaconfig patches by perlbug@perl.com) cat >/tmp/c1$$ <<EOF @@ -798,6 +798,7 @@ sPRIi64='' sPRIo64='' sPRIu64='' sPRIx64='' +d_quad='' quadcase='' quadtype='' uquadtype='' @@ -9534,6 +9535,65 @@ $define) ;; esac + +echo " " +echo "Checking which 64-bit integer type to use..." >&4 + +case "$intsize" in +8) val=int + set quadtype + eval $setvar + val='"unsigned int"' + set uquadtype + eval $setvar + quadcase=1 + ;; +*) case "$longsize" in + 8) val=long + set quadtype + eval $setvar + val='"unsigned long"' + set uquadtype + eval $setvar + quadcase=2 + ;; + *) case "$uselonglong:$d_longlong:$longlongsize" in + define:define:8) + val='"long long"' + set quadtype + eval $setvar + val='"unsigned long long"' + set uquadtype + eval $setvar + quadcase=3 + ;; + *) case "$d_int64t" in + define) + val=int64_t + set quadtype + eval $setvar + val=uint64_t + set uquadtype + eval $setvar + quadcase=4 + ;; + esac + ;; + esac + ;; + esac + ;; +esac + +case "$quadtype" in +'') echo "Alas, no 64-bit integer types in sight." >&4 + d_quad="$undef" + ;; +*) echo "Using '$quadtype' for 64-bit integers." >&4 + d_quad="$define" + ;; +esac + : see if readdir and friends exist set readdir d_readdir eval $inlibc @@ -11739,66 +11799,11 @@ else fi - -echo " " -echo "Checking which 64-bit integer type to use..." >&4 - -case "$intsize" in -8) val=int - set quadtype - eval $setvar - val='"unsigned int"' - set uquadtype - eval $setvar - quadcase=1 - ;; -*) case "$longsize" in - 8) val=long - set quadtype - eval $setvar - val='"unsigned long"' - set uquadtype - eval $setvar - quadcase=2 - ;; - *) case "$uselonglong:$d_longlong:$longlongsize" in - define:define:8) - val='"long long"' - set quadtype - eval $setvar - val='"unsigned long long"' - set uquadtype - eval $setvar - quadcase=3 - ;; - *) case "$d_int64t" in - define) - val=int64_t - set quadtype - eval $setvar - val=uint64_t - set uquadtype - eval $setvar - quadcase=4 - ;; - esac - ;; - esac - ;; - esac - ;; -esac - -case "$quadtype" in -'') echo "Alas, no 64-bit integer types in sight." >&4 ;; -*) echo "Using '$quadtype' for 64-bit integers." >&4 ;; -esac - : check for length of character echo " " case "$charsize" in '') - echo "Checking to see how big your characters are..." >&4 + echo "Checking to see how big your characters are (hey, you never know)..." >&4 $cat >try.c <<'EOCP' #include <stdio.h> int main() @@ -11827,8 +11832,8 @@ $rm -f try.c try echo " " $echo "Choosing the C types to be used for Perl's internal types..." >&4 -case "$use64bits:$quadtype" in -define:?*) +case "$use64bits:$d_quad:$quadtype" in +define:define:?*) ivtype="$quadtype" uvtype="$uquadtype" ivsize=8 @@ -11990,9 +11995,9 @@ case "$i32type" in esac case "$i64type" in -'') case "$quadtype" in - '') ;; - *) i64type="$quadtype" +'') case "$d_quad:$quadtype" in + define:?*) + i64type="$quadtype" u64type="$uquadtype" i64size=8 u64size=8 @@ -14256,6 +14261,7 @@ d_pwexpire='$d_pwexpire' d_pwgecos='$d_pwgecos' d_pwpasswd='$d_pwpasswd' d_pwquota='$d_pwquota' +d_quad='$d_quad' d_readdir='$d_readdir' d_readlink='$d_readlink' d_rename='$d_rename' diff --git a/Porting/Glossary b/Porting/Glossary index edda0cb845..fe7d62a204 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -1048,6 +1048,10 @@ d_pwquota (i_pwd.U): This variable conditionally defines PWQUOTA, which indicates that struct passwd contains pw_quota. +d_quad (quadtype.U): + This variable, if defined, tells that there's a 64-bit integer type, + quadtype. + d_readdir (d_readdir.U): This variable conditionally defines HAS_READDIR if readdir() is available to read directory entries. diff --git a/Porting/config.sh b/Porting/config.sh index a0f6d31212..0cc61821e7 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -8,7 +8,7 @@ # Package name : perl5 # Source directory : . -# Configuration time: Sat Oct 30 02:40:27 EET DST 1999 +# Configuration time: Sat Oct 30 15:31:32 EET DST 1999 # Configured by : jhi # Target system : osf1 alpha.hut.fi v4.0 878 alpha @@ -56,7 +56,7 @@ ccflags='-pthread -std -DLANGUAGE_C' ccsymbols='__LANGUAGE_C__=1 _LONGLONG=1 LANGUAGE_C=1 SYSTYPE_BSD=1' cf_by='jhi' cf_email='yourname@yourhost.yourplace.com' -cf_time='Sat Oct 30 02:40:27 EET DST 1999' +cf_time='Sat Oct 30 15:31:32 EET DST 1999' charsize='1' chgrp='' chmod='' @@ -246,6 +246,7 @@ d_pwexpire='undef' d_pwgecos='define' d_pwpasswd='define' d_pwquota='define' +d_quad='define' d_readdir='define' d_readlink='define' d_rename='define' diff --git a/Porting/config_H b/Porting/config_H index 0a961cc9b7..d9881cc562 100644 --- a/Porting/config_H +++ b/Porting/config_H @@ -17,7 +17,7 @@ /* * Package name : perl5 * Source directory : . - * Configuration time: Sat Oct 30 02:40:27 EET DST 1999 + * Configuration time: Sat Oct 30 15:31:32 EET DST 1999 * Configured by : jhi * Target system : osf1 alpha.hut.fi v4.0 878 alpha */ @@ -984,6 +984,10 @@ */ #define STDCHAR unsigned char /**/ +/* HAS_QUAD: + * This symbol, if defined, tells that there's a 64-bit integer type, + * Quad_t. + */ /* Quad_t: * This symbol holds the type used for 64-bit integers. * It can be int, long, long long, int64_t etc... @@ -997,9 +1001,10 @@ * It can be unsigned int, unsigned long, unsigned long long, * uint64_t etc... */ -#define Quad_t long -#define Uquad_t unsigned long -#define QUADCASE 2 +#define HAS_QUAD /**/ +#define Quad_t long /**/ +#define Uquad_t unsigned long /**/ +#define QUADCASE 2 /**/ /* HAS_ACCESSX: * This symbol, if defined, indicates that the accessx routine is @@ -2462,7 +2467,7 @@ #define U16TYPE unsigned short /**/ #define I32TYPE int /**/ #define U32TYPE unsigned int /**/ -#ifdef Quad_t +#ifdef HAS_QUAD #define I64TYPE long /**/ #define U64TYPE unsigned long /**/ #endif @@ -2475,7 +2480,7 @@ #define U16SIZE 2 /**/ #define I32SIZE 4 /**/ #define U32SIZE 4 /**/ -#ifdef Quad_t +#ifdef HAS_QUAD #define I64SIZE 8 /**/ #define U64SIZE 8 /**/ #endif diff --git a/config_h.SH b/config_h.SH index 5355052c8f..8e7115de72 100644 --- a/config_h.SH +++ b/config_h.SH @@ -998,6 +998,10 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- */ #define STDCHAR $stdchar /**/ +/* HAS_QUAD: + * This symbol, if defined, tells that there's a 64-bit integer type, + * Quad_t. + */ /* Quad_t: * This symbol holds the type used for 64-bit integers. * It can be int, long, long long, int64_t etc... @@ -1011,9 +1015,10 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- * It can be unsigned int, unsigned long, unsigned long long, * uint64_t etc... */ -#define Quad_t $quadtype -#define Uquad_t $uquadtype -#define QUADCASE $quadcase +#$d_quad HAS_QUAD /**/ +#$d_quad Quad_t $quadtype /**/ +#$d_quad Uquad_t $uquadtype /**/ +#$d_quad QUADCASE $quadcase /**/ /* HAS_ACCESSX: * This symbol, if defined, indicates that the accessx routine is @@ -2476,7 +2481,7 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #define U16TYPE $u16type /**/ #define I32TYPE $i32type /**/ #define U32TYPE $u32type /**/ -#ifdef Quad_t +#ifdef HAS_QUAD #define I64TYPE $i64type /**/ #define U64TYPE $u64type /**/ #endif @@ -2489,7 +2494,7 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un- #define U16SIZE $u16size /**/ #define I32SIZE $i32size /**/ #define U32SIZE $u32size /**/ -#ifdef Quad_t +#ifdef HAS_QUAD #define I64SIZE $i64size /**/ #define U64SIZE $u64size /**/ #endif @@ -904,7 +904,7 @@ Free_t Perl_mfree (Malloc_t where); typedef IVTYPE IV; typedef UVTYPE UV; -#ifdef USE_64_BITS +#if defined(USE_64_BITS) && defined(HAS_QUAD) # if QUADCASE == 4 && defined(INT64_MAX) /* quad is int64_t */ # define IV_MAX INT64_MAX # define IV_MIN INT64_MIN @@ -943,9 +943,13 @@ typedef UVTYPE UV; # if IVSIZE == 8 # define IV_IS_QUAD # define UV_IS_QUAD +# ifndef HAS_QUAD +# define HAS_QUAD +# endif # else # undef IV_IS_QUAD # undef UV_IS_QUAD +# undef HAS_QUAD # endif #endif |