您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

stddef.h 744B

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