mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-29 06:10:09 +08:00
use int for ssize_t, (u)intptr_t instead of long in stddef.h
This commit is contained in:
parent
23064b1734
commit
52622c3c03
@ -2,11 +2,18 @@
|
||||
#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
|
||||
|
4
libtcc.c
4
libtcc.c
@ -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 int");
|
||||
tcc_define_symbol(s, "__PTRDIFF_TYPE__", "int");
|
||||
tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned long");
|
||||
tcc_define_symbol(s, "__PTRDIFF_TYPE__", "long");
|
||||
tcc_define_symbol(s, "__ILP32__", NULL);
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user