* Source/NSObject.m (__builtin_offsetof): Add workaround for build in missing

in old versions of gcc.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@33774 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2011-08-22 11:02:10 +00:00
parent 9e7246aa24
commit dff5311a0b
2 changed files with 8 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2011-08-22 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSObject.m (__builtin_offsetof): Add
workaround for build in missing in old versions of gcc.
2011-08-20 Fred Kiefer <FredKiefer@gmx.de>
* Source/Additions/GSMime.m,

View file

@ -401,6 +401,9 @@ static inline NSLock *GSAllocationLockForObject(id p)
#ifdef ALIGN
#undef ALIGN
#endif
#if defined(__GNUC__) && __GNUC__ < 4
#define __builtin_offsetof(s, f) (uintptr_t)(&(((s*)0)->f))
#endif
#define alignof(type) __builtin_offsetof(struct { const char c; type member; }, member)
#define ALIGN alignof(double)