summaryrefslogtreecommitdiffstats
path: root/c++/src
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2007-08-01 22:15:32 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2007-08-01 22:15:32 (GMT)
commit82e6cac79aa902301900443bcca8d4720354d05d (patch)
tree22887efce746496deb2eb27e8f6b8abb1e6ae7bb /c++/src
parent32180b2b70ee3b3cdf3291de54c2b71725852395 (diff)
downloadhdf5-82e6cac79aa902301900443bcca8d4720354d05d.zip
hdf5-82e6cac79aa902301900443bcca8d4720354d05d.tar.gz
hdf5-82e6cac79aa902301900443bcca8d4720354d05d.tar.bz2
[svn-r14032] Maintenance: finally finished the fix for OFFSETOF problem for C++ with pgCC and Sun CC compilers
Binh-Minh came up with the code fix and Mike. M did changes to configuration to make it to work. Tested: kagiso with pgcc, pgCC and gcc, g++ compilers linew with the SUN cc and CC compilers 32 and 64-bit smirom with gcc, g++, and PGI version 7.0 All sequential daily tests that were skipped before for 1.8 branch are enabled now.
Diffstat (limited to 'c++/src')
-rw-r--r--c++/src/H5Cpp.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/c++/src/H5Cpp.h b/c++/src/H5Cpp.h
index 0433aef..3814369 100644
--- a/c++/src/H5Cpp.h
+++ b/c++/src/H5Cpp.h
@@ -44,4 +44,15 @@
#include "H5Group.h"
#include "H5File.h"
#include "H5Library.h"
+
+/* Some C++ compilers do not have offsetof macro; define to bypass the problem
+ - BMR- -EIP- 2007/08/01
+*/
+#ifndef H5_CXX_HAVE_OFFSETOF
+#ifdef HOFFSET
+ #undef HOFFSET
+#endif
+#define HOFFSET(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+
#endif