You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

stddef.h 589B

123456789101112131415161718192021222324
  1. #ifndef STDDEF_H
  2. #define STDDEF_H
  3. /* for size_t */
  4. #include <stdint.h>
  5. #undef NULL
  6. #define NULL ((void *)0)
  7. #undef offsetof
  8. #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
  9. #undef container_of
  10. #define container_of(ptr, type, member) ({ \
  11. const typeof( ((type *)0)->member ) *__mptr = (ptr); \
  12. (type *)( (char *)__mptr - offsetof(type,member) );})
  13. /* __WCHAR_TYPE__ is defined by gcc and will change if -fshort-wchar is used */
  14. #ifndef __WCHAR_TYPE__
  15. #define __WCHAR_TYPE__ long int
  16. #endif
  17. typedef __WCHAR_TYPE__ wchar_t;
  18. #endif /* STDDEF_H */