diff options
-rwxr-xr-x | configure | 4 | ||||
-rw-r--r-- | configure.in | 8 | ||||
-rw-r--r-- | src/H5config.h.in | 5 | ||||
-rw-r--r-- | test/dt_arith.c | 6 |
4 files changed, 15 insertions, 8 deletions
@@ -1,5 +1,5 @@ #! /bin/sh -# From configure.in Id: configure.in 18696 2010-05-04 16:35:11Z songyulu . +# From configure.in Id: configure.in 18701 2010-05-04 23:57:47Z acheng . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.65 for HDF5 1.8.4-snap21. # @@ -7633,7 +7633,7 @@ fi case "`uname`" in CYGWIN*) -$as_echo "#define CYGWIN 1" >>confdefs.h +$as_echo "#define CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM 1" >>confdefs.h if test "X${enable_shared}" = "Xyes"; then echo ' warning: shared libraries are not supported on Cygwin!' diff --git a/configure.in b/configure.in index eb0b8e3..bc9ff78 100644 --- a/configure.in +++ b/configure.in @@ -961,9 +961,15 @@ fi dnl ---------------------------------------------------------------------- dnl Shared libraries are not currently supported under Cygwin. +dnl +dnl The GCC compiler on Cygwin running on Windows XP has rounding problem +dnl in the data conversion dt_arith.c from unsigned long long to long +dnl double (see bug #1813). I define a macro here to skip the test for +dnl Cygwin. I'll come back and figure out the problem once I'm available. +dnl 2010/5/5 - SLU case "`uname`" in CYGWIN*) - AC_DEFINE([CYGWIN], [1], [Define a macro for Cygwin system]) + AC_DEFINE([CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM], [1], [Define a macro for Cygwin (on XP only) where the compiler has rounding problem converting from unsigned long long to long double]) if test "X${enable_shared}" = "Xyes"; then echo ' warning: shared libraries are not supported on Cygwin!' echo ' disabling shared libraries' diff --git a/src/H5config.h.in b/src/H5config.h.in index ce5753a..0534b74 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -17,8 +17,9 @@ /* Define if C++ compiler recognizes offsetof */ #undef CXX_HAVE_OFFSETOF -/* Define a macro for Cygwin system */ -#undef CYGWIN +/* Define a macro for Cygwin (on XP only) where the compiler has rounding + problem converting from unsigned long long to long double */ +#undef CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM /* Define the default virtual file driver to compile */ #undef DEFAULT_VFD diff --git a/test/dt_arith.c b/test/dt_arith.c index 7e7b043..2e23f25 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -4947,9 +4947,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_CYGWIN && H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION && H5_LLONG_TO_LDOUBLE_CORRECT +#if !H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM && H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION && H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULLONG, H5T_NATIVE_LDOUBLE); -#else /* !H5_CYGWIN && H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION && H5_LLONG_TO_LDOUBLE_CORRECT */ +#else /* !H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM && H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION && H5_LLONG_TO_LDOUBLE_CORRECT */ { char str[256]; /*hello string */ @@ -4959,7 +4959,7 @@ run_int_fp_conv(const char *name) SKIPPED(); HDputs(" Test skipped due to compiler not handling conversion."); } -#endif /* !H5_CYGWIN && H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION && H5_LLONG_TO_LDOUBLE_CORRECT */ +#endif /* !H5_CYGWIN_ULLONG_TO_LDOUBLE_ROUND_PROBLEM && H5_ULLONG_TO_FP_CAST_WORKS && H5_ULLONG_TO_LDOUBLE_PRECISION && H5_LLONG_TO_LDOUBLE_CORRECT */ #endif #endif #else /*H5_INTEGER_TO_LDOUBLE_ACCURATE*/ |