summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2005-04-28 21:23:48 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2005-04-28 21:23:48 (GMT)
commite5b61f99aba874bf99b4ac585342ad2b399d5768 (patch)
treee3577859e511dc8e1bee098166a299c1c5db0887 /src
parente445e815d69529262c5ed7e06a352f28a22f9dc0 (diff)
downloadhdf5-e5b61f99aba874bf99b4ac585342ad2b399d5768.zip
hdf5-e5b61f99aba874bf99b4ac585342ad2b399d5768.tar.gz
hdf5-e5b61f99aba874bf99b4ac585342ad2b399d5768.tar.bz2
[svn-r10690] Purpose:
Bug fix Description: On visual studio 6.0, conversion from unsigned long long to double is not supported. Even during compilation stage, it will fail. Solution: Albert changed the way the macro is handled so that for windowx MSVS 6.0, the code that has conversion from unsigned long long to double will not compile. Platforms tested: windows, linux Misc. update:
Diffstat (limited to 'src')
-rw-r--r--src/H5Ztrans.c29
1 files changed, 17 insertions, 12 deletions
diff --git a/src/H5Ztrans.c b/src/H5Ztrans.c
index d8e45cf..b4b8a9d 100644
--- a/src/H5Ztrans.c
+++ b/src/H5Ztrans.c
@@ -149,15 +149,26 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
#ifndef H5_ULLONG_TO_FP_CAST_WORKS
-#define ULLONG_TO_FP_XFORM_TYPE_OP_ERROR HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Cannot convert from unsigned long long to double: required for data transform")
+#define H5Z_XFORM_ULL_DO_OP1(RESL,RESR,TYPE,OP,SIZE) \
+{ \
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Cannot convert from unsigned long long to double: required for data transform") \
+}
#else
-#define ULLONG_TO_FP_XFORM_TYPE_OP_ERROR
+#define H5Z_XFORM_ULL_DO_OP1(RESL,RESR,TYPE,OP,SIZE) \
+ H5Z_XFORM_DO_OP1(RESL,RESR,TYPE,OP,SIZE)
#endif
+/* Windows Intel 8.1 compiler has error converting long long to double.
+ * Hard code it in.
+ */
#ifdef H5_LLONG_TO_FP_CAST_BROKEN
-#define LLONG_TO_FP_XFORM_TYPE_OP_ERROR HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Cannot convert from long long to double: required for data transform")
+#define H5Z_XFORM_LL_DO_OP1(RESL,RESR,TYPE,OP,SIZE) \
+{ \
+ HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "Cannot convert from long long to double: required for data transform") \
+}
#else
-#define LLONG_TO_FP_XFORM_TYPE_OP_ERROR
+#define H5Z_XFORM_LL_DO_OP1(RESL,RESR,TYPE,OP,SIZE) \
+ H5Z_XFORM_DO_OP1(RESL,RESR,TYPE,OP,SIZE)
#endif
#define H5Z_XFORM_TYPE_OP(RESL,RESR,TYPE,OP,SIZE) \
@@ -181,15 +192,9 @@ static void H5Z_print(H5Z_node *tree, FILE *stream);
else if((TYPE) == H5T_NATIVE_ULONG) \
H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned long, OP, (SIZE)) \
else if((TYPE) == H5T_NATIVE_LLONG) \
- { \
- LLONG_TO_FP_XFORM_TYPE_OP_ERROR \
- H5Z_XFORM_DO_OP1((RESL), (RESR), long_long, OP, (SIZE)) \
- } \
+ H5Z_XFORM_LL_DO_OP1((RESL), (RESR), long_long, OP, (SIZE)) \
else if((TYPE) == H5T_NATIVE_ULLONG) \
- { \
- ULLONG_TO_FP_XFORM_TYPE_OP_ERROR \
- H5Z_XFORM_DO_OP1((RESL), (RESR), unsigned long_long, OP, (SIZE)) \
- } \
+ H5Z_XFORM_ULL_DO_OP1((RESL), (RESR), unsigned long_long, OP, (SIZE)) \
else if((TYPE) == H5T_NATIVE_FLOAT) \
H5Z_XFORM_DO_OP1((RESL), (RESR), float, OP, (SIZE)) \
else if((TYPE) == H5T_NATIVE_DOUBLE) \