diff options
Diffstat (limited to 'c++')
-rw-r--r-- | c++/src/H5Cpp.h | 11 |
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 |