summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2017-10-13 13:54:42 +0200
committerAaron Crane <arc@cpan.org>2017-10-21 16:53:02 +0100
commitedb450b123b6d0746d07c89cc1fe31426753497c (patch)
treee82aa53119af1f4483574facf863b3d5f31e2b19
parentb905af4c1158d6ce72032009e9f8387d5a5f5285 (diff)
downloadperl-edb450b123b6d0746d07c89cc1fe31426753497c.tar.gz
Rely on C89 <float.h> defining DBL_DIG
I would like to be able to assume that we have long doubles, and therefore that LDBL_DIG and friends are all defined too. But it seems that we may still support some platforms which are otherwise C89, but don't have even trivial long-double support; in particular, HP/UX 10 apparently uses a struct of four uint32_t values as long double, but doesn't support other bits, and confuses the Configure probe that looks for quadmath.
-rwxr-xr-xConfigure23
-rw-r--r--NetWare/config_H.wc8
-rw-r--r--Porting/config_H8
-rwxr-xr-xconfig_h.SH8
-rw-r--r--perl.h3
-rw-r--r--plan9/config.plan98
-rw-r--r--plan9/config_h.sample8
-rw-r--r--uconfig.h10
-rw-r--r--win32/config_H.ce8
-rw-r--r--win32/config_H.gc8
-rw-r--r--win32/config_H.vc8
11 files changed, 1 insertions, 99 deletions
diff --git a/Configure b/Configure
index f28f769743..35099dcef3 100755
--- a/Configure
+++ b/Configure
@@ -424,7 +424,6 @@ d_ctermid_r=''
ctime_r_proto=''
d_ctime_r=''
d_cuserid=''
-d_dbl_dig=''
d_dbminitproto=''
d_difftime=''
d_dir_dd_fd=''
@@ -12318,27 +12317,6 @@ esac
set cuserid d_cuserid
eval $inlibc
-: See if number of significant digits in a double precision number is known
-echo " "
-$cat >dbl_dig.c <<EOM
-#include <limits.h>
-#include <float.h>
-#ifdef DBL_DIG
-printf("Contains DBL_DIG");
-#endif
-EOM
-$cppstdin $cppflags $cppminus < dbl_dig.c >dbl_dig.E 2>/dev/null
-if $contains 'DBL_DIG' dbl_dig.E >/dev/null 2>&1; then
- echo "DBL_DIG found." >&4
- val="$define"
-else
- echo "DBL_DIG NOT found." >&4
- val="$undef"
-fi
-$rm -f dbl_dig.?
-set d_dbl_dig
-eval $setvar
-
: see if dbm.h is available
: see if dbmclose exists
set dbmclose d_dbmclose
@@ -23936,7 +23914,6 @@ d_ctermid_r='$d_ctermid_r'
d_ctime64='$d_ctime64'
d_ctime_r='$d_ctime_r'
d_cuserid='$d_cuserid'
-d_dbl_dig='$d_dbl_dig'
d_dbminitproto='$d_dbminitproto'
d_difftime64='$d_difftime64'
d_difftime='$d_difftime'
diff --git a/NetWare/config_H.wc b/NetWare/config_H.wc
index 5b198c691c..6f2a13a4dd 100644
--- a/NetWare/config_H.wc
+++ b/NetWare/config_H.wc
@@ -91,14 +91,6 @@
*/
/*#define HAS_CUSERID /**/
-/* HAS_DBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol DBL_DIG, which is the number
- * of significant digits in a double precision number. If this
- * symbol is not defined, a guess of 15 is usually pretty good.
- */
-#define HAS_DBL_DIG /**/
-
/* HAS_DIFFTIME:
* This symbol, if defined, indicates that the difftime routine is
* available.
diff --git a/Porting/config_H b/Porting/config_H
index 2d8aa092aa..71aa2025ee 100644
--- a/Porting/config_H
+++ b/Porting/config_H
@@ -68,14 +68,6 @@
*/
#define HAS_CUSERID /**/
-/* HAS_DBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol DBL_DIG, which is the number
- * of significant digits in a double precision number. If this
- * symbol is not defined, a guess of 15 is usually pretty good.
- */
-#define HAS_DBL_DIG /* */
-
/* HAS_DIFFTIME:
* This symbol, if defined, indicates that the difftime routine is
* available.
diff --git a/config_h.SH b/config_h.SH
index 91ed7eab2e..ca35bad96a 100755
--- a/config_h.SH
+++ b/config_h.SH
@@ -1562,14 +1562,6 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
#define CSH "$full_csh" /**/
#endif
-/* HAS_DBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol DBL_DIG, which is the number
- * of significant digits in a double precision number. If this
- * symbol is not defined, a guess of 15 is usually pretty good.
- */
-#$d_dbl_dig HAS_DBL_DIG /**/
-
/* HAS_DLADDR:
* This symbol, if defined, indicates that the dladdr() routine is
* available to query dynamic linker information for an address.
diff --git a/perl.h b/perl.h
index 293ce63f2d..713caa3f87 100644
--- a/perl.h
+++ b/perl.h
@@ -1691,9 +1691,6 @@ typedef UVTYPE UV;
*/
#include <limits.h>
#include <float.h>
-#ifndef HAS_DBL_DIG
-#define DBL_DIG 15 /* A guess that works lots of places */
-#endif
#endif
#ifdef OVR_LDBL_DIG
diff --git a/plan9/config.plan9 b/plan9/config.plan9
index 5e9a9a926b..0d42aae460 100644
--- a/plan9/config.plan9
+++ b/plan9/config.plan9
@@ -127,14 +127,6 @@
*/
#define HAS_CUSERID /**/
-/* HAS_DBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol DBL_DIG, which is the number
- * of significant digits in a double precision number. If this
- * symbol is not defined, a guess of 15 is usually pretty good.
- */
-#define HAS_DBL_DIG /* */
-
/* HAS_DIFFTIME:
* This symbol, if defined, indicates that the difftime routine is
* available.
diff --git a/plan9/config_h.sample b/plan9/config_h.sample
index bb63df7a02..77c877221a 100644
--- a/plan9/config_h.sample
+++ b/plan9/config_h.sample
@@ -85,14 +85,6 @@
*/
#define HAS_CUSERID /**/
-/* HAS_DBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol DBL_DIG, which is the number
- * of significant digits in a double precision number. If this
- * symbol is not defined, a guess of 15 is usually pretty good.
- */
-#define HAS_DBL_DIG /* */
-
/* HAS_DIFFTIME:
* This symbol, if defined, indicates that the difftime routine is
* available.
diff --git a/uconfig.h b/uconfig.h
index 084269d328..9bceb3cb27 100644
--- a/uconfig.h
+++ b/uconfig.h
@@ -1527,14 +1527,6 @@
#define CSH "" /**/
#endif
-/* HAS_DBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol DBL_DIG, which is the number
- * of significant digits in a double precision number. If this
- * symbol is not defined, a guess of 15 is usually pretty good.
- */
-/*#define HAS_DBL_DIG / **/
-
/* HAS_DLADDR:
* This symbol, if defined, indicates that the dladdr() routine is
* available to query dynamic linker information for an address.
@@ -5235,6 +5227,6 @@
#endif
/* Generated from:
- * 9100fef145843fcfa105bdc8111ca24ddb625d35d59b8a1eef427a60fd294ab3 config_h.SH
+ * 2d22094514b83bd987ad35ed557d99cd19f65621ee3870d0616b3c942e337faf config_h.SH
* 4425baab434b1c600933b21fb798a0a73397dbac36deea56173e1ca5efc76582 uconfig.sh
* ex: set ro: */
diff --git a/win32/config_H.ce b/win32/config_H.ce
index e7e35d46c5..51ea1d7ee4 100644
--- a/win32/config_H.ce
+++ b/win32/config_H.ce
@@ -67,14 +67,6 @@
*/
/*#define HAS_CUSERID /**/
-/* HAS_DBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol DBL_DIG, which is the number
- * of significant digits in a double precision number. If this
- * symbol is not defined, a guess of 15 is usually pretty good.
- */
-#define HAS_DBL_DIG /**/
-
/* HAS_DIFFTIME:
* This symbol, if defined, indicates that the difftime routine is
* available.
diff --git a/win32/config_H.gc b/win32/config_H.gc
index 6c4b3efdd7..985ea49b11 100644
--- a/win32/config_H.gc
+++ b/win32/config_H.gc
@@ -70,14 +70,6 @@
*/
/*#define HAS_CUSERID / **/
-/* HAS_DBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol DBL_DIG, which is the number
- * of significant digits in a double precision number. If this
- * symbol is not defined, a guess of 15 is usually pretty good.
- */
-#define HAS_DBL_DIG /**/
-
/* HAS_DIFFTIME:
* This symbol, if defined, indicates that the difftime routine is
* available.
diff --git a/win32/config_H.vc b/win32/config_H.vc
index 696cbf6d1e..e72b436927 100644
--- a/win32/config_H.vc
+++ b/win32/config_H.vc
@@ -70,14 +70,6 @@
*/
/*#define HAS_CUSERID / **/
-/* HAS_DBL_DIG:
- * This symbol, if defined, indicates that this system's <float.h>
- * or <limits.h> defines the symbol DBL_DIG, which is the number
- * of significant digits in a double precision number. If this
- * symbol is not defined, a guess of 15 is usually pretty good.
- */
-#define HAS_DBL_DIG /**/
-
/* HAS_DIFFTIME:
* This symbol, if defined, indicates that the difftime routine is
* available.