(svn r8413) -Fix [MORPHOS]: disable #define offsetof conflict on Morphos (seems that g++ 2.95 defines it anyway)
authorKUDr
Fri, 26 Jan 2007 08:37:48 +0000
changeset 5843 98248c775972
parent 5842 d3a1169d7ef4
child 5844 60231b36473e
(svn r8413) -Fix [MORPHOS]: disable #define offsetof conflict on Morphos (seems that g++ 2.95 defines it anyway)
src/stdafx.h
--- a/src/stdafx.h	Fri Jan 26 08:36:02 2007 +0000
+++ b/src/stdafx.h	Fri Jan 26 08:37:48 2007 +0000
@@ -310,7 +310,9 @@
 # define offsetof(s,m)   (size_t)&(((s *)0)->m)
 #else /* __cplusplus */
 # define cpp_offsetof(s,m)   (((size_t)&reinterpret_cast<const volatile char&>((((s*)(char*)8)->m))) - 8)
-# define offsetof(s,m)       cpp_offsetof(s, m)
+# ifndef __MORPHOS__
+#  define offsetof(s,m)       cpp_offsetof(s, m)
+# endif /* !__MORPHOS__ */
 #endif /* __cplusplus */