From 82e6cac79aa902301900443bcca8d4720354d05d Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Wed, 1 Aug 2007 17:15:32 -0500 Subject: [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. --- c++/src/H5Cpp.h | 11 +++++++++++ 1 file changed, 11 insertions(+) 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 -- cgit v0.12