History

Revert "use int for ssize_t, (u)intptr_t instead of long in stddef.h"

This reverts commit 52622c3c0365ad497ce1188e433ac5f0a721c283. Because 28b7c9 was right.

Matthias Gatto committed 9 years ago

Commit 4f15d081 parent c18fc952 files · +3 −10Browse files

Unified · Split

2 files
  1. include/stddef.h +1 −8
  2. libtcc.c +2 −2
include/stddef.h+1−8
@@ -2,18 +2,11 @@ · 1 unmodified line
2#define _STDDEF_H2#define _STDDEF_H
3 3
4typedef __SIZE_TYPE__ size_t;4typedef __SIZE_TYPE__ size_t;
5typedef __PTRDIFF_TYPE__ ssize_t;
5typedef __WCHAR_TYPE__ wchar_t;6typedef __WCHAR_TYPE__ wchar_t;
6typedef __PTRDIFF_TYPE__ ptrdiff_t;7typedef __PTRDIFF_TYPE__ ptrdiff_t;
7
8#ifdef __ILP32__
9typedef int ssize_t;
10typedef int intptr_t;
11typedef unsigned int uintptr_t;
12#else
13typedef __PTRDIFF_TYPE__ ssize_t;
14typedef __PTRDIFF_TYPE__ intptr_t;8typedef __PTRDIFF_TYPE__ intptr_t;
15typedef __SIZE_TYPE__ uintptr_t;9typedef __SIZE_TYPE__ uintptr_t;
16#endif
17 10
18#ifndef __int8_t_defined11#ifndef __int8_t_defined
19#define __int8_t_defined12#define __int8_t_defined
libtcc.c+2−2
@@ -848,8 +848,8 @@ LIBTCCAPI TCCState *tcc_new(void) · 847 unmodified lines
848 tcc_define_symbol(s, "__LP64__", NULL);848 tcc_define_symbol(s, "__LP64__", NULL);
849#else849#else
850 /* Other 32bit systems. */850 /* Other 32bit systems. */
851 tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned long");851 tcc_define_symbol(s, "__SIZE_TYPE__", "unsigned int");
852 tcc_define_symbol(s, "__PTRDIFF_TYPE__", "long");852 tcc_define_symbol(s, "__PTRDIFF_TYPE__", "int");
853 tcc_define_symbol(s, "__ILP32__", NULL);853 tcc_define_symbol(s, "__ILP32__", NULL);
854#endif854#endif
855 855

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t