haiku/headers/posix/stddef.h
Jérôme Duval 72b4b94081 use __builtin_offsetof for gcc4 and superior, it avoids a gcc4 broken build with template use of offsetof()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20669 a95241bf-73f2-0310-859d-f6bbb57e9c96
2007-04-12 18:36:37 +00:00

20 lines
388 B
C

#ifndef _STDDEF_H_
#define _STDDEF_H_
/*
** Distributed under the terms of the OpenBeOS License.
*/
#include <null.h>
#if defined(__GNUC__) && __GNUC__ > 3
#define offsetof(type,member) __builtin_offsetof(type, member)
#else
#define offsetof(type,member) ((size_t)&((type*)0)->member)
#endif
typedef long ptrdiff_t;
#include <wchar_t.h>
#include <size_t.h>
#endif /* _STDDEF_H_ */