Changeset - r5843:edae4759437f
[Not reviewed]
master
0 1 0
KUDr - 18 years ago 2007-01-26 08:37:48
kudr@openttd.org
(svn r8413) -Fix [MORPHOS]: disable #define offsetof conflict on Morphos (seems that g++ 2.95 defines it anyway)
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/stdafx.h
Show inline comments
 
@@ -310,7 +310,9 @@ assert_compile(sizeof(uint8)  == 1);
 
# 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 */
 

	
 

	
0 comments (0 inline, 0 general)