Tweak NV_PRESERVES_UV*, vms/subconfigure.com left untouched.
authorJarkko Hietaniemi <jhi@iki.fi>
Tue, 30 May 2000 22:53:37 +0000 (22:53 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Tue, 30 May 2000 22:53:37 +0000 (22:53 +0000)
p4raw-id: //depot/cfgperl@6168

16 files changed:
Configure
Porting/Glossary
Porting/config.sh
Porting/config_H
config_h.SH
epoc/config.sh
perl.h
toke.c
vos/config.def
vos/config.h
win32/config.bc
win32/config.gc
win32/config.vc
win32/config_H.bc
win32/config_H.gc
win32/config_H.vc

index 2159369..fc3ea30 100755 (executable)
--- 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 Wed May 31 01:00:52 EET DST 2000 [metaconfig 3.0 PL70]
+# Generated on Wed May 31 01:51:16 EET DST 2000 [metaconfig 3.0 PL70]
 # (with additional metaconfig patches by perlbug@perl.com)
 
 cat >/tmp/c1$$ <<EOF
@@ -795,8 +795,8 @@ version=''
 perl5=''
 perladmin=''
 perlpath=''
-d_nv_preserved_bits=''
 d_nv_preserves_uv=''
+d_nv_preserves_uv_bits=''
 i16size=''
 i16type=''
 i32size=''
@@ -10212,7 +10212,7 @@ esac
 $rm -f try.* try
 
 case "$d_nv_preserves_uv" in
-"$define") d_nv_preserved_bits=`expr $uvsize \* 8` ;;
+"$define") d_nv_preserves_uv_bits=`expr $uvsize \* 8` ;;
 *)     $echo "Checking how many bits of your UVs your NVs can preserve..." >&4
        $cat <<EOP >try.c
 #include <stdio.h>
@@ -10231,12 +10231,12 @@ int main() {
 EOP
        set try
        if eval $compile; then
-               d_nv_preserved_bits="`./try$exe_ext`"
+               d_nv_preserves_uv_bits="`./try$exe_ext`"
        fi
-       case "$d_nv_preserved_bits" in
-       [1-9]*) $echo "Your NVs can preserve $d_nv_preserved_bits bits of your NVs."  2>&1 ;;
+       case "$d_nv_preserves_uv_bits" in
+       [1-9]*) $echo "Your NVs can preserve $d_nv_preserves_uv_bits bits of your UVs."  2>&1 ;;
        *)      $echo "Can't figure out how many bits your NVs preserve." 2>&1
-               d_nv_preserved_bits="$undef"
+               d_nv_preserves_uv_bits="$undef"
                ;;
        esac
        $rm -f try.* try
@@ -15379,8 +15379,8 @@ d_msync='$d_msync'
 d_munmap='$d_munmap'
 d_mymalloc='$d_mymalloc'
 d_nice='$d_nice'
-d_nv_preserved_bits='$d_nv_preserved_bits'
 d_nv_preserves_uv='$d_nv_preserves_uv'
+d_nv_preserves_uv_bits='$d_nv_preserves_uv_bits'
 d_off64_t='$d_off64_t'
 d_old_pthread_create_joinable='$d_old_pthread_create_joinable'
 d_oldpthreads='$d_oldpthreads'
index da89a02..f1e7b8e 100644 (file)
@@ -1015,14 +1015,14 @@ d_nice (d_nice.U):
        This variable conditionally defines the HAS_NICE symbol, which
        indicates to the C program that the nice() routine is available.
 
-d_nv_preserved_bits (perlxv.U):
-       This variable indicates how many of bits type uvtype
-       a variable nvtype can preserve.
-
 d_nv_preserves_uv (perlxv.U):
        This variable indicates whether a variable of type nvtype
        can preserve all the bits a variable of type uvtype.
 
+d_nv_preserves_uv_bits (perlxv.U):
+       This variable indicates how many of bits type uvtype
+       a variable nvtype can preserve.
+
 d_off64_t (d_off64_t.U):
        This symbol will be defined if the C compiler supports off64_t.
 
index b37bce4..c9e9f71 100644 (file)
@@ -8,7 +8,7 @@
 
 # Package name      : perl5
 # Source directory  : .
-# Configuration time: Wed May 31 00:52:02 EET DST 2000
+# Configuration time: Wed May 31 01:48:08 EET DST 2000
 # Configured by     : jhi
 # Target system     : osf1 alpha.hut.fi v4.0 878 alpha 
 
@@ -59,7 +59,7 @@ ccflags='-pthread -std -DLANGUAGE_C'
 ccsymbols='__alpha=1 __LANGUAGE_C__=1 __osf__=1 __unix__=1 _LONGLONG=1 _SYSTYPE_BSD=1 SYSTYPE_BSD=1 unix=1'
 cf_by='jhi'
 cf_email='yourname@yourhost.yourplace.com'
-cf_time='Wed May 31 00:52:02 EET DST 2000'
+cf_time='Wed May 31 01:48:08 EET DST 2000'
 charsize='1'
 chgrp=''
 chmod=''
@@ -159,7 +159,7 @@ d_fstatvfs='define'
 d_ftello='undef'
 d_ftime='undef'
 d_getcwd='define'
-d_getespwnam='define'
+d_getespwnam='undef'
 d_getfsstat='define'
 d_getgrent='define'
 d_getgrps='define'
@@ -184,7 +184,7 @@ d_getpgrp='define'
 d_getppid='define'
 d_getprior='define'
 d_getprotoprotos='define'
-d_getprpwnam='define'
+d_getprpwnam='undef'
 d_getpwent='define'
 d_getsbyname='define'
 d_getsbyport='define'
@@ -245,8 +245,8 @@ d_msync='define'
 d_munmap='define'
 d_mymalloc='undef'
 d_nice='define'
-d_nv_preserved_bits='53'
 d_nv_preserves_uv='undef'
+d_nv_preserves_uv_bits='53'
 d_off64_t='undef'
 d_old_pthread_create_joinable='undef'
 d_oldpthreads='undef'
@@ -547,12 +547,12 @@ lib_ext='.a'
 libc='/usr/shlib/libc.so'
 libperl='libperl.so'
 libpth='/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /var/shlib'
-libs='-lgdbm -ldbm -ldb -lm -lsecurity -laud -liconv -lpthread -lexc'
+libs='-lgdbm -ldbm -ldb -lm -liconv -lpthread -lexc'
 libsdirs=' /usr/shlib /usr/ccs/lib'
-libsfiles=' libgdbm.so libdbm.a libdb.so libm.so libsecurity.so libaud.so libiconv.so libpthread.so libexc.so'
-libsfound=' /usr/shlib/libgdbm.so /usr/ccs/lib/libdbm.a /usr/shlib/libdb.so /usr/shlib/libm.so /usr/shlib/libsecurity.so /usr/shlib/libaud.so /usr/shlib/libiconv.so /usr/shlib/libpthread.so /usr/shlib/libexc.so'
+libsfiles=' libgdbm.so libdbm.a libdb.so libm.so libiconv.so libpthread.so libexc.so'
+libsfound=' /usr/shlib/libgdbm.so /usr/ccs/lib/libdbm.a /usr/shlib/libdb.so /usr/shlib/libm.so /usr/shlib/libiconv.so /usr/shlib/libpthread.so /usr/shlib/libexc.so'
 libspath=' /usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /var/shlib'
-libswanted='sfio socket bind inet nsl nm gdbm dbm db malloc dld ld sun m cposix posix ndir dir crypt sec security aud ucb BSD x iconv pthread exc'
+libswanted='sfio socket bind inet nsl nm gdbm dbm db malloc dld ld sun m cposix posix ndir dir crypt sec ucb BSD x iconv pthread exc'
 line=''
 lint=''
 lkflags=''
index bb539e2..a2c196d 100644 (file)
@@ -17,7 +17,7 @@
 /*
  * Package name      : perl5
  * Source directory  : .
- * Configuration time: Wed May 31 00:52:02 EET DST 2000
+ * Configuration time: Wed May 31 01:48:08 EET DST 2000
  * Configured by     : jhi
  * Target system     : osf1 alpha.hut.fi v4.0 878 alpha 
  */
  *     This symbol, if defined, indicates that the getespwnam system call is
  *     available to retrieve enchanced (shadow) password entries by name.
  */
-#define HAS_GETESPWNAM         /**/
+/*#define HAS_GETESPWNAM               / **/
 
 /* HAS_GETFSSTAT:
  *     This symbol, if defined, indicates that the getfsstat routine is
  *     This symbol, if defined, indicates that the getprpwnam system call is
  *     available to retrieve protected (shadow) password entries by name.
  */
-#define HAS_GETPRPWNAM         /**/
+/*#define HAS_GETPRPWNAM               / **/
 
 /* HAS_GETPWENT:
  *     This symbol, if defined, indicates that the getpwent routine is
  *     This symbol, if defined, indicates that a variable of type NVTYPE
  *     can preserve all the bits of a variable of type UVTYPE.
  */
+/* NV_PRESERVES_UV_BITS:
+ *     This symbol contains the number of bits a variable of type NVTYPE
+ *     can preserve of a variable of type UVTYPE.
+ */
 #define        IVTYPE          long            /**/
 #define        UVTYPE          unsigned long           /**/
 #define        I8TYPE          char            /**/
 #endif
 #define        NVSIZE          8               /**/
 #undef NV_PRESERVES_UV
+#define        NV_PRESERVES_UV_BITS    53
 
 /* IVdf:
  *     This symbol defines the format string used for printing a Perl IV
index 1781def..c535105 100644 (file)
@@ -2693,6 +2693,10 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
  *     This symbol, if defined, indicates that a variable of type NVTYPE
  *     can preserve all the bits of a variable of type UVTYPE.
  */
+/* NV_PRESERVES_UV_BITS:
+ *     This symbol contains the number of bits a variable of type NVTYPE
+ *     can preserve of a variable of type UVTYPE.
+ */
 #define        IVTYPE          $ivtype         /**/
 #define        UVTYPE          $uvtype         /**/
 #define        I8TYPE          $i8type         /**/
@@ -2720,6 +2724,7 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
 #endif
 #define        NVSIZE          $nvsize         /**/
 #$d_nv_preserves_uv    NV_PRESERVES_UV
+#define        NV_PRESERVES_UV_BITS    $d_nv_preserves_uv_bits
 
 /* IVdf:
  *     This symbol defines the format string used for printing a Perl IV
index 688ef87..113260f 100644 (file)
@@ -789,6 +789,7 @@ d_strtold='undef'
 d_strtoll='undef'
 d_strtouq='undef'
 d_nv_preserves_uv='define'
+d_nv_preserves_uv_bits='32'
 use5005threads='undef'
 useithreads='undef'
 inc_version_list=' '
diff --git a/perl.h b/perl.h
index 8068381..3860107 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1145,6 +1145,9 @@ typedef NVTYPE NV;
 #       include <sunmath.h>
 #   endif
 #   define NV_DIG LDBL_DIG
+#   ifdef LDBL_MANT_DIG
+#       define NV_MANT_DIG LDBL_MANT_DIG
+#   endif
 #   ifdef HAS_SQRTL
 #       define Perl_cos cosl
 #       define Perl_sin sinl
@@ -1178,6 +1181,9 @@ typedef NVTYPE NV;
 #   endif
 #else
 #   define NV_DIG DBL_DIG
+#   ifdef DBL_MANT_DIG
+#       define NV_MANT_DIG DBL_MANT_DIG
+#   endif
 #   define Perl_cos cos
 #   define Perl_sin sin
 #   define Perl_sqrt sqrt
diff --git a/toke.c b/toke.c
index 75cab91..99c993e 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -7025,7 +7025,9 @@ Perl_scan_num(pTHX_ char *start)
           Strtol() and Strtoul() are used above.
 
           [1] XXX Configure test needed to check for atol()
-                  (and atoll() overflow behaviour) XXX --jhi
+                  (and atoll()) overflow behaviour XXX
+
+          --jhi
 
           We need to do this the hard way.  */
 
@@ -7039,14 +7041,16 @@ Perl_scan_num(pTHX_ char *start)
           don't need to do the conversion at all. 
 
           [1] Note that this is lossy if our NVs cannot preserve our
-          UVs.  There is a metaconfig define, NV_PRESERVES_UV, but we
-          really do hope all such platforms have strtou?ll? to do a
-          lossless IV/UV conversion.
-          XXX Configure test needed to check how many UV bits
-              do our NVs preserve, really (the current test checks
-              for the roundtrip of ~0) XXX --jhi
-              Maybe do some tricks with DBL_MANT_DIG and LDBL_MANT_DIG,
-              and DBL_DIG, LDBL_DIG (this is already available as NV_DIG)?
+          UVs.  There are metaconfig defines NV_PRESERVES_UV (a boolean)
+          and NV_PRESERVES_UV_BITS (a number), but in general we really
+          do hope all such potentially lossy platforms have strtou?ll?
+          to do a lossless IV/UV conversion.
+
+          Maybe could do some tricks with DBL_DIG, LDBL_DIG and
+          DBL_MANT_DIG and LDBL_MANT_DIG (these are already available
+          as NV_DIG and NV_MANT_DIG)?
+          
+          --jhi
           */
        {
            UV uv = U_V(nv);
index f180e10..1ef1eff 100644 (file)
@@ -156,6 +156,7 @@ $d_munmap='undef'
 $d_mymalloc='undef'
 $d_nice='undef'
 $d_nv_preserves_uv='define'
+$d_nv_preserves_uv_bits='32'
 $d_off64_t='undef'
 $d_old_pthread_create_joinable='undef'
 $d_oldpthreads='undef'
index af79ff1..4794225 100644 (file)
  */
 #define HAS_GETCWD             /**/
 
+/* HAS_GETESPWNAM:
+ *     This symbol, if defined, indicates that the getespwnam system call is
+ *     available to retrieve enchanced (shadow) password entries by name.
+ */
+/*#define HAS_GETESPWNAM               /**/
+
 /* HAS_GETFSSTAT:
  *     This symbol, if defined, indicates that the getfsstat routine is
  *     available to stat filesystems in bulk.
  */
 #define        HAS_GETPROTO_PROTOS     /**/
 
+/* HAS_GETPRPWNAM:
+ *     This symbol, if defined, indicates that the getprpwnam system call is
+ *     available to retrieve protected (shadow) password entries by name.
+ */
+/*#define HAS_GETPRPWNAM               /**/
+
 /* HAS_GETPWENT:
  *     This symbol, if defined, indicates that the getpwent routine is
  *     available for sequential access of the passwd database.
 /*#define HAS_MMAP             /**/
 #define Mmap_t $mmaptype       /**/
 
+/* HAS_MODFL:
+ *     This symbol, if defined, indicates that the modfl routine is
+ *     available to split a long double x into a fractional part f and
+ *     an integer part i such that |f| < 1.0 and (f + i) = x.
+ */
+/*#define HAS_MODFL            /**/
+
 /* HAS_MPROTECT:
  *     This symbol, if defined, indicates that the mprotect system call is
  *     available to modify the access protection of a memory mapped file.
  */
 /*#define      I_POLL          /**/
 
+/* I_PROT:
+ *     This symbol, if defined, indicates that <prot.h> exists and
+ *     should be included.
+ */
+/*#define      I_PROT          /**/
+
 /* I_PTHREAD:
  *     This symbol, if defined, indicates to the C program that it should
  *     include <pthread.h>.
 #define PERL_XS_APIVERSION "5.00563"
 #define PERL_PM_APIVERSION "5.00563"
 
-/* HAS_GETESPWNAM:
- *     This symbol, if defined, indicates that the getespwnam system call is
- *     available to retrieve enchanced (shadow) password entries by name.
- */
-/*#define HAS_GETESPWNAM               /**/
-
-/* HAS_GETPRPWNAM:
- *     This symbol, if defined, indicates that the getprpwnam system call is
- *     available to retrieve protected (shadow) password entries by name.
- */
-/*#define HAS_GETPRPWNAM               /**/
-
-/* HAS_MODFL:
- *     This symbol, if defined, indicates that the modfl routine is
- *     available to split a long double x into a fractional part f and
- *     an integer part i such that |f| < 1.0 and (f + i) = x.
- */
-/*#define HAS_MODFL            /**/
-
-/* I_PROT:
- *     This symbol, if defined, indicates that <prot.h> exists and
- *     should be included.
- */
-/*#define      I_PROT          /**/
-
 #endif
index 0dfad54..4bce61b 100644 (file)
@@ -235,6 +235,7 @@ d_munmap='undef'
 d_mymalloc='undef'
 d_nice='undef'
 d_nv_preserves_uv='define'
+d_nv_preserves_uv_bits='32'
 d_off64_t='undef'
 d_old_pthread_create_joinable='undef'
 d_oldpthreads='undef'
index a947e79..7f6a63c 100644 (file)
@@ -235,6 +235,7 @@ d_munmap='undef'
 d_mymalloc='undef'
 d_nice='undef'
 d_nv_preserves_uv='define'
+d_nv_preserves_uv_bits='32'
 d_off64_t='undef'
 d_old_pthread_create_joinable='undef'
 d_oldpthreads='undef'
index b2ee889..853290d 100644 (file)
@@ -235,6 +235,7 @@ d_munmap='undef'
 d_mymalloc='undef'
 d_nice='undef'
 d_nv_preserves_uv='define'
+d_nv_preserves_uv_bits='32'
 d_off64_t='undef'
 d_old_pthread_create_joinable='undef'
 d_oldpthreads='undef'
index 70fc4bf..3ed8e04 100644 (file)
  */
 /* NV_PRESERVES_UV:
  *     This symbol, if defined, indicates that a variable of type NVTYPE
- *     can preserve all the bit of a variable of type UVSIZE.
+ *     can preserve all the bit of a variable of type UVTYPE.
+ */
+/* NV_PRESERVES_UV_BITS:
+ *     This symbol contains the number of bits a variable of type NVTYPE
+ *     can preserve of a variable of type UVTYPE.
  */
 #define        IVTYPE          long            /**/
 #define        UVTYPE          unsigned long           /**/
 #define        U64SIZE         8       /**/
 #endif
 #define        NV_PRESERVES_UV
+#define        NV_PRESERVES_UV_BITS    32
 
 /* IVdf:
  *     This symbol defines the format string used for printing a Perl IV
index dcb495a..dca79c1 100644 (file)
  */
 /* NV_PRESERVES_UV:
  *     This symbol, if defined, indicates that a variable of type NVTYPE
- *     can preserve all the bit of a variable of type UVSIZE.
+ *     can preserve all the bit of a variable of type UVTYPE.
+ */
+/* NV_PRESERVES_UV_BITS:
+ *     This symbol contains the number of bits a variable of type NVTYPE
+ *     can preserve of a variable of type UVTYPE.
  */
 #define        IVTYPE          long            /**/
 #define        UVTYPE          unsigned long           /**/
 #define        U64SIZE         8       /**/
 #endif
 #define        NV_PRESERVES_UV
+#define        NV_PRESERVES_UV_BITS    32
 
 /* IVdf:
  *     This symbol defines the format string used for printing a Perl IV
index b23c1aa..cc92646 100644 (file)
  */
 /* NV_PRESERVES_UV:
  *     This symbol, if defined, indicates that a variable of type NVTYPE
- *     can preserve all the bit of a variable of type UVSIZE.
+ *     can preserve all the bit of a variable of type UVTYPE.
+ */
+/* NV_PRESERVES_UV_BITS:
+ *     This symbol contains the number of bits a variable of type NVTYPE
+ *     can preserve of a variable of type UVTYPE.
  */
 #define        IVTYPE          long            /**/
 #define        UVTYPE          unsigned long           /**/
 #define        U64SIZE         8       /**/
 #endif
 #define        NV_PRESERVES_UV
+#define        NV_PRESERVES_UV_BITS    32
 
 /* IVdf:
  *     This symbol defines the format string used for printing a Perl IV