Mercurial > hg > openttd
changeset 5843:d59aa5885dcc draft
(svn r8413) -Fix [MORPHOS]: disable #define offsetof conflict on Morphos (seems that g++ 2.95 defines it anyway)
author | KUDr <KUDr@openttd.org> |
---|---|
date | Fri, 26 Jan 2007 08:37:48 +0000 |
parents | fa0fd287c6f1 |
children | a4805866f6fc |
files | src/stdafx.h |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/stdafx.h +++ b/src/stdafx.h @@ -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 */