summaryrefslogtreecommitdiff
path: root/config_h.SH
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2015-12-08 08:48:40 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2015-12-14 06:38:34 -0500
commit3118d7d684b56cbeb702af874f4326683c45f045 (patch)
tree937a3fec05ec874b35552c3d82fe01a6c9fb83a6 /config_h.SH
parentb5897239a0c3c2f5ec699690086b30e7db4305d4 (diff)
downloadperl-3118d7d684b56cbeb702af874f4326683c45f045.tar.gz
Configure: mixed-endian double-doubles
The ppc64el is the first seen little-endian double-double (and also the first little-endian ppc), but it turns out its little-endianness is mixed: the doubles are still in big-endian order. Configure was expecting wrongly a fully byte-reversed double-double. Therefore extend the long double format detection to cover all the (double-double) permutations, though the formats of five and eight are rather unlikely (based on current platforms using double-double).
Diffstat (limited to 'config_h.SH')
-rwxr-xr-xconfig_h.SH15
1 files changed, 11 insertions, 4 deletions
diff --git a/config_h.SH b/config_h.SH
index aa806cfe2d..01ac23daa0 100755
--- a/config_h.SH
+++ b/config_h.SH
@@ -1967,8 +1967,10 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
* LONG_DOUBLE_IS_IEEE_754_128_BIT_BIG_ENDIAN
* LONG_DOUBLE_IS_X86_80_BIT_LITTLE_ENDIAN
* LONG_DOUBLE_IS_X86_80_BIT_BIG_ENDIAN
- * LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LITTLE_ENDIAN
- * LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BIG_ENDIAN
+ * LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_LE
+ * LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_BE
+ * LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_BE
+ * LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_LE
* LONG_DOUBLE_IS_UNKNOWN_FORMAT
* It is only defined if the system supports long doubles.
*/
@@ -1982,9 +1984,14 @@ sed <<!GROK!THIS! >$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un
#define LONG_DOUBLE_IS_IEEE_754_128_BIT_BIG_ENDIAN 2
#define LONG_DOUBLE_IS_X86_80_BIT_LITTLE_ENDIAN 3
#define LONG_DOUBLE_IS_X86_80_BIT_BIG_ENDIAN 4
-#define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LITTLE_ENDIAN 5
-#define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BIG_ENDIAN 6
+#define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_LE 5
+#define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_BE 6
+#define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_BE 7
+#define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_LE 8
#define LONG_DOUBLE_IS_UNKNOWN_FORMAT -1
+/* Backward compat. */
+#define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LITTLE_ENDIAN LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_LE_LE
+#define LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BIG_ENDIAN LONG_DOUBLE_IS_DOUBLEDOUBLE_128_BIT_BE_BE
#endif
/* HAS_LONG_LONG: