summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-01-16 19:12:58 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-01-16 19:12:58 +0000
commit76d49b1cacfde5868001c5aa0ec48417c762179b (patch)
treefdcba8f645cfa2d31ddc4615ac1216fcb30928c8
parent747afe9f72bf33257cdb451a75c2349469736b92 (diff)
downloadperl-76d49b1cacfde5868001c5aa0ec48417c762179b.tar.gz
Know strtoll.
p4raw-id: //depot/cfgperl@4808
-rwxr-xr-xConfigure8
-rw-r--r--Porting/Glossary4
-rw-r--r--Porting/config.sh5
-rw-r--r--Porting/config_H8
-rw-r--r--config_h.SH6
-rw-r--r--perl.h13
6 files changed, 36 insertions, 8 deletions
diff --git a/Configure b/Configure
index 29a59fb32d..d4741cb0fc 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 Sun Jan 16 18:22:25 EET 2000 [metaconfig 3.0 PL70]
+# Generated on Sun Jan 16 21:08:34 EET 2000 [metaconfig 3.0 PL70]
# (with additional metaconfig patches by perlbug@perl.com)
cat >/tmp/c1$$ <<EOF
@@ -530,6 +530,7 @@ d_syserrlst=''
d_strtod=''
d_strtol=''
d_strtold=''
+d_strtoll=''
d_strtoul=''
d_strtoull=''
d_strtouq=''
@@ -10962,6 +10963,10 @@ eval $inlibc
set strtold d_strtold
eval $inlibc
+: see if strtoll exists
+set strtoll d_strtoll
+eval $inlibc
+
: see if strtoul exists
set strtoul d_strtoul
eval $inlibc
@@ -14637,6 +14642,7 @@ d_strerror='$d_strerror'
d_strtod='$d_strtod'
d_strtol='$d_strtol'
d_strtold='$d_strtold'
+d_strtoll='$d_strtoll'
d_strtoul='$d_strtoul'
d_strtoull='$d_strtoull'
d_strtouq='$d_strtouq'
diff --git a/Porting/Glossary b/Porting/Glossary
index 1bd313b9a3..bde26b736a 100644
--- a/Porting/Glossary
+++ b/Porting/Glossary
@@ -1402,6 +1402,10 @@ d_strtold (d_strtold.U):
This variable conditionally defines the HAS_STRTOLD symbol, which
indicates to the C program that the strtold() routine is available.
+d_strtoll (d_strtoll.U):
+ This variable conditionally defines the HAS_STRTOLL symbol, which
+ indicates to the C program that the strtoll() routine is available.
+
d_strtoul (d_strtoul.U):
This variable conditionally defines the HAS_STRTOUL symbol, which
indicates to the C program that the strtoul() routine is available
diff --git a/Porting/config.sh b/Porting/config.sh
index 40c49ca417..eebf57fe62 100644
--- a/Porting/config.sh
+++ b/Porting/config.sh
@@ -8,7 +8,7 @@
# Package name : perl5
# Source directory : .
-# Configuration time: Sun Jan 16 18:32:10 EET 2000
+# Configuration time: Sun Jan 16 21:10:53 EET 2000
# Configured by : jhi
# Target system : osf1 alpha.hut.fi v4.0 878 alpha
@@ -59,7 +59,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='Sun Jan 16 18:32:10 EET 2000'
+cf_time='Sun Jan 16 21:10:53 EET 2000'
charsize='1'
chgrp=''
chmod=''
@@ -321,6 +321,7 @@ d_strerror='define'
d_strtod='define'
d_strtol='define'
d_strtold='undef'
+d_strtoll='undef'
d_strtoul='define'
d_strtoull='undef'
d_strtouq='undef'
diff --git a/Porting/config_H b/Porting/config_H
index 858c3a4f0c..94007e9e3c 100644
--- a/Porting/config_H
+++ b/Porting/config_H
@@ -17,7 +17,7 @@
/*
* Package name : perl5
* Source directory : .
- * Configuration time: Sun Jan 16 18:32:10 EET 2000
+ * Configuration time: Sun Jan 16 21:10:53 EET 2000
* Configured by : jhi
* Target system : osf1 alpha.hut.fi v4.0 878 alpha
*/
@@ -1961,6 +1961,12 @@
*/
/*#define HAS_STRTOLD / **/
+/* HAS_STRTOLL:
+ * This symbol, if defined, indicates that the strtoll routine is
+ * available to convert strings to long longs.
+ */
+/*#define HAS_STRTOLL / **/
+
/* HAS_STRTOULL:
* This symbol, if defined, indicates that the strtoull routine is
* available to convert strings to unsigned long longs.
diff --git a/config_h.SH b/config_h.SH
index 92e54b0a74..712b38e73c 100644
--- a/config_h.SH
+++ b/config_h.SH
@@ -1975,6 +1975,12 @@ sed <<!GROK!THIS! >config.h -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un-
*/
#$d_strtold HAS_STRTOLD /**/
+/* HAS_STRTOLL:
+ * This symbol, if defined, indicates that the strtoll routine is
+ * available to convert strings to long longs.
+ */
+#$d_strtoll HAS_STRTOLL /**/
+
/* HAS_STRTOULL:
* This symbol, if defined, indicates that the strtoull routine is
* available to convert strings to unsigned long longs.
diff --git a/perl.h b/perl.h
index 3310aab632..f0292f31b6 100644
--- a/perl.h
+++ b/perl.h
@@ -1089,7 +1089,7 @@ typedef NVTYPE NV;
# define Perl_fmod fmod
#endif
-#if defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
+#if !defined(Perl_atof) && defined(USE_LONG_DOUBLE) && defined(HAS_LONG_DOUBLE)
# if !defined(Perl_atof) && defined(HAS_STRTOLD)
# define Perl_atof(s) strtold(s, (char*)0)
# endif
@@ -2985,9 +2985,13 @@ typedef struct am_table_short AMTS;
#endif /* !USE_LOCALE_NUMERIC */
-#if !defined(Atol) && defined(USE_LONG_LONG) && defined(HAS_LONG_LONG) \
- && defined(HAS_ATOLL)
-# define Atol atoll
+#if !defined(Atol) && defined(USE_LONG_LONG) && defined(HAS_LONG_LONG)
+# if !defined(Atol) && defined(HAS_STRTOLL)
+# define Atol(s) strtoll(s, (char*)0)
+# endif
+# if !defined(Atol) && defined(HAS_ATOLL)
+# define Atol atoll
+# endif
#endif
/* is there atoq() anywhere? */
#if !defined(Atol)
@@ -2998,6 +3002,7 @@ typedef struct am_table_short AMTS;
&& defined(HAS_STRTOULL)
# define Strtoul strtoull
#endif
+/* is there atouq() anywhere? */
#if !defined(Strtoul) && defined(USE_64_BITS) && defined(HAS_STRTOUQ)
# define Strtoul strtouq
#endif