Adding debian version 3.70~pre8+dfsg-1.
[syslinux-debian/hramrach.git] / gpxe / src / include / stddef.h
blob6f91d21915af8dbaf763b30f8aefa91f2c72ad1a
1 #ifndef STDDEF_H
2 #define STDDEF_H
4 /* for size_t */
5 #include <stdint.h>
7 #undef NULL
8 #define NULL ((void *)0)
10 #undef offsetof
11 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
13 #undef container_of
14 #define container_of(ptr, type, member) ({ \
15 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
16 (type *)( (char *)__mptr - offsetof(type,member) );})
18 #endif /* STDDEF_H */