stddef.h 643 B

1234567891011121314151617181920212223242526
  1. #ifndef _STDDEF_H
  2. #define _STDDEF_H
  3. #define NULL ((void *)0)
  4. typedef __SIZE_TYPE__ size_t;
  5. typedef __WCHAR_TYPE__ wchar_t;
  6. typedef __PTRDIFF_TYPE__ ptrdiff_t;
  7. #define offsetof(type, field) ((size_t) &((type *)0)->field)
  8. /* need to do that because of glibc 2.1 bug (should have a way to test
  9. presence of 'long long' without __GNUC__, or TCC should define
  10. __GNUC__ ? */
  11. #if !defined(__int8_t_defined) && !defined(__dietlibc__)
  12. #define __int8_t_defined
  13. typedef char int8_t;
  14. typedef short int int16_t;
  15. typedef int int32_t;
  16. typedef long long int int64_t;
  17. #endif
  18. #ifdef __i386__
  19. void *_alloca(size_t);
  20. #define alloca _alloca
  21. #endif
  22. #endif