Changeset - r5947:b807a8545bec
[Not reviewed]
master
0 1 0
KUDr - 17 years ago 2007-02-06 19:16:38
kudr@openttd.org
(svn r8613) -Fix [MorphOS]: offsetof() macro undefined for MorphOS build
1 file changed with 1 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/stdafx.h
Show inline comments
 
@@ -311,9 +311,7 @@ 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)
 
# ifndef __MORPHOS__
 
#  define offsetof(s,m)       cpp_offsetof(s, m)
 
# endif /* !__MORPHOS__ */
 
# define offsetof(s,m)       cpp_offsetof(s, m)
 
#endif /* __cplusplus */
 

	
 

	
0 comments (0 inline, 0 general)