diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2004-05-13 21:16:44 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2004-05-13 21:16:44 (GMT) |
commit | 7c354e2d8bf2a531217ef13b02a074ec1a1e9c11 (patch) | |
tree | 6400ea3df438718f7c2b20a236ae0779c4f6c963 /configure.in | |
parent | a4c58cf6411c223af69d40c18c28d8e755c5d45e (diff) | |
download | hdf5-7c354e2d8bf2a531217ef13b02a074ec1a1e9c11.zip hdf5-7c354e2d8bf2a531217ef13b02a074ec1a1e9c11.tar.gz hdf5-7c354e2d8bf2a531217ef13b02a074ec1a1e9c11.tar.bz2 |
[svn-r8516] Purpose: Bug fix
Description: A new bug is found on HP. There is float exception during conversion from double to
unsigned long long when the value of double is very big.
Solution: Try to catch the problem in configure and skip this part of test.
Platforms tested: kelgia and verbena(mainly these two machines are involved)
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 34 |
1 files changed, 20 insertions, 14 deletions
diff --git a/configure.in b/configure.in index b42878d..67ef401 100644 --- a/configure.in +++ b/configure.in @@ -2408,20 +2408,20 @@ if test ${host_os_novers} = "solaris2.x"; then int ret = 0; if(sizeof(unsigned long)==8) { - l1 = 0xf000000000000b00; /*Round-down case*/ - l2 = 0xf000000000000401; /*Round-up case*/ - l3 = 0xf000000000000400; /*Round-down case*/ - l4 = 0xf000000000000c00; /*Round-up case*/ + 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 = 0xf000000000000b00; /*Round-down case*/ - ld2 = 0xf000000000000401; /*Round-up case*/ - ld3 = 0xf000000000000400; /*Round-down case*/ - ld4 = 0xf000000000000c00; /*Round-up case*/ + 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; @@ -2477,8 +2477,8 @@ AC_CACHE_VAL([hdf5_cv_fp_to_ullong_bottom_bit_works], [AC_TRY_RUN([ int main(void) { - float f = 111.60; - double d = 222.55; + float f = 111.60f; + double d = 222.55L; unsigned long long l1 = (unsigned long long)f; unsigned long long l2 = (unsigned long long)d; int ret = 0; @@ -2515,13 +2515,19 @@ AC_CACHE_VAL([hdf5_cv_fp_to_ullong_right_maximum], int main(void) { float f = 9701917572145405952.00f; - double d = 9701917572145405952.00; + double d1 = 9701917572145405952.00L; + double d2 = 2e40L; unsigned long long l1 = (unsigned long long)f; - unsigned long long l2 = (unsigned long long)d; - unsigned long long l3 = 0x7fffffffffffffffLLU; + unsigned long long l2 = (unsigned long long)d1; + unsigned long long l3; + unsigned long long l4 = 0x7fffffffffffffffLLU; int ret = 0; - if(l1 <= l3 || l2 <= l3) + if(l1 <= l4 || l2 <= l4) + ret = 1; + + l3 = (unsigned long long)d2; + if(l3 <= l4) ret = 1; done: |