This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add HAS_QUAD ($Config{d_quad}); use it.
authorJarkko Hietaniemi <jhi@iki.fi>
Sat, 30 Oct 1999 12:41:50 +0000 (12:41 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Sat, 30 Oct 1999 12:41:50 +0000 (12:41 +0000)
p4raw-id: //depot/metaconfig@4497

U/a_dvisory/quadtype.U
U/compline/charsize.U
U/perl/perlxv.U
U/typedefs/gidf.U
U/typedefs/uidf.U

index 4386b9b..e8ba340 100644 (file)
@@ -5,10 +5,14 @@
 ?RCS: You may distribute under the terms of either the GNU General Public
 ?RCS: License or the Artistic License, as specified in the README file.
 ?RCS:
-?MAKE:quadtype uquadtype quadcase: \
+?MAKE:d_quad quadtype uquadtype quadcase: \
        longsize intsize d_longlong longlongsize uselonglong d_int64t \
        Inhdr Setvar
 ?MAKE: -pick add $@ %<
+?S:d_quad:
+?S:    This variable, if defined, tells that there's a 64-bit integer type,
+?S:    quadtype.
+?S:.
 ?S:quadtype:
 ?S:    This variable defines Quad_t to be something like long, int, 
 ?S:    long long, int64_t, or whatever type is used for 64-bit integers.
 ?S:    unsigned int, unsigned long long, uint64_t, or whatever type is
 ?S:    used for 64-bit integers.
 ?S:.
+?C:HAS_QUAD:
+?C:    This symbol, if defined, tells that there's a 64-bit integer type,
+?C:    Quad_t.
+?C:.
 ?C:Quad_t:
 ?C:    This symbol holds the type used for 64-bit integers.
 ?C:    It can be int, long, long long, int64_t etc...
 ?C:    It can be unsigned int, unsigned long, unsigned long long,
 ?C:    uint64_t etc...
 ?C:.
-?H:#define Quad_t $quadtype
-?H:#define Uquad_t $uquadtype
-?H:#define QUADCASE $quadcase
+?H:#$d_quad HAS_QUAD   /**/
+?H:#$d_quad Quad_t $quadtype   /**/
+?H:#$d_quad Uquad_t $uquadtype /**/
+?H:#$d_quad QUADCASE $quadcase /**/
 ?H:.
 ?LINT:set quadtype
 ?LINT:set uquadtype
@@ -92,7 +101,11 @@ case "$intsize" in
 esac
 
 case "$quadtype" in
-'') echo "Alas, no 64-bit integer types in sight."    >&4 ;;
-*)  echo "Using '$quadtype' for 64-bit integers." >&4 ;;
+'')    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
 
index 7859f17..a3f649f 100644 (file)
@@ -32,7 +32,7 @@
 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()
index e09df72..d77ecaa 100644 (file)
@@ -8,7 +8,7 @@
 ?MAKE:ivtype uvtype nvtype ivsize uvsize nvsize \
        i8type u8type i16type u16type i32type u32type i64type u64type \
        i8size u8size i16size u16size i32size u32size i64size u64size: \
-       echo rm use64bits quadtype uquadtype \
+       echo rm use64bits d_quad quadtype uquadtype \
        d_longdbl uselongdouble longdblsize doublesize \
        charsize shortsize intsize longsize \
        cat Compile i_inttypes exe_ext test
 ?H:#define     U16TYPE         $u16type        /**/
 ?H:#define     I32TYPE         $i32type        /**/
 ?H:#define     U32TYPE         $u32type        /**/
-?H:?%<:#ifdef Quad_t
+?H:?%<:#ifdef HAS_QUAD
 ?H:?%<:#define I64TYPE         $i64type        /**/
 ?H:?%<:#define U64TYPE         $u64type        /**/
 ?H:?%<:#endif
 ?H:#define     U16SIZE         $u16size        /**/
 ?H:#define     I32SIZE         $i32size        /**/
 ?H:#define     U32SIZE         $u32size        /**/
-?H:?%<:#ifdef Quad_t
+?H:?%<:#ifdef HAS_QUAD
 ?H:?%<:#define I64SIZE         $i64size        /**/
 ?H:?%<:#define U64SIZE         $u64size        /**/
 ?H:?%<:#endif
 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
@@ -340,9 +340,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
index 9964458..7807291 100644 (file)
@@ -6,7 +6,7 @@
 ?RCS: License or the Artistic License, as specified in the README file.
 ?RCS:
 ?MAKE:gidformat: gidsize gidsign ivsize uvsize longsize intsize shortsize \
-       ivdformat uvuformat test
+       ivdformat uvuformat test echo
 ?MAKE: -pick add $@ %<
 ?S:gidformat:
 ?S:    This variable contains the format string used for printing a Gid_t.
index 4d1d26a..611d22a 100644 (file)
@@ -6,7 +6,7 @@
 ?RCS: License or the Artistic License, as specified in the README file.
 ?RCS:
 ?MAKE:uidformat: uidsize uidsign ivsize uvsize longsize intsize shortsize \
-       ivdformat uvuformat test
+       ivdformat uvuformat test echo
 ?MAKE: -pick add $@ %<
 ?S:uidformat:
 ?S:    This variable contains the format string used for printing a Uid_t.