From f1c17f305426190dc7027bc63fcb4d28b90ba89d Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Thu, 10 Sep 2015 05:38:47 -0500 Subject: [svn-r27741] Merge of r26606 from the trunk Remove HW_FP_TO_LLONG_NOT_WORKS macro/define, it was only addressing Windows .NET 2003 compiler issues. Fixes HDFFV-9189. Tested on: jam (minor change that has baked in the trunk for months) --- config/cmake/ConfigureChecks.cmake | 7 ------- config/cmake/H5pubconf.h.in | 4 ---- configure | 28 +--------------------------- configure.ac | 17 ----------------- release_docs/RELEASE.txt | 8 ++++++++ src/H5T.c | 2 -- src/H5Tconv.c | 4 ---- src/H5Tpkg.h | 11 ++--------- src/H5config.h.in | 4 ---- test/dt_arith.c | 4 ---- 10 files changed, 11 insertions(+), 78 deletions(-) diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index 9583eef..a8c2dfa 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -61,13 +61,6 @@ if (HDF5_ENABLE_HSIZET) set (${HDF_PREFIX}_HAVE_LARGE_HSIZET 1) endif (HDF5_ENABLE_HSIZET) -# ---------------------------------------------------------------------- -# Set the flag to indicate that the machine can handle converting -# floating-point to long long values. -# (This flag should be _unset_ for all machines) -# -# set (H5_HW_FP_TO_LLONG_NOT_WORKS 0) - # so far we have no check for this set (H5_HAVE_TMPFILE 1) diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in index cbfe775..5b71a86 100644 --- a/config/cmake/H5pubconf.h.in +++ b/config/cmake/H5pubconf.h.in @@ -362,10 +362,6 @@ /* Define to 1 if you have the `_scrsize' function. */ #cmakedefine H5_HAVE__SCRSIZE @H5_HAVE__SCRSIZE@ -/* Define if your system can't handle converting floating-point values to long - long. */ -#cmakedefine H5_HW_FP_TO_LLONG_NOT_WORKS @H5_HW_FP_TO_LLONG_NOT_WORKS@ - /* Define if HDF5's high-level library headers should be included in hdf5.h */ #cmakedefine H5_INCLUDE_HL @H5_INCLUDE_HL@ diff --git a/configure b/configure index c5b020a..854ecec 100755 --- a/configure +++ b/configure @@ -1,5 +1,5 @@ #! /bin/sh -# From configure.ac Id: configure.ac 27737 2015-09-10 03:47:01Z derobins . +# From configure.ac Id: configure.ac 27738 2015-09-10 04:20:13Z derobins . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for HDF5 1.8.16-snap16. # @@ -27234,32 +27234,6 @@ $as_echo "no" >&6; } fi ## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine can handle converting -## floating-point to long long values. -## (This flag should be _unset_ for all machines, except for Windows, where -## it's set in the custom Windows H5pubconf.h file) -## -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if converting floating-point values to long long is not working" >&5 -$as_echo_n "checking if converting floating-point values to long long is not working... " >&6; } -if ${hdf5_cv_convert_float_llong_not_works+:} false; then : - $as_echo_n "(cached) " >&6 -else - hdf5_cv_convert_float_llong_not_works=no -fi - - -if test ${hdf5_cv_convert_float_llong_not_works} = "yes"; then - -$as_echo "#define HW_FP_TO_LLONG_NOT_WORKS 1" >>confdefs.h - - { $as_echo "$as_me:${as_lineno-$LINENO}: result: true" >&5 -$as_echo "true" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: false" >&5 -$as_echo "false" >&6; } -fi - -## ---------------------------------------------------------------------- ## Set the flag to indicate that the machine has window style pathname, ## that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). ## (This flag should be _unset_ for all machines, except for Windows, where diff --git a/configure.ac b/configure.ac index f12aded..fd52ab7 100644 --- a/configure.ac +++ b/configure.ac @@ -2201,23 +2201,6 @@ else fi ## ---------------------------------------------------------------------- -## Set the flag to indicate that the machine can handle converting -## floating-point to long long values. -## (This flag should be _unset_ for all machines, except for Windows, where -## it's set in the custom Windows H5pubconf.h file) -## -AC_MSG_CHECKING([if converting floating-point values to long long is not working]) -AC_CACHE_VAL([hdf5_cv_convert_float_llong_not_works], [hdf5_cv_convert_float_llong_not_works=no]) - -if test ${hdf5_cv_convert_float_llong_not_works} = "yes"; then - AC_DEFINE([HW_FP_TO_LLONG_NOT_WORKS], [1], - [Define if your system can't handle converting floating-point values to long long.]) - AC_MSG_RESULT([true]) -else - AC_MSG_RESULT([false]) -fi - -## ---------------------------------------------------------------------- ## Set the flag to indicate that the machine has window style pathname, ## that is, "drive-letter:\" (e.g. "C:") or "drive-letter:/" (e.g. "C:/"). ## (This flag should be _unset_ for all machines, except for Windows, where diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index d3bbba2..96cb8db 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -157,6 +157,14 @@ New Features (DER - 2015/09/10 HDFFV-9079) + - Removed HW_FP_TO_LLONG_NOT_WORKS symbol and associated code from the + library. + + This was part of a work-around for the VS.NET 2003 compiler, which is + no longer supported. + + (DER - 2015/09/10 HDFFV-9189) + Library ------- diff --git a/src/H5T.c b/src/H5T.c index 6f29459..29d8f40 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -1275,10 +1275,8 @@ H5T_init_interface(void) status |= H5T_register(H5T_PERS_HARD, "ldbl_ulong", native_ldouble, native_ulong, H5T__conv_ldouble_ulong, H5AC_ind_dxpl_id, FALSE); /* From floats to long long */ -#if H5T_CONV_INTERNAL_FP_LLONG status |= H5T_register(H5T_PERS_HARD, "flt_llong", native_float, native_llong, H5T__conv_float_llong, H5AC_ind_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "dbl_llong", native_double, native_llong, H5T__conv_double_llong, H5AC_ind_dxpl_id, FALSE); -#endif /* H5T_CONV_INTERNAL_FP_LLONG */ #ifdef H5T_CONV_INTERNAL_LDOUBLE_LLONG status |= H5T_register(H5T_PERS_HARD, "ldbl_llong", native_ldouble, native_llong, H5T__conv_ldouble_llong, H5AC_ind_dxpl_id, FALSE); #endif /* H5T_CONV_INTERNAL_LDOUBLE_LLONG */ diff --git a/src/H5Tconv.c b/src/H5Tconv.c index b42b724..49bfeec 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -8656,7 +8656,6 @@ H5_GCC_DIAG_ON(float-equal) * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_FP_LLONG herr_t H5T__conv_float_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -8667,7 +8666,6 @@ H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(FLOAT, LLONG, float, long long, LLONG_MIN, LLONG_MAX); H5_GCC_DIAG_ON(float-equal) } -#endif /* H5T_CONV_INTERNAL_FP_LLONG */ /*------------------------------------------------------------------------- @@ -8710,7 +8708,6 @@ H5T__conv_float_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_FP_LLONG herr_t H5T__conv_double_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -8721,7 +8718,6 @@ H5_GCC_DIAG_OFF(float-equal) H5T_CONV_Fx(DOUBLE, LLONG, double, long long, LLONG_MIN, LLONG_MAX); H5_GCC_DIAG_ON(float-equal) } -#endif /*H5T_CONV_INTERNAL_FP_LLONG*/ /*------------------------------------------------------------------------- diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 958462b..0b0cd61 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -126,18 +126,11 @@ #define H5T_CONV_INTERNAL_ULLONG_LDOUBLE 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) -#define H5T_CONV_INTERNAL_FP_LLONG 1 -#endif - /* Define an internal macro for converting long double to long long. SGI compilers give some incorrect * conversions. Mac OS 10.4 gives incorrect conversions. HP-UX 11.00 compiler generates floating exception. * 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) && \ - defined(H5_LDOUBLE_TO_LLONG_ACCURATE)) || \ - (!H5_WANT_DATA_ACCURACY && !defined(H5_HW_FP_TO_LLONG_NOT_WORKS)) +#if (H5_WANT_DATA_ACCURACY && defined(H5_LDOUBLE_TO_LLONG_ACCURATE)) || \ + (!H5_WANT_DATA_ACCURACY) #define H5T_CONV_INTERNAL_LDOUBLE_LLONG 1 #endif diff --git a/src/H5config.h.in b/src/H5config.h.in index bbc9e3a..1561a05 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -350,10 +350,6 @@ /* Define if the compiler understands __inline__ */ #undef HAVE___INLINE__ -/* Define if your system can't handle converting floating-point values to long - long. */ -#undef HW_FP_TO_LLONG_NOT_WORKS - /* Define if HDF5's high-level library headers should be included in hdf5.h */ #undef INCLUDE_HL diff --git a/test/dt_arith.c b/test/dt_arith.c index c857b72..da3d49b 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -5013,12 +5013,8 @@ run_fp_int_conv(const char *name) #if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG if(!strcmp(name, "hw")) { /* Hardware conversion */ - /* Windows .NET 2003 doesn't work for hardware conversion of this case. - * .NET should define this macro H5_HW_FP_TO_LLONG_NOT_WORKS. */ -#ifndef H5_HW_FP_TO_LLONG_NOT_WORKS nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG); nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG); -#endif /*H5_HW_FP_TO_LLONG_NOT_WORKS*/ } else { /* Software conversion */ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG); nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG); -- cgit v0.12