despite being defined in tcc's own stddef.h, intended to be included by libtcc.h, libtcc.h actually included the libc's standard include tested on musl
Unified · Split
| @@ -1,5 +1,6 @@ | ||
| 1 | 1 | #ifndef _STDDEF_H |
| 2 | 2 | #define _STDDEF_H |
| 3 | +#define _TINYC_STDDEF | |
| 3 | 4 | |
| 4 | 5 | typedef __SIZE_TYPE__ size_t; |
| 5 | 6 | typedef __PTRDIFF_TYPE__ ssize_t; |
| @@ -17,10 +17,6 @@ · 16 unmodified lines | ||
| 17 | 17 | /* __VA_ARGS__ and __func__ support */ |
| 18 | 18 | #define C99_MACROS |
| 19 | 19 | |
| 20 | −#ifndef __TINYC__ | |
| 21 | −typedef __SIZE_TYPE__ uintptr_t; | |
| 22 | −#endif | |
| 23 | − | |
| 24 | 20 | #if defined(_WIN32) \ |
| 25 | 21 | || (defined(__arm__) \ |
| 26 | 22 | && (defined(__FreeBSD__) \ |
| @@ -66,6 +62,10 @@ typedef __SIZE_TYPE__ uintptr_t; · 39 unmodified lines | ||
| 66 | 62 | |
| 67 | 63 | #include "tcctest.h" |
| 68 | 64 | |
| 65 | +#ifndef _TINYC_STDDEF | |
| 66 | +#include <stdint.h> | |
| 67 | +#endif | |
| 68 | + | |
| 69 | 69 | /* Test two more ways to include a file named like a pp-number */ |
| 70 | 70 | #define INC(name) <tests/name.h> |
| 71 | 71 | #define funnyname 42test.h |