2016-01-29 10:06:01 +00:00
|
|
|
diff -rupN hdf5-1.8.16.orig/configure hdf5-1.8.16/configure
|
|
|
|
--- hdf5-1.8.16.orig/configure 2015-11-10 15:01:10.000000000 +0100
|
|
|
|
+++ hdf5-1.8.16/configure 2016-01-28 13:44:58.136709651 +0100
|
|
|
|
@@ -27347,6 +27347,14 @@ main ()
|
|
|
|
unsigned char s2[8];
|
|
|
|
int ret = 1;
|
2014-01-16 14:37:39 +00:00
|
|
|
|
|
|
|
+#if defined __powerpc64__ && defined _LITTLE_ENDIAN
|
2016-01-29 10:06:01 +00:00
|
|
|
+ /* Don't bother checking on ppc64le, we know it'll work, and
|
|
|
|
+ that what hdf5 calls 'special algorithm' simply is
|
|
|
|
+ IBM ldouble 128 (i.e. two seperately scaled doubles).
|
|
|
|
+ The check below assumes big endian. */
|
|
|
|
+ ret = 0;
|
2014-01-16 14:37:39 +00:00
|
|
|
+#endif
|
2016-01-29 10:06:01 +00:00
|
|
|
+
|
|
|
|
if(sizeof(long double) == 16 && sizeof(long) == 8) {
|
|
|
|
/*make sure the long double type has 16 bytes in size and
|
|
|
|
* 11 bits of exponent. If it is,
|
|
|
|
@@ -27464,6 +27472,14 @@ main ()
|
|
|
|
unsigned char s[16];
|
|
|
|
int flag=0, ret=1;
|
2014-01-16 14:37:39 +00:00
|
|
|
|
|
|
|
+#if defined __powerpc64__ && defined _LITTLE_ENDIAN
|
2016-01-29 10:06:01 +00:00
|
|
|
+ /* Don't bother checking on ppc64le, we know it'll work, and
|
|
|
|
+ that what hdf5 calls 'special algorithm' simply is
|
|
|
|
+ IBM ldouble 128 (i.e. two seperately scaled doubles).
|
|
|
|
+ The check below assumes big endian. */
|
|
|
|
+ ret = 0;
|
2014-01-16 14:37:39 +00:00
|
|
|
+#endif
|
2016-01-29 10:06:01 +00:00
|
|
|
+
|
|
|
|
/*Determine if long double has 16 byte in size, 11 bit exponent, and
|
|
|
|
*the bias is 0x3ff */
|
|
|
|
if(sizeof(long double) == 16) {
|
|
|
|
diff -rupN hdf5-1.8.16.orig/configure.ac hdf5-1.8.16/configure.ac
|
|
|
|
--- hdf5-1.8.16.orig/configure.ac 2015-11-04 23:29:55.000000000 +0100
|
|
|
|
+++ hdf5-1.8.16/configure.ac 2016-01-28 13:44:58.144709750 +0100
|
|
|
|
@@ -2277,7 +2277,15 @@ else
|
|
|
|
unsigned char s[16];
|
|
|
|
unsigned char s2[8];
|
|
|
|
int ret = 1;
|
|
|
|
-
|
|
|
|
+
|
2014-01-16 14:37:39 +00:00
|
|
|
+#if defined __powerpc64__ && defined _LITTLE_ENDIAN
|
2016-01-29 10:06:01 +00:00
|
|
|
+ /* Don't bother checking on ppc64le, we know it'll work, and
|
|
|
|
+ that what hdf5 calls 'special algorithm' simply is
|
|
|
|
+ IBM ldouble 128 (i.e. two seperately scaled doubles).
|
|
|
|
+ The check below assumes big endian. */
|
|
|
|
+ ret = 0;
|
2014-01-16 14:37:39 +00:00
|
|
|
+#endif
|
2016-01-29 10:06:01 +00:00
|
|
|
+
|
|
|
|
if(sizeof(long double) == 16 && sizeof(long) == 8) {
|
|
|
|
/*make sure the long double type has 16 bytes in size and
|
|
|
|
* 11 bits of exponent. If it is,
|
|
|
|
@@ -2354,6 +2362,14 @@ else
|
|
|
|
unsigned long ull;
|
|
|
|
unsigned char s[16];
|
|
|
|
int flag=0, ret=1;
|
|
|
|
+
|
2014-01-16 14:37:39 +00:00
|
|
|
+#if defined __powerpc64__ && defined _LITTLE_ENDIAN
|
2016-01-29 10:06:01 +00:00
|
|
|
+ /* Don't bother checking on ppc64le, we know it'll work, and
|
|
|
|
+ that what hdf5 calls 'special algorithm' simply is
|
|
|
|
+ IBM ldouble 128 (i.e. two seperately scaled doubles).
|
|
|
|
+ The check below assumes big endian. */
|
|
|
|
+ ret = 0;
|
2014-01-16 14:37:39 +00:00
|
|
|
+#endif
|
2016-01-29 10:06:01 +00:00
|
|
|
|
|
|
|
/*Determine if long double has 16 byte in size, 11 bit exponent, and
|
|
|
|
*the bias is 0x3ff */
|
|
|
|
diff -rupN hdf5-1.8.16.orig/test/dt_arith.c hdf5-1.8.16/test/dt_arith.c
|
|
|
|
--- hdf5-1.8.16.orig/test/dt_arith.c 2015-10-24 07:13:43.000000000 +0200
|
|
|
|
+++ hdf5-1.8.16/test/dt_arith.c 2016-01-28 13:44:58.153709861 +0100
|
|
|
|
@@ -3010,7 +3010,18 @@ test_conv_flt_1 (const char *name, int r
|
2014-01-16 14:37:39 +00:00
|
|
|
buf, saved, nelmts);
|
|
|
|
#if H5_SIZEOF_LONG_DOUBLE!=H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE!=0
|
|
|
|
} else if(src_type == FLT_LDOUBLE) {
|
|
|
|
- INIT_FP_SPECIAL(src_size, src_nbits, sendian, LDBL_MANT_DIG, dst_size,
|
|
|
|
+ size_t mant_dig = LDBL_MANT_DIG;
|
|
|
|
+ if (mant_dig >= src_nbits) {
|
|
|
|
+ /* This happens for IBM long double in little endian.
|
|
|
|
+ The macro LDBL_MANT_DIG says 106 mantissa bits, but the
|
|
|
|
+ HDF5 detection code actually represents it as a normal 64bit
|
|
|
|
+ double (52 bit mantissa) with the upper double being
|
|
|
|
+ unspec bits (which is sort of okay as the testsuite
|
|
|
|
+ wouldn't deal with that format correctly anyway). So
|
|
|
|
+ override the mantissa size. */
|
|
|
|
+ mant_dig = 52;
|
|
|
|
+ }
|
|
|
|
+ INIT_FP_SPECIAL(src_size, src_nbits, sendian, mant_dig, dst_size,
|
|
|
|
buf, saved, nelmts);
|
|
|
|
#endif
|
|
|
|
} else
|
2016-01-29 10:06:01 +00:00
|
|
|
@@ -3663,7 +3674,18 @@ test_conv_int_fp(const char *name, int r
|
2014-01-16 14:37:39 +00:00
|
|
|
INIT_FP_DENORM(long double, LDBL_MANT_DIG, src_size, src_nbits, sendian, dst_size,
|
|
|
|
buf, saved, nelmts);
|
|
|
|
} else {
|
|
|
|
- INIT_FP_SPECIAL(src_size, src_nbits, sendian, LDBL_MANT_DIG, dst_size, buf, saved, nelmts);
|
|
|
|
+ size_t mant_dig = LDBL_MANT_DIG;
|
|
|
|
+ if (mant_dig >= src_nbits) {
|
|
|
|
+ /* This happens for IBM long double in little endian.
|
|
|
|
+ The macro LDBL_MANT_DIG says 106 mantissa bits, but the
|
|
|
|
+ HDF5 detection code actually represents it as a normal 64bit
|
|
|
|
+ double (52 bit mantissa) with the upper double being
|
|
|
|
+ unspec bits (which is sort of okay as the testsuite
|
|
|
|
+ wouldn't deal with that format correctly anyway). So
|
|
|
|
+ override the mantissa size. */
|
|
|
|
+ mant_dig = 52;
|
|
|
|
+ }
|
|
|
|
+ INIT_FP_SPECIAL(src_size, src_nbits, sendian, mant_dig, dst_size, buf, saved, nelmts);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
} else
|