diff options
| author | Matthias Gatto <uso.cosmo.ray@gmail.com> | 2017-07-26 10:23:59 +0200 |
|---|---|---|
| committer | Matthias Gatto <uso.cosmo.ray@gmail.com> | 2017-07-26 10:25:52 +0200 |
| commit | 4f15d08ea188f3e5c4c710f5d2d4a7f8fb0d88b7 (patch) | |
| tree | d32ba1decbc6df1d576d7ad2ca25a99def5b6a64 | |
| parent | c18fc950d721f5f734116cebba729fc8f7759964 (diff) | |
| download | tinycc-4f15d08ea188f3e5c4c710f5d2d4a7f8fb0d88b7.tar.gz tinycc-4f15d08ea188f3e5c4c710f5d2d4a7f8fb0d88b7.tar.bz2 | |
Revert "use int for ssize_t, (u)intptr_t instead of long in stddef.h"
This reverts commit 52622c3c0365ad497ce1188e433ac5f0a721c283.
Because 28b7c9 was right.
| -rw-r--r-- | include/stddef.h | 9 | ||||
| -rw-r--r-- | libtcc.c | 4 |
2 files changed, 3 insertions, 10 deletions
diff --git a/include/stddef.h b/include/stddef.h index 8ed6b3e..694d503 100644 --- a/include/stddef.h +++ b/include/stddef.h @@ -2,18 +2,11 @@ #define _STDDEF_H typedef __SIZE_TYPE__ size_t; +typedef __PTRDIFF_TYPE__ ssize_t; typedef __WCHAR_TYPE__ wchar_t; typedef __PTRDIFF_TYPE__ ptrdiff_t; - -#ifdef __ILP32__ -typedef int ssize_t; -typedef int intptr_t; -typedef unsigned int uintptr_t; -#else -typedef __PTRDIFF_TYPE__ ssize_t; typedef __PTRDIFF_TYPE__ intptr_t; typedef __SIZE_TYPE__ uintptr_t; -#endif #ifndef __int8_t_defined #define __int8_t_defined @@ -848,8 +848,8 @@ LIBTCCAPI TCCState *tcc_new(void) tcc_define_symbol(s, "__LP64__", NULL); #else /* Other 32bit systems. */ - tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned long"); - tcc_define_symbol(s, "__PTRDIFF_TYPE__", "long"); + tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned int"); + tcc_define_symbol(s, "__PTRDIFF_TYPE__", "int"); tcc_define_symbol(s, "__ILP32__", NULL); #endif |
