tests/tcctest.c: include stdint.h

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
This commit is contained in:
noneofyourbusiness
2025-09-18 11:00:50 +02:00
parent e73529865d
commit 8f23997ca7
2 changed files with 5 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
#ifndef _STDDEF_H #ifndef _STDDEF_H
#define _STDDEF_H #define _STDDEF_H
#define _TINYC_STDDEF
typedef __SIZE_TYPE__ size_t; typedef __SIZE_TYPE__ size_t;
typedef __PTRDIFF_TYPE__ ssize_t; typedef __PTRDIFF_TYPE__ ssize_t;

View File

@@ -17,10 +17,6 @@
/* __VA_ARGS__ and __func__ support */ /* __VA_ARGS__ and __func__ support */
#define C99_MACROS #define C99_MACROS
#ifndef __TINYC__
typedef __SIZE_TYPE__ uintptr_t;
#endif
#if defined(_WIN32) \ #if defined(_WIN32) \
|| (defined(__arm__) \ || (defined(__arm__) \
&& (defined(__FreeBSD__) \ && (defined(__FreeBSD__) \
@@ -66,6 +62,10 @@ typedef __SIZE_TYPE__ uintptr_t;
#include "tcctest.h" #include "tcctest.h"
#ifndef _TINYC_STDDEF
#include <stdint.h>
#endif
/* Test two more ways to include a file named like a pp-number */ /* Test two more ways to include a file named like a pp-number */
#define INC(name) <tests/name.h> #define INC(name) <tests/name.h>
#define funnyname 42test.h #define funnyname 42test.h