summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-05-30 22:53:37 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-05-30 22:53:37 +0000
commitd6c1400008ffe28d0a765e9fe60d23dbeab89dda (patch)
tree8ebf4512d2d54f3e1821a457a5d9e82b016966a9
parent5b0d9cefa224486d66580e5164324f002f3989ab (diff)
downloadperl-d6c1400008ffe28d0a765e9fe60d23dbeab89dda.tar.gz
Tweak NV_PRESERVES_UV*, vms/subconfigure.com left untouched.
p4raw-id: //depot/cfgperl@6168
-rwxr-xr-xConfigure16
-rw-r--r--Porting/Glossary8
-rw-r--r--Porting/config.sh18
-rw-r--r--Porting/config_H11
-rw-r--r--config_h.SH5
-rw-r--r--epoc/config.sh1
-rw-r--r--perl.h6
-rw-r--r--toke.c22
-rw-r--r--vos/config.def1
-rw-r--r--vos/config.h50
-rw-r--r--win32/config.bc1
-rw-r--r--win32/config.gc1
-rw-r--r--win32/config.vc1
-rw-r--r--win32/config_H.bc7
-rw-r--r--win32/config_H.gc7
-rw-r--r--win32/config_H.vc7
16 files changed, 101 insertions, 61 deletions
diff --git a/Configure b/Configure
index 2159369ccd..fc3ea300c0 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 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'
diff --git a/Porting/Glossary b/Porting/Glossary
index da89a02e2e..f1e7b8e593 100644
--- a/Porting/Glossary
+++ b/Porting/Glossary
@@ -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.
diff --git a/Porting/config.sh b/Porting/config.sh
index b37bce4a15..c9e9f711c2 100644
--- a/Porting/config.sh
+++ b/Porting/config.sh
@@ -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=''
diff --git a/Porting/config_H b/Porting/config_H
index bb539e21ce..a2c196df82 100644
--- a/Porting/config_H
+++ b/Porting/config_H
@@ -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
*/
@@ -1403,7 +1403,7 @@
* 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
@@ -1539,7 +1539,7 @@
* 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
@@ -2679,6 +2679,10 @@
* 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 /**/
@@ -2706,6 +2710,7 @@
#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
diff --git a/config_h.SH b/config_h.SH
index 1781def436..c535105027 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -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
diff --git a/epoc/config.sh b/epoc/config.sh
index 688ef87578..113260f474 100644
--- a/epoc/config.sh
+++ b/epoc/config.sh
@@ -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 80683817a5..386010752e 100644
--- 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 75cab919cd..99c993e8fa 100644
--- 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);
diff --git a/vos/config.def b/vos/config.def
index f180e10790..1ef1effe84 100644
--- a/vos/config.def
+++ b/vos/config.def
@@ -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'
diff --git a/vos/config.h b/vos/config.h
index af79ff1459..47942251ce 100644
--- a/vos/config.h
+++ b/vos/config.h
@@ -1395,6 +1395,12 @@
*/
#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.
@@ -1525,6 +1531,12 @@
*/
#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.
@@ -1727,6 +1739,13 @@
/*#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.
@@ -2319,6 +2338,12 @@
*/
/*#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>.
@@ -3096,29 +3121,4 @@
#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
diff --git a/win32/config.bc b/win32/config.bc
index 0dfad540e0..4bce61b517 100644
--- a/win32/config.bc
+++ b/win32/config.bc
@@ -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'
diff --git a/win32/config.gc b/win32/config.gc
index a947e7933c..7f6a63ce89 100644
--- a/win32/config.gc
+++ b/win32/config.gc
@@ -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'
diff --git a/win32/config.vc b/win32/config.vc
index b2ee889e2d..853290db68 100644
--- a/win32/config.vc
+++ b/win32/config.vc
@@ -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'
diff --git a/win32/config_H.bc b/win32/config_H.bc
index 70fc4bfc98..3ed8e0476e 100644
--- a/win32/config_H.bc
+++ b/win32/config_H.bc
@@ -2647,7 +2647,11 @@
*/
/* 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 /**/
@@ -2675,6 +2679,7 @@
#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
diff --git a/win32/config_H.gc b/win32/config_H.gc
index dcb495a940..dca79c1401 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -2647,7 +2647,11 @@
*/
/* 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 /**/
@@ -2675,6 +2679,7 @@
#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
diff --git a/win32/config_H.vc b/win32/config_H.vc
index b23c1aad78..cc9264691e 100644
--- a/win32/config_H.vc
+++ b/win32/config_H.vc
@@ -2647,7 +2647,11 @@
*/
/* 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 /**/
@@ -2675,6 +2679,7 @@
#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