summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/cmake/ConfigureChecks.cmake12
-rw-r--r--config/cmake/ConversionTests.c66
-rw-r--r--config/cmake/H5pubconf.h.in4
-rwxr-xr-xconfigure115
-rw-r--r--configure.ac84
-rw-r--r--src/H5T.c6
-rw-r--r--src/H5Tconv.c6
-rw-r--r--src/H5Tpkg.h28
-rw-r--r--src/H5config.h.in4
9 files changed, 3 insertions, 322 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index 74fbd28..915ec56 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -260,18 +260,6 @@ ENDMACRO (H5MiscConversionTest)
# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can accurately convert
-# 'unsigned (long) long' values to 'float' and 'double' values.
-# (This flag should be set for all machines, except for the SGIs) and Solaris
-# 64-bit machines, where the short program below tests if round-up is
-# correctly handled.
-#
-if (CMAKE_SYSTEM MATCHES "solaris2.*")
- H5ConversionTests (H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE "Checking IF accurately converting unsigned long long to floating-point values")
-else (CMAKE_SYSTEM MATCHES "solaris2.*")
- set (H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE 1)
-endif (CMAKE_SYSTEM MATCHES "solaris2.*")
-# ----------------------------------------------------------------------
-# Set the flag to indicate that the machine can accurately convert
# 'float' or 'double' to 'unsigned long long' values.
# (This flag should be set for all machines, except for PGI compiler
# where round-up happens when the fraction of float-point value is greater
diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c
index e157909..82342a4 100644
--- a/config/cmake/ConversionTests.c
+++ b/config/cmake/ConversionTests.c
@@ -409,69 +409,3 @@ done:
#endif
-
-#ifdef H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE_TEST
-
-#include <string.h>
-
-
-int main(void)
-{
- unsigned long l1;
- unsigned long l2;
- unsigned long l3;
- unsigned long l4;
- unsigned long long ld1;
- unsigned long long ld2;
- unsigned long long ld3;
- unsigned long long ld4;
- double d1, d2, d3, d4;
- unsigned char s[8];
- int ret = 0;
-
- if(sizeof(unsigned long)==8) {
- l1 = 0xf000000000000b00UL; /*Round-down case*/
- l2 = 0xf000000000000401UL; /*Round-up case*/
- l3 = 0xf000000000000400UL; /*Round-down case*/
- l4 = 0xf000000000000c00UL; /*Round-up case*/
-
- d1 = (double)l1;
- d2 = (double)l2;
- d3 = (double)l3;
- d4 = (double)l4;
- } else if(sizeof(unsigned long long)==8) {
- ld1 = 0xf000000000000b00ULL; /*Round-down case*/
- ld2 = 0xf000000000000401ULL; /*Round-up case*/
- ld3 = 0xf000000000000400ULL; /*Round-down case*/
- ld4 = 0xf000000000000c00ULL; /*Round-up case*/
-
- d1 = (double)ld1;
- d2 = (double)ld2;
- d3 = (double)ld3;
- d4 = (double)ld4;
- } else {
- ret = 1;
- goto done;
- }
-
- memcpy(s, &d1, 8);
- if(s[7]!=1)
- ret = 1;
-
- memcpy(s, &d2, 8);
- if(s[7]!=1)
- ret = 1;
-
- memcpy(s, &d3, 8);
- if(s[7]!=0)
- ret = 1;
-
- memcpy(s, &d4, 8);
- if(s[7]!=2)
- ret = 1;
-
-done:
- exit(ret);
-}
-}
-#endif
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 8a160f4..588450a 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -673,10 +673,6 @@
correct precision. */
#cmakedefine H5_ULLONG_TO_LDOUBLE_PRECISION @H5_ULLONG_TO_LDOUBLE_PRECISION@
-/* Define if your system can accurately convert unsigned (long) long values to
- floating-point values. */
-#cmakedefine H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE @H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE@
-
/* Define using v1.6 public API symbols by default */
#cmakedefine H5_USE_16_API_DEFAULT @H5_USE_16_API_DEFAULT@
diff --git a/configure b/configure
index 0f21f9e..042085f 100755
--- a/configure
+++ b/configure
@@ -28150,121 +28150,6 @@ $as_echo "no" >&6; }
;;
esac
-
-## ----------------------------------------------------------------------
-## Set the flag to indicate that the machine can accurately convert
-## 'unsigned (long) long' values to 'float' and 'double' values.
-## (This flag should be set for all machines, except for the SGIs) and Solaris
-## 64-bit machines, where the short program below tests if round-up is
-## correctly handled.
-##
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if accurately converting unsigned long long to floating-point values" >&5
-$as_echo_n "checking if accurately converting unsigned long long to floating-point values... " >&6; }
-
-if test ${host_os_novers} = "solaris2.x"; then
- if ${hdf5_cv_ulong_to_fp_bottom_bit_accurate+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error $? "cannot run test program while cross compiling
-See \`config.log' for more details" "$LINENO" 5; }
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
- int main(void)
- {
- unsigned long l1;
- unsigned long l2;
- unsigned long l3;
- unsigned long l4;
- unsigned long long ld1;
- unsigned long long ld2;
- unsigned long long ld3;
- unsigned long long ld4;
- double d1, d2, d3, d4;
- unsigned char s[8];
- int ret = 0;
-
- if(sizeof(unsigned long)==8) {
- l1 = 0xf000000000000b00UL; /*Round-down case*/
- l2 = 0xf000000000000401UL; /*Round-up case*/
- l3 = 0xf000000000000400UL; /*Round-down case*/
- l4 = 0xf000000000000c00UL; /*Round-up case*/
-
- d1 = (double)l1;
- d2 = (double)l2;
- d3 = (double)l3;
- d4 = (double)l4;
- } else if(sizeof(unsigned long long)==8) {
- ld1 = 0xf000000000000b00ULL; /*Round-down case*/
- ld2 = 0xf000000000000401ULL; /*Round-up case*/
- ld3 = 0xf000000000000400ULL; /*Round-down case*/
- ld4 = 0xf000000000000c00ULL; /*Round-up case*/
-
- d1 = (double)ld1;
- d2 = (double)ld2;
- d3 = (double)ld3;
- d4 = (double)ld4;
- } else {
- ret = 1;
- goto done;
- }
-
- memcpy(s, &d1, 8);
- if(s[7]!=1)
- ret = 1;
-
- memcpy(s, &d2, 8);
- if(s[7]!=1)
- ret = 1;
-
- memcpy(s, &d3, 8);
- if(s[7]!=0)
- ret = 1;
-
- memcpy(s, &d4, 8);
- if(s[7]!=2)
- ret = 1;
-
-done:
- exit(ret);
- }
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- hdf5_cv_ulong_to_fp_bottom_bit_accurate=yes
-else
- hdf5_cv_ulong_to_fp_bottom_bit_accurate=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-
-else
- if ${hdf5_cv_ulong_to_fp_bottom_bit_accurate+:} false; then :
- $as_echo_n "(cached) " >&6
-else
- hdf5_cv_ulong_to_fp_bottom_bit_accurate=yes
-fi
-
-fi
-
-if test ${hdf5_cv_ulong_to_fp_bottom_bit_accurate} = "yes"; then
-
-$as_echo "#define ULONG_TO_FP_BOTTOM_BIT_ACCURATE 1" >>confdefs.h
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
## ----------------------------------------------------------------------
## Set the flag to indicate that the machine can accurately convert
## 'float' or 'double' to 'unsigned long long' values.
diff --git a/configure.ac b/configure.ac
index 76bfc95..bf74348 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2574,90 +2574,6 @@ case "`uname`" in
;;
esac
-
-## ----------------------------------------------------------------------
-## Set the flag to indicate that the machine can accurately convert
-## 'unsigned (long) long' values to 'float' and 'double' values.
-## (This flag should be set for all machines, except for the SGIs) and Solaris
-## 64-bit machines, where the short program below tests if round-up is
-## correctly handled.
-##
-AC_MSG_CHECKING([if accurately converting unsigned long long to floating-point values])
-
-if test ${host_os_novers} = "solaris2.x"; then
- AC_CACHE_VAL([hdf5_cv_ulong_to_fp_bottom_bit_accurate],
- [AC_TRY_RUN([
- int main(void)
- {
- unsigned long l1;
- unsigned long l2;
- unsigned long l3;
- unsigned long l4;
- unsigned long long ld1;
- unsigned long long ld2;
- unsigned long long ld3;
- unsigned long long ld4;
- double d1, d2, d3, d4;
- unsigned char s[8];
- int ret = 0;
-
- if(sizeof(unsigned long)==8) {
- l1 = 0xf000000000000b00UL; /*Round-down case*/
- l2 = 0xf000000000000401UL; /*Round-up case*/
- l3 = 0xf000000000000400UL; /*Round-down case*/
- l4 = 0xf000000000000c00UL; /*Round-up case*/
-
- d1 = (double)l1;
- d2 = (double)l2;
- d3 = (double)l3;
- d4 = (double)l4;
- } else if(sizeof(unsigned long long)==8) {
- ld1 = 0xf000000000000b00ULL; /*Round-down case*/
- ld2 = 0xf000000000000401ULL; /*Round-up case*/
- ld3 = 0xf000000000000400ULL; /*Round-down case*/
- ld4 = 0xf000000000000c00ULL; /*Round-up case*/
-
- d1 = (double)ld1;
- d2 = (double)ld2;
- d3 = (double)ld3;
- d4 = (double)ld4;
- } else {
- ret = 1;
- goto done;
- }
-
- memcpy(s, &d1, 8);
- if(s[7]!=1)
- ret = 1;
-
- memcpy(s, &d2, 8);
- if(s[7]!=1)
- ret = 1;
-
- memcpy(s, &d3, 8);
- if(s[7]!=0)
- ret = 1;
-
- memcpy(s, &d4, 8);
- if(s[7]!=2)
- ret = 1;
-
-done:
- exit(ret);
- }
- ], [hdf5_cv_ulong_to_fp_bottom_bit_accurate=yes], [hdf5_cv_ulong_to_fp_bottom_bit_accurate=no],)])
-else
- AC_CACHE_VAL([hdf5_cv_ulong_to_fp_bottom_bit_accurate], [hdf5_cv_ulong_to_fp_bottom_bit_accurate=yes])
-fi
-
-if test ${hdf5_cv_ulong_to_fp_bottom_bit_accurate} = "yes"; then
- AC_DEFINE([ULONG_TO_FP_BOTTOM_BIT_ACCURATE], [1],
- [Define if your system can accurately convert unsigned (long) long values to floating-point values.])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
## ----------------------------------------------------------------------
## Set the flag to indicate that the machine can accurately convert
## 'float' or 'double' to 'unsigned long long' values.
diff --git a/src/H5T.c b/src/H5T.c
index fb74c9c..d9b5d57 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -1220,15 +1220,9 @@ H5T_init_interface(void)
status |= H5T_register(H5T_PERS_HARD, "long_ldbl", native_long, native_ldouble, H5T__conv_long_ldouble, H5AC_dxpl_id, FALSE);
/* From unsigned long to floats */
-#if H5T_CONV_INTERNAL_ULONG_FLT
status |= H5T_register(H5T_PERS_HARD, "ulong_flt", native_ulong, native_float, H5T__conv_ulong_float, H5AC_dxpl_id, FALSE);
-#endif /* H5T_CONV_INTERNAL_ULONG_FLT */
-#if H5T_CONV_INTERNAL_ULONG_DBL
status |= H5T_register(H5T_PERS_HARD, "ulong_dbl", native_ulong, native_double, H5T__conv_ulong_double, H5AC_dxpl_id, FALSE);
-#endif /* H5T_CONV_INTERNAL_ULONG_DBL */
-#if H5T_CONV_INTERNAL_ULONG_LDOUBLE
status |= H5T_register(H5T_PERS_HARD, "ulong_ldbl", native_ulong, native_ldouble, H5T__conv_ulong_ldouble, H5AC_dxpl_id, FALSE);
-#endif /* H5T_CONV_INTERNAL_ULONG_LDOUBLE */
/* From long long to floats */
status |= H5T_register(H5T_PERS_HARD, "llong_flt", native_llong, native_float, H5T__conv_llong_float, H5AC_dxpl_id, FALSE);
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 673bd6b..d5e5d6e 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -7780,7 +7780,6 @@ H5T__conv_long_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
*
*-------------------------------------------------------------------------
*/
-#if H5T_CONV_INTERNAL_ULONG_FLT
herr_t
H5T__conv_ulong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7789,7 +7788,6 @@ H5T__conv_ulong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
{
H5T_CONV_xF(ULONG, FLOAT, unsigned long, float, -, -);
}
-#endif /* H5T_CONV_INTERNAL_ULONG_FLT */
/*-------------------------------------------------------------------------
@@ -7807,7 +7805,6 @@ H5T__conv_ulong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
*
*-------------------------------------------------------------------------
*/
-#if H5T_CONV_INTERNAL_ULONG_DBL
herr_t
H5T__conv_ulong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7816,7 +7813,6 @@ H5T__conv_ulong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
{
H5T_CONV_xF(ULONG, DOUBLE, unsigned long, double, -, -);
}
-#endif /* H5T_CONV_INTERNAL_ULONG_DBL */
/*-------------------------------------------------------------------------
@@ -7834,7 +7830,6 @@ H5T__conv_ulong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
*
*-------------------------------------------------------------------------
*/
-#if H5T_CONV_INTERNAL_ULONG_LDOUBLE
herr_t
H5T__conv_ulong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -7843,7 +7838,6 @@ H5T__conv_ulong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
{
H5T_CONV_xF(ULONG, LDOUBLE, unsigned long, long double, -, -);
}
-#endif /* H5T_CONV_INTERNAL_ULONG_LDOUBLE */
/*-------------------------------------------------------------------------
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 24debe9..ad0f6a3 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -124,38 +124,16 @@
#define H5T_CONV_INTERNAL_FP_LDOUBLE 1
#endif /*H5_SIZEOF_LONG_DOUBLE && H5_CONVERT_DENORMAL_FLOAT*/
-/* Define an internal macro for converting unsigned long to float.
- * Pathscale compiler on Sandia's Linux machine has some problem.
- * 64-bit Solaris does different rounding. */
-#if (H5_WANT_DATA_ACCURACY && H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE) || \
- (!H5_WANT_DATA_ACCURACY)
-#define H5T_CONV_INTERNAL_ULONG_FLT 1
-#endif
-
-/* Define an internal macro for converting unsigned (long) long to double.
- * 64-bit Solaris does different rounding. */
-#if (H5_WANT_DATA_ACCURACY && H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE) || (!H5_WANT_DATA_ACCURACY)
-#define H5T_CONV_INTERNAL_ULONG_DBL 1
-#endif
-
-/* Define an internal macro for converting unsigned long to long double. SGI compilers give some
- * incorrect conversions. 64-bit Solaris does different rounding. */
-#if (H5_WANT_DATA_ACCURACY && H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE) || \
- (!H5_WANT_DATA_ACCURACY)
-#define H5T_CONV_INTERNAL_ULONG_LDOUBLE 1
-#endif
-
/* Define an internal macro for converting long long to long double. Mac OS 10.4 gives some
* incorrect conversions. */
-#if (H5_WANT_DATA_ACCURACY && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || \
- (!H5_WANT_DATA_ACCURACY)
+#if (H5_WANT_DATA_ACCURACY && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || (!H5_WANT_DATA_ACCURACY)
#define H5T_CONV_INTERNAL_LLONG_LDOUBLE 1
#endif
/* Define an internal macro for converting unsigned long long to floating numbers. SGI compilers give
* some incorect conversion. 64-bit Solaris does different rounding. Windows Visual Studio 6 does
* not support unsigned long long. */
-#if (H5_WANT_DATA_ACCURACY && H5_ULLONG_TO_FP_CAST_WORKS && H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE) || \
+#if (H5_WANT_DATA_ACCURACY && H5_ULLONG_TO_FP_CAST_WORKS) || \
(!H5_WANT_DATA_ACCURACY && H5_ULLONG_TO_FP_CAST_WORKS)
#define H5T_CONV_INTERNAL_ULLONG_FP 1
#endif
@@ -165,7 +143,7 @@
* not support unsigned long long. For FreeBSD(sleipnir), the last 2 bytes of mantissa are lost when
* compiler tries to do the conversion. For Cygwin, compiler doesn't do rounding correctly.
* Mac OS 10.4 gives some incorrect result. */
-#if (H5_WANT_DATA_ACCURACY && H5_ULLONG_TO_FP_CAST_WORKS && H5_ULONG_TO_FP_BOTTOM_BIT_ACCURATE && \
+#if (H5_WANT_DATA_ACCURACY && H5_ULLONG_TO_FP_CAST_WORKS && \
defined(H5_ULLONG_TO_LDOUBLE_PRECISION) && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || (!H5_WANT_DATA_ACCURACY && \
H5_ULLONG_TO_FP_CAST_WORKS)
#define H5T_CONV_INTERNAL_ULLONG_LDOUBLE 1
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 67c2bb0..7c2ebc0 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -580,10 +580,6 @@
correct precision. */
#undef ULLONG_TO_LDOUBLE_PRECISION
-/* Define if your system can accurately convert unsigned (long) long values to
- floating-point values. */
-#undef ULONG_TO_FP_BOTTOM_BIT_ACCURATE
-
/* Define using v1.6 public API symbols by default */
#undef USE_16_API_DEFAULT