diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2015-03-26 01:47:41 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2015-03-26 01:47:41 (GMT) |
commit | b03d04742d4d169ed851b3cd154c42a1c075da1e (patch) | |
tree | 561f8f19426d948d11c3d7d33d04c19e8ee8b54e /src | |
parent | c622cc7b38791567a6e41d147121a76a20837e96 (diff) | |
download | hdf5-b03d04742d4d169ed851b3cd154c42a1c075da1e.zip hdf5-b03d04742d4d169ed851b3cd154c42a1c075da1e.tar.gz hdf5-b03d04742d4d169ed851b3cd154c42a1c075da1e.tar.bz2 |
[svn-r26596] Description:
Bring r26499 from autotools_rework branch to trunk:
Remove ULLONG_TO_FP_CAST_WORKS macro/define, as it only applies to older
platforms we aren't supporting any longer.
Tested on:
Linux/32 2.6.18 (jam) w/serial & parallel
(Daily tested on branch for 2+ days)
Diffstat (limited to 'src')
-rw-r--r-- | src/H5T.c | 2 | ||||
-rw-r--r-- | src/H5Tconv.c | 4 | ||||
-rw-r--r-- | src/H5Tpkg.h | 13 | ||||
-rw-r--r-- | src/H5Ztrans.c | 21 | ||||
-rw-r--r-- | src/H5config.h.in | 4 |
5 files changed, 4 insertions, 40 deletions
@@ -1232,10 +1232,8 @@ H5T_init_interface(void) #endif /* H5T_CONV_INTERNAL_LLONG_LDOUBLE */ /* From unsigned long long to floats */ -#if H5T_CONV_INTERNAL_ULLONG_FP status |= H5T_register(H5T_PERS_HARD, "ullong_flt", native_ullong, native_float, H5T__conv_ullong_float, H5AC_dxpl_id, FALSE); status |= H5T_register(H5T_PERS_HARD, "ullong_dbl", native_ullong, native_double, H5T__conv_ullong_double, H5AC_dxpl_id, FALSE); -#endif /* H5T_CONV_INTERNAL_ULLONG_FP */ #ifdef H5T_CONV_INTERNAL_ULLONG_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "ullong_ldbl", native_ullong, native_ldouble, H5T__conv_ullong_ldouble, H5AC_dxpl_id, FALSE); #endif /* H5T_CONV_INTERNAL_ULLONG_LDOUBLE */ diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 29d2520..d142bde 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -7932,7 +7932,6 @@ H5T__conv_llong_ldouble (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_ULLONG_FP herr_t H5T__conv_ullong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -7941,7 +7940,6 @@ H5T__conv_ullong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, { H5T_CONV_xF(ULLONG, FLOAT, unsigned long long, float, -, -); } -#endif /*H5T_CONV_INTERNAL_ULLONG_FP*/ /*------------------------------------------------------------------------- @@ -7959,7 +7957,6 @@ H5T__conv_ullong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, * *------------------------------------------------------------------------- */ -#if H5T_CONV_INTERNAL_ULLONG_FP herr_t H5T__conv_ullong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts, size_t buf_stride, @@ -7968,7 +7965,6 @@ H5T__conv_ullong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, { H5T_CONV_xF(ULLONG, DOUBLE, unsigned long long, double, -, -); } -#endif /*H5T_CONV_INTERNAL_ULLONG_FP*/ /*------------------------------------------------------------------------- diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index a4f8b8c..ffcfe0a 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -130,22 +130,13 @@ #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_WANT_DATA_ACCURACY && H5_ULLONG_TO_FP_CAST_WORKS) -#define H5T_CONV_INTERNAL_ULLONG_FP 1 -#endif - /* Define an internal macro for converting unsigned long long to long double. SGI compilers give * some incorect conversion. 64-bit Solaris does different rounding. Windows Visual Studio 6 does * 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 && \ - defined(H5_ULLONG_TO_LDOUBLE_PRECISION) && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || (!H5_WANT_DATA_ACCURACY && \ - H5_ULLONG_TO_FP_CAST_WORKS) +#if (H5_WANT_DATA_ACCURACY && \ + defined(H5_ULLONG_TO_LDOUBLE_PRECISION) && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || (!H5_WANT_DATA_ACCURACY) #define H5T_CONV_INTERNAL_ULLONG_LDOUBLE 1 #endif diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c index 1b8c096..7d46d70 100644 --- a/src/H5Ztrans.c +++ b/src/H5Ztrans.c @@ -160,23 +160,6 @@ static void H5Z_print(H5Z_node *tree, FILE *stream); HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Unexpected type conversion operation") \ } -/* Due to the undefined nature of embedding macros/conditionals within macros, we employ - * this clever little hack. We always compile in the code for the type conversion, even if - * it isn't supported in the compiler. To avoid errors, we define ULLONG_TO_FP_XFORM_TYPE_OP_ERROR on - * unsupported compilers, which will cause the code to execute HGOTO_ERROR and skip the code - * that does the actual conversion */ - - -#ifndef H5_ULLONG_TO_FP_CAST_WORKS -#define H5Z_XFORM_ULL_DO_OP1(RESL,RESR,TYPE,OP,SIZE) \ -{ \ - HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Cannot convert from unsigned long long to double: required for data transform") \ -} -#else -#define H5Z_XFORM_ULL_DO_OP1(RESL,RESR,TYPE,OP,SIZE) \ - H5Z_XFORM_DO_OP1(RESL,RESR,TYPE,OP,SIZE) -#endif - /* Windows Intel 8.1 compiler has error converting long long to double. * Hard code it in. */ @@ -213,7 +196,7 @@ static void H5Z_print(H5Z_node *tree, FILE *stream); else if((TYPE) == H5T_NATIVE_LLONG) \ H5Z_XFORM_LL_DO_OP1((RESL), (RESR), long long, OP, (SIZE)) \ else if((TYPE) == H5T_NATIVE_ULLONG) \ - H5Z_XFORM_ULL_DO_OP1((RESL), (RESR), unsigned long long, OP, (SIZE)) \ + H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned long long, OP, (SIZE)) \ else if((TYPE) == H5T_NATIVE_FLOAT) \ H5Z_XFORM_DO_OP1((RESL), (RESR), float, OP, (SIZE)) \ else if((TYPE) == H5T_NATIVE_DOUBLE) \ @@ -245,7 +228,7 @@ static void H5Z_print(H5Z_node *tree, FILE *stream); else if((TYPE) == H5T_NATIVE_LLONG) \ H5Z_XFORM_LL_DO_OP1((RESL), (RESR), long long, OP, (SIZE)) \ else if((TYPE) == H5T_NATIVE_ULLONG) \ - H5Z_XFORM_ULL_DO_OP1((RESL), (RESR), unsigned long long, OP, (SIZE)) \ + H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned long long, OP, (SIZE)) \ else if((TYPE) == H5T_NATIVE_FLOAT) \ H5Z_XFORM_DO_OP1((RESL), (RESR), float, OP, (SIZE)) \ else if((TYPE) == H5T_NATIVE_DOUBLE) \ diff --git a/src/H5config.h.in b/src/H5config.h.in index 81a214e..2ab7837 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -560,10 +560,6 @@ /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ #undef TIME_WITH_SYS_TIME -/* Define if your system can compile unsigned long long to floating-point - casts. */ -#undef ULLONG_TO_FP_CAST_WORKS - /* Define if your system can convert unsigned long long to long double with correct precision. */ #undef ULLONG_TO_LDOUBLE_PRECISION |