mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
* 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:
parent
9e7246aa24
commit
dff5311a0b
2 changed files with 8 additions and 0 deletions
|
@ -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,
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue