summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/cmake/ConfigureChecks.cmake6
-rw-r--r--config/cmake/ConversionTests.c16
-rw-r--r--config/cmake/H5pubconf.h.in4
-rwxr-xr-xconfigure64
-rw-r--r--configure.ac36
-rw-r--r--src/H5T.c2
-rw-r--r--src/H5Tconv.c2
-rw-r--r--src/H5Tpkg.h8
-rw-r--r--src/H5config.h.in4
-rw-r--r--test/dt_arith.c16
10 files changed, 1 insertions, 157 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index fad780c..7978c27 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -259,12 +259,6 @@ ENDMACRO (H5MiscConversionTest)
#-----------------------------------------------------------------------------
# ----------------------------------------------------------------------
-# Set the flag to indicate that the machine can accurately convert
-# 'long double' to 'unsigned int' values. (This flag should be set for
-# all machines, except for some Intel compilers on some Linux.)
-#
-H5ConversionTests (H5_LDOUBLE_TO_UINT_ACCURATE "Checking IF correctly converting long double to unsigned int values")
-# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can _compile_
# 'unsigned long long' to 'float' and 'double' typecasts.
# (This flag should be set for all machines.)
diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c
index 3b9b416..3003ef2 100644
--- a/config/cmake/ConversionTests.c
+++ b/config/cmake/ConversionTests.c
@@ -170,22 +170,6 @@ done:
}
#endif
-#ifdef H5_LDOUBLE_TO_UINT_ACCURATE_TEST
-int main(void)
-{
- long double ld = 2733248032.9183987530L;
- unsigned int i;
- int ret = 0;
-
- i = (unsigned int)ld;
- if(i!=2733248032 && i!=2733248031 && i!=2733248033)
- ret = 1;
-
-done:
- exit(ret);
-}
-#endif
-
#ifdef H5_LLONG_TO_LDOUBLE_CORRECT_TEST
int main(void)
{
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index b698731..b27e688 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -449,10 +449,6 @@
special algorithm. */
#cmakedefine H5_LDOUBLE_TO_LONG_SPECIAL @H5_LDOUBLE_TO_LONG_SPECIAL@
-/* Define if your system can convert long double to unsigned int values
- correctly. */
-#cmakedefine H5_LDOUBLE_TO_UINT_ACCURATE @H5_LDOUBLE_TO_UINT_ACCURATE@
-
/* Define if your system can compile long long to floating-point casts. */
#cmakedefine H5_LLONG_TO_FP_CAST_WORKS @H5_LLONG_TO_FP_CAST_WORKS@
diff --git a/configure b/configure
index c8183a3..7cf8b04 100755
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
#! /bin/sh
-# From configure.ac Id: configure.ac 26626 2015-03-27 21:03:13Z koziol .
+# From configure.ac Id: configure.ac 26628 2015-03-27 21:37:15Z koziol .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for HDF5 1.8.15-snap13.
#
@@ -28124,68 +28124,6 @@ $as_echo "no" >&6; }
esac
## ----------------------------------------------------------------------
-## Set the flag to indicate that the machine can accurately convert
-## 'long double' to 'unsigned int' values. (This flag should be set for
-## all machines, except for some Intel compilers on some Linux.)
-##
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if correctly converting long double to unsigned int values" >&5
-$as_echo_n "checking if correctly converting long double to unsigned int values... " >&6; }
-
-if test ${ac_cv_sizeof_long_double} = 0; then
- hdf5_cv_ldouble_to_uint_accurate=${hdf5_cv_ldouble_to_uint_accurate=no}
-else
- if ${hdf5_cv_ldouble_to_uint_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)
- {
- long double ld = 2733248032.9183987530L;
- unsigned int i;
- int ret = 0;
-
- i = (unsigned int)ld;
- if(i!=2733248032 && i!=2733248031 && i!=2733248033)
- ret = 1;
-
- done:
- exit(ret);
- }
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- hdf5_cv_ldouble_to_uint_accurate=yes
-else
- hdf5_cv_ldouble_to_uint_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
-
-fi
-
-if test ${hdf5_cv_ldouble_to_uint_accurate} = "yes"; then
-
-$as_echo "#define LDOUBLE_TO_UINT_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 _compile_
## 'unsigned long long' to 'float' and 'double' typecasts.
## (This flag should be set for all machines, except for under Windows when
diff --git a/configure.ac b/configure.ac
index edcdc63..8b85b31 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2558,42 +2558,6 @@ case "`uname`" in
esac
## ----------------------------------------------------------------------
-## Set the flag to indicate that the machine can accurately convert
-## 'long double' to 'unsigned int' values. (This flag should be set for
-## all machines, except for some Intel compilers on some Linux.)
-##
-AC_MSG_CHECKING([if correctly converting long double to unsigned int values])
-
-if test ${ac_cv_sizeof_long_double} = 0; then
- hdf5_cv_ldouble_to_uint_accurate=${hdf5_cv_ldouble_to_uint_accurate=no}
-else
- AC_CACHE_VAL([hdf5_cv_ldouble_to_uint_accurate],
- [AC_TRY_RUN([
- int main(void)
- {
- long double ld = 2733248032.9183987530L;
- unsigned int i;
- int ret = 0;
-
- i = (unsigned int)ld;
- if(i!=2733248032 && i!=2733248031 && i!=2733248033)
- ret = 1;
-
- done:
- exit(ret);
- }
- ], [hdf5_cv_ldouble_to_uint_accurate=yes], [hdf5_cv_ldouble_to_uint_accurate=no],)])
-fi
-
-if test ${hdf5_cv_ldouble_to_uint_accurate} = "yes"; then
- AC_DEFINE([LDOUBLE_TO_UINT_ACCURATE], [1],
- [Define if your system can convert long double to unsigned int values correctly.])
- AC_MSG_RESULT([yes])
-else
- AC_MSG_RESULT([no])
-fi
-
-## ----------------------------------------------------------------------
## Set the flag to indicate that the machine can _compile_
## 'unsigned long long' to 'float' and 'double' typecasts.
## (This flag should be set for all machines, except for under Windows when
diff --git a/src/H5T.c b/src/H5T.c
index 01911e1..029049d 100644
--- a/src/H5T.c
+++ b/src/H5T.c
@@ -1270,9 +1270,7 @@ H5T_init_interface(void)
/* From floats to unsigned int */
status |= H5T_register(H5T_PERS_HARD, "flt_uint", native_float, native_uint, H5T__conv_float_uint, H5AC_dxpl_id, FALSE);
status |= H5T_register(H5T_PERS_HARD, "dbl_uint", native_double, native_uint, H5T__conv_double_uint, H5AC_dxpl_id, FALSE);
-#if H5T_CONV_INTERNAL_LDOUBLE_UINT
status |= H5T_register(H5T_PERS_HARD, "ldbl_uint", native_ldouble, native_uint, H5T__conv_ldouble_uint, H5AC_dxpl_id, FALSE);
-#endif /* H5T_CONV_INTERNAL_LDOUBLE_UINT */
status |= H5T_register(H5T_PERS_HARD, "flt_long", native_float, native_long, H5T__conv_float_long, H5AC_dxpl_id, FALSE);
status |= H5T_register(H5T_PERS_HARD, "dbl_long", native_double, native_long, H5T__conv_double_long, H5AC_dxpl_id, FALSE);
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 463fa9b..d84d546 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -8472,7 +8472,6 @@ H5_GCC_DIAG_ON(float-equal)
*
*-------------------------------------------------------------------------
*/
-#if H5T_CONV_INTERNAL_LDOUBLE_UINT
herr_t
H5T__conv_ldouble_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata,
size_t nelmts, size_t buf_stride,
@@ -8483,7 +8482,6 @@ H5_GCC_DIAG_OFF(float-equal)
H5T_CONV_Fx(LDOUBLE, UINT, long double, unsigned int, 0, UINT_MAX);
H5_GCC_DIAG_ON(float-equal)
}
-#endif /* H5T_CONV_INTERNAL_LDOUBLE_UINT */
/*-------------------------------------------------------------------------
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 71ede65..a4f8b8c 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -149,14 +149,6 @@
#define H5T_CONV_INTERNAL_ULLONG_LDOUBLE 1
#endif
-/* Define an internal macro for converting long double to unsigned int. SGI compilers give some incorrect
- * conversions. HP-UX 11.00 compiler generates floating exception. Some Intel compilers on some Linux
- * give incorrect values. */
-#if (H5_WANT_DATA_ACCURACY && H5_LDOUBLE_TO_UINT_ACCURATE) \
- || (!H5_WANT_DATA_ACCURACY)
-#define H5T_CONV_INTERNAL_LDOUBLE_UINT 1
-#endif
-
/* Define an internal macro for converting floating numbers to long long. The hard conversion on Windows
* .NET 2003 has a bug and gives wrong exception value. */
#if (H5_WANT_DATA_ACCURACY && !defined(H5_HW_FP_TO_LLONG_NOT_WORKS)) || (!H5_WANT_DATA_ACCURACY)
diff --git a/src/H5config.h.in b/src/H5config.h.in
index 3465fba..81a214e 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -382,10 +382,6 @@
special algorithm. */
#undef LDOUBLE_TO_LONG_SPECIAL
-/* Define if your system can convert long double to unsigned int values
- correctly. */
-#undef LDOUBLE_TO_UINT_ACCURATE
-
/* Define if your system can compile long long to floating-point casts. */
#undef LLONG_TO_FP_CAST_WORKS
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 110c996..3b98a2e 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -5307,23 +5307,7 @@ run_fp_int_conv(const char *name)
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_SHORT);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_USHORT);
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_INT);
-#if H5_LDOUBLE_TO_UINT_ACCURATE
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_UINT);
-#else /*H5_LDOUBLE_TO_UINT_ACCURATE*/
- {
- char str[256]; /*string */
-
- HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions",
- name, "long double", "unsigned int");
- printf("%-70s", str);
- SKIPPED();
-#if H5_SIZEOF_LONG_DOUBLE!=0
- HDputs(" Test skipped due to hardware conversion error.");
-#else
- HDputs(" Test skipped due to disabled long double.");
-#endif
- }
-#endif /*H5_LDOUBLE_TO_UINT_ACCURATE*/
#if H5_SIZEOF_LONG!=H5_SIZEOF_INT && H5_SIZEOF_LONG_DOUBLE!=0
#ifndef H5_LDOUBLE_TO_LONG_SPECIAL
nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LONG);