[tcp] Enable AF_INET6 transport for tcp connections
[gpxe.git] / src / include / stddef.h
blob2a02a8985169efdeed8c85b067710c769e29cb76
1 #ifndef STDDEF_H
2 #define STDDEF_H
4 FILE_LICENCE ( GPL2_ONLY );
6 /* for size_t */
7 #include <stdint.h>
9 #undef NULL
10 #define NULL ((void *)0)
12 #undef offsetof
13 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
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) );})
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
24 typedef __WCHAR_TYPE__ wchar_t;
26 #endif /* STDDEF_H */