summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-03-28 02:19:21 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-03-28 02:19:21 (GMT)
commitc183d0d6f32504fc4829c57e9b9ef0d66a3923cd (patch)
tree94397a18a7f375b07d1a855d12833c42386f6ff2 /test
parent87db75e2e6f88b3dfdaf1c8758a1dbb2396d9105 (diff)
downloadhdf5-c183d0d6f32504fc4829c57e9b9ef0d66a3923cd.zip
hdf5-c183d0d6f32504fc4829c57e9b9ef0d66a3923cd.tar.gz
hdf5-c183d0d6f32504fc4829c57e9b9ef0d66a3923cd.tar.bz2
[svn-r26638] Description:
Bring r26598 from trunk to 1.8 branch: Bring r26501 from the autotools_rework branch to the trunk: Remove ULLONG_TO_LDOUBLE_PRECISION macro/define, as it's targeting bugs in the FreeBSD and Cygwin compilers. Tested on: Linux/32 2.6.18 (jam) w/serial & parallel (Daily tested on trunk for 2+ days)
Diffstat (limited to 'test')
-rw-r--r--test/dt_arith.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/test/dt_arith.c b/test/dt_arith.c
index 00d03d3..8823e24 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -4495,24 +4495,6 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
}
#endif /*end H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS*/
-/* For GNU compilers on FreeBSD(sleipnir), during conversion from 'unsigned long long'
-* to 'long double', the last 2 bytes of mantissa are lost. But this loss seems
-* acceptable. We allow it to go through instead of fail it. Sometimes, there's roundup
-* to the 3rd last byte of mantissa. So we only try to compare all but the last 3 bytes.
-*/
-#ifndef H5_ULLONG_TO_LDOUBLE_PRECISION
-#if H5_SIZEOF_LONG_DOUBLE !=0
- if(src_type==INT_ULLONG && dst_type==FLT_LDOUBLE) {
- long double tmp_s, tmp_h;
- HDmemcpy(&tmp_s,&buf[j*dst_size],sizeof(long double));
- HDmemcpy(&tmp_h,&hw[0],sizeof(long double));
- /*Don't compare the last 3 bytes of mantissa*/
- if(!HDmemcmp(&tmp_s+4, &tmp_h+4, sizeof(long double)-4))
- continue; /*no error*/
- }
-#endif
-#endif /*end H5_ULLONG_TO_LDOUBLE_PRECISION*/
-
#ifdef H5_VMS
/* OpenVMS converts the value of zero in char or short to negative zero in
@@ -5188,9 +5170,9 @@ run_int_fp_conv(const char *name)
HDputs(" Test skipped due to compiler error in handling conversion.");
}
#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */
-#if H5_ULLONG_TO_LDOUBLE_PRECISION && H5_LLONG_TO_LDOUBLE_CORRECT
+#if H5_LLONG_TO_LDOUBLE_CORRECT
nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULLONG, H5T_NATIVE_LDOUBLE);
-#else /* H5_ULLONG_TO_LDOUBLE_PRECISION && H5_LLONG_TO_LDOUBLE_CORRECT */
+#else /* H5_LLONG_TO_LDOUBLE_CORRECT */
{
char str[256]; /*hello string */
@@ -5200,7 +5182,7 @@ run_int_fp_conv(const char *name)
SKIPPED();
HDputs(" Test skipped due to compiler not handling conversion.");
}
-#endif /* H5_ULLONG_TO_LDOUBLE_PRECISION && H5_LLONG_TO_LDOUBLE_CORRECT */
+#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */
#endif
#endif