stddef.h
Go to the documentation of this file.00001 #ifndef STDDEF_H
00002 #define STDDEF_H
00003
00004 FILE_LICENCE ( GPL2_ONLY );
00005
00006
00007 #include <stdint.h>
00008
00009 #undef NULL
00010 #define NULL ((void *)0)
00011
00012 #undef offsetof
00013 #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
00014
00015 #undef container_of
00016 #define container_of(ptr, type, member) ({ \
00017 const typeof( ((type *)0)->member ) *__mptr = (ptr); \
00018 (type *)( (char *)__mptr - offsetof(type,member) );})
00019
00020
00021 #ifndef __WCHAR_TYPE__
00022 #define __WCHAR_TYPE__ long int
00023 #endif
00024 typedef __WCHAR_TYPE__ wchar_t;
00025
00026 #endif