summaryrefslogtreecommitdiffstats
path: root/src/H5Tpkg.h
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2015-07-24 07:04:52 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2015-07-24 07:04:52 (GMT)
commitac5a796db2b3b35a74b69fc957fc020d42adf6ef (patch)
tree37fe5df1ad9deaac249894a3568909bc2b02d26d /src/H5Tpkg.h
parent81d3377737c866deb77628b1b9e89e1fc675724a (diff)
downloadhdf5-ac5a796db2b3b35a74b69fc957fc020d42adf6ef.zip
hdf5-ac5a796db2b3b35a74b69fc957fc020d42adf6ef.tar.gz
hdf5-ac5a796db2b3b35a74b69fc957fc020d42adf6ef.tar.bz2
[svn-r27428] Bug fix: DAILYTEST-170
Description: XL compilers in ostrich (PowerPC64 linux) fail in test/dt_arith because of the removal of the LLONG_TO_LDOUBLE_CORRECT (removed in r26625) and LDOUBLE_TO_LLONG_ACCURATE (removed in r26623). Solution: Reverse revisions r26623: bring back LDOUBLE_TO_LLONG_ACCURATE configure macro r26625: bring back LLONG_TO_LDOUBLE_CORRECT configure macro r26627: bring back WANT_DATA_ACCURACY configure macro which is used together with the above two macros. This also brings back the enable-dconv-accuracy configure option. Tested: h5committested. Also tested in ostrich using the XL compilers.
Diffstat (limited to 'src/H5Tpkg.h')
-rw-r--r--src/H5Tpkg.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h
index 4697bfc..0b0cd61 100644
--- a/src/H5Tpkg.h
+++ b/src/H5Tpkg.h
@@ -111,6 +111,39 @@
/* (_not_ setting H5T_VISIT_SIMPLE and setting either H5T_VISIT_COMPLEX_FIRST or H5T_VISIT_COMPLEX_LAST will mean visiting all nodes _except_ "simple" "leafs" in the "tree" */
+/* Define an internal macro for converting long long to long double. Mac OS 10.4 gives some
+ * incorrect conversions. */
+#if (H5_WANT_DATA_ACCURACY && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || (!H5_WANT_DATA_ACCURACY)
+#define H5T_CONV_INTERNAL_LLONG_LDOUBLE 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 && defined(H5_LLONG_TO_LDOUBLE_CORRECT)) || (!H5_WANT_DATA_ACCURACY)
+#define H5T_CONV_INTERNAL_ULLONG_LDOUBLE 1
+#endif
+
+/* Define an internal macro for converting long double to long long. SGI compilers give some incorrect
+ * conversions. Mac OS 10.4 gives incorrect conversions. HP-UX 11.00 compiler generates floating exception.
+ * The hard conversion on Windows .NET 2003 has a bug and gives wrong exception value. */
+#if (H5_WANT_DATA_ACCURACY && defined(H5_LDOUBLE_TO_LLONG_ACCURATE)) || \
+ (!H5_WANT_DATA_ACCURACY)
+#define H5T_CONV_INTERNAL_LDOUBLE_LLONG 1
+#endif
+
+/* Define an internal macro for converting long double to unsigned long long. SGI compilers give some
+ * incorrect conversions. Mac OS 10.4 gives incorrect conversions. HP-UX 11.00 compiler generates
+ * floating exception. */
+#if (H5_WANT_DATA_ACCURACY && defined(H5_LDOUBLE_TO_LLONG_ACCURATE)) || \
+ (!H5_WANT_DATA_ACCURACY)
+#define H5T_CONV_INTERNAL_LDOUBLE_ULLONG 1
+#else
+#define H5T_CONV_INTERNAL_LDOUBLE_ULLONG 0
+#endif
+
/* Statistics about a conversion function */
struct H5T_stats_t {
unsigned ncalls; /*num calls to conversion function */