stddef.h 359 B

1234567891011121314151617181920
  1. #ifndef _LINUX_STDDEF_H
  2. #define _LINUX_STDDEF_H
  3. #include <linux/compiler.h>
  4. #undef NULL
  5. #if defined(__cplusplus)
  6. #define NULL 0
  7. #else
  8. #define NULL ((void *)0)
  9. #endif
  10. #undef offsetof
  11. #ifdef __compiler_offsetof
  12. #define offsetof(TYPE,MEMBER) __compiler_offsetof(TYPE,MEMBER)
  13. #else
  14. #define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
  15. #endif
  16. #endif