summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-08-22 11:35:34 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-09-19 09:26:49 -0400
commit97eac949b0a5801c6ea6dfa29f54d0e6ecbb7137 (patch)
tree172cdd4a51ee722b15e399ede183007958548f1a /Configure
parentd6d36205af417d227110bac72e1801d73862770f (diff)
downloadperl-97eac949b0a5801c6ea6dfa29f54d0e6ecbb7137.tar.gz
quadmath __float128 for longdblkind.
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure16
1 files changed, 13 insertions, 3 deletions
diff --git a/Configure b/Configure
index cd711d2298..14a1b012ab 100755
--- a/Configure
+++ b/Configure
@@ -4454,7 +4454,6 @@ case "$usequadmath" in
*) usequadmath="$undef" ;;
esac
-
: Check if morebits is requested
case "$usemorebits" in
"$define"|true|[yY]*)
@@ -6808,6 +6807,10 @@ eval $setvar
set ldexpl d_ldexpl
eval $inlibc
+: see if this is a quadmath.h system
+set quadmath.h i_quadmath
+eval $inhdr
+
: check for length of long double
case "${d_longdbl}${longdblsize}" in
$define)
@@ -6855,11 +6858,18 @@ $cat <<EOP >try.c
#ifdef I_STDLIB
#include <stdlib.h>
#endif
-#include <stdio.h>
+#$usequadmath USE_QUADMATH
+#$i_quadmath I_QUADMATH
+#if defined(USE_QUADMATH) && defined(I_QUADMATH)
+#include <quadmath.h>
+static const __float128 d = -0.1Q;
+#else
static const long double d = -0.1L;
+#endif
+#include <stdio.h>
int main() {
unsigned const char* b = (unsigned const char*)(&d);
-#if LDBL_MANT_DIG == 113 && LONGDBLSIZE == 16
+#if (LDBL_MANT_DIG == 113 || FLT128_MANT_DIG == 113) && LONGDBLSIZE == 16
if (b[0] == 0x9A && b[1] == 0x99 && b[15] == 0xBF) {
/* IEEE 754 128-bit little-endian */
printf("1\n");