source: bootcd/isolinux/syslinux-6.03/gpxe/src/include/stddef.h @ e16e8f2

Last change on this file since e16e8f2 was e16e8f2, checked in by Edwin Eefting <edwin@datux.nl>, 3 years ago

bootstuff

  • Property mode set to 100644
File size: 618 bytes
Line 
1#ifndef STDDEF_H
2#define STDDEF_H
3
4FILE_LICENCE ( GPL2_ONLY );
5
6/* for size_t */
7#include <stdint.h>
8
9#undef NULL
10#define NULL ((void *)0)
11
12#undef offsetof
13#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
14
15#undef container_of
16#define container_of(ptr, type, member) ({                      \
17        const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
18        (type *)( (char *)__mptr - offsetof(type,member) );})
19
20/* __WCHAR_TYPE__ is defined by gcc and will change if -fshort-wchar is used */
21#ifndef __WCHAR_TYPE__
22#define __WCHAR_TYPE__ long int
23#endif
24typedef __WCHAR_TYPE__ wchar_t;
25
26#endif /* STDDEF_H */
Note: See TracBrowser for help on using the repository browser.