This reverts commit 52622c3c0365ad497ce1188e433ac5f0a721c283. Because 28b7c9 was right.
Unified · Split
| @@ -2,18 +2,11 @@ · 1 unmodified line | ||
| 2 | 2 | #define _STDDEF_H |
| 3 | 3 | |
| 4 | 4 | typedef __SIZE_TYPE__ size_t; |
| 5 | +typedef __PTRDIFF_TYPE__ ssize_t; | |
| 5 | 6 | typedef __WCHAR_TYPE__ wchar_t; |
| 6 | 7 | typedef __PTRDIFF_TYPE__ ptrdiff_t; |
| 7 | − | |
| 8 | −#ifdef __ILP32__ | |
| 9 | −typedef int ssize_t; | |
| 10 | −typedef int intptr_t; | |
| 11 | −typedef unsigned int uintptr_t; | |
| 12 | −#else | |
| 13 | −typedef __PTRDIFF_TYPE__ ssize_t; | |
| 14 | 8 | typedef __PTRDIFF_TYPE__ intptr_t; |
| 15 | 9 | typedef __SIZE_TYPE__ uintptr_t; |
| 16 | −#endif | |
| 17 | 10 | |
| 18 | 11 | #ifndef __int8_t_defined |
| 19 | 12 | #define __int8_t_defined |
| @@ -848,8 +848,8 @@ LIBTCCAPI TCCState *tcc_new(void) · 847 unmodified lines | ||
| 848 | 848 | tcc_define_symbol(s, "__LP64__", NULL); |
| 849 | 849 | #else |
| 850 | 850 | /* Other 32bit systems. */ |
| 851 | − tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned long"); | |
| 852 | − tcc_define_symbol(s, "__PTRDIFF_TYPE__", "long"); | |
| 851 | + tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned int"); | |
| 852 | + tcc_define_symbol(s, "__PTRDIFF_TYPE__", "int"); | |
| 853 | 853 | tcc_define_symbol(s, "__ILP32__", NULL); |
| 854 | 854 | #endif |
| 855 | 855 | |