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