summaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2015-03-26 03:05:30 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2015-03-26 03:05:30 (GMT)
commit90cc5df290516821b0b4c535c805771516832c60 (patch)
tree44b61a8acfba0eeadbcb9b0bbcb1cc31326cb332 /config
parent27dd4e0f05c72c9ec3745965d525cc4637fc2e0a (diff)
downloadhdf5-90cc5df290516821b0b4c535c805771516832c60.zip
hdf5-90cc5df290516821b0b4c535c805771516832c60.tar.gz
hdf5-90cc5df290516821b0b4c535c805771516832c60.tar.bz2
[svn-r26598] Description:
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 branch for 2+ days)
Diffstat (limited to 'config')
-rw-r--r--config/cmake/ConfigureChecks.cmake8
-rw-r--r--config/cmake/ConversionTests.c79
-rw-r--r--config/cmake/H5pubconf.h.in4
3 files changed, 0 insertions, 91 deletions
diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake
index e8951c6..2b4c4a3 100644
--- a/config/cmake/ConfigureChecks.cmake
+++ b/config/cmake/ConfigureChecks.cmake
@@ -259,14 +259,6 @@ ENDMACRO (H5MiscConversionTest)
#-----------------------------------------------------------------------------
# ----------------------------------------------------------------------
-# Set the flag to indicate that the machine can convert from
-# 'unsigned long long' to 'long double' without precision loss.
-# (This flag should be set for all machines, except for FreeBSD(sleipnir)
-# where the last 2 bytes of mantissa are lost when compiler tries to do
-# the conversion, and Cygwin where compiler doesn't do rounding correctly.)
-#
-H5ConversionTests (H5_ULLONG_TO_LDOUBLE_PRECISION "Checking IF converting unsigned long long to long double with precision")
-# ----------------------------------------------------------------------
# Set the flag to indicate that the machine can handle overflow converting
# all floating-point to all integer types.
# (This flag should be set for all machines, except for Cray X1 where
diff --git a/config/cmake/ConversionTests.c b/config/cmake/ConversionTests.c
index 3003ef2..9a81a20 100644
--- a/config/cmake/ConversionTests.c
+++ b/config/cmake/ConversionTests.c
@@ -266,82 +266,3 @@ main ()
#endif
-#ifdef H5_ULLONG_TO_LDOUBLE_PRECISION_TEST
-
-#include <stddef.h>
-#include <stdlib.h>
-#include <string.h>
-
-int main(void)
-{
- /* General variables */
- int endian;
- int tst_value = 1;
- int ret = 0;
-
- /* For FreeBSD */
- unsigned long long l = 0xa601e80bda85fcefULL;
- long double ld;
- unsigned char *c1, *c2;
- size_t size;
-
- /* For Cygwin */
- unsigned long long l_cyg = 0xfffffffffffffff0ULL;
- long double ld_cyg;
- unsigned char *c2_cyg;
- size_t size_cyg;
-
-
- /* Determine this system's endianess */
- c1 = (unsigned char*)calloc(1, sizeof(int));
- memcpy((void*)c1, &tst_value, sizeof(int));
- if(c1[0]==1)
- endian = 0; /* little endian */
- else
- endian = 1; /* big endian */
-
- /* For FreeBSD */
- size = sizeof(long double);
- memset(&ld, 0, size);
- ld = (long double)l;
-
- c2 = (unsigned char*)calloc(1, size);
- memcpy((void*)c2, &ld, size);
-
- /* Test if the last 2 bytes of mantissa are lost. Mainly for FreeBSD on Intel
- * architecture(sleipnir) where it happens. */
- /*if(endian==0 && c2[0]==0 && c2[1]==0)*/ /*little endian*/
- if(endian==0 && c2[0]==0) { /*little endian*/
- ret = 1;
- goto done;
- }
-
- /* For Cygwin */
- size_cyg = sizeof(long double);
- memset(&ld_cyg, 0, size);
- ld_cyg = (long double)l_cyg;
-
- c2_cyg = (unsigned char*)calloc(1, size_cyg);
- memcpy((void*)c2_cyg, &ld_cyg, size_cyg);
-
- /* Test if the last 4 bytes(roughly) of mantissa are rounded up. Mainly for Cygwin
- * where the values like 0xffffffffffffffff, 0xfffffffffffffffe, ...,
- * 0xfffffffffffff000 ... are rounded up as 0x0000403f8000000000000000
- * instead of 0x0000403effffffffffffffff, 0x0000403efffffffffffffffe, ...,
- * 0x0000403efffffffffffff000 ...
- */
- if(endian==0 && c2_cyg[0]==0 && c2_cyg[1]==0 && c2_cyg[2]==0 && c2_cyg[3]==0)
- ret = 1;
-
-done:
- if(c1)
- free(c1);
- if(c2)
- free(c2);
- if(c2_cyg)
- free(c2_cyg);
- exit(ret);
-}
-
-#endif
-
diff --git a/config/cmake/H5pubconf.h.in b/config/cmake/H5pubconf.h.in
index 39b6a60..8d7642e 100644
--- a/config/cmake/H5pubconf.h.in
+++ b/config/cmake/H5pubconf.h.in
@@ -646,10 +646,6 @@
/* Define to 1 if your <sys/time.h> declares `struct tm'. */
#cmakedefine H5_TM_IN_SYS_TIME @H5_TM_IN_SYS_TIME@
-/* Define if your system can convert unsigned long long to long double with
- correct precision. */
-#cmakedefine H5_ULLONG_TO_LDOUBLE_PRECISION @H5_ULLONG_TO_LDOUBLE_PRECISION@
-
/* Define using v1.6 public API symbols by default */
#cmakedefine H5_USE_16_API_DEFAULT @H5_USE_16_API_DEFAULT@