From 48eca3d0310856edd33d1de6cf1b0e6f80ef0eb8 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 28 Jan 2025 17:24:25 +0200 Subject: [PATCH] LibC: Make libc usable with tcc tcc does not provide its own stdint.h but defines everything in stddef.h. Also tcc does not support [[noreturn]] attribute syntax. --- userspace/libraries/LibC/include/assert.h | 3 ++- userspace/libraries/LibC/include/stdint.h | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 userspace/libraries/LibC/include/stdint.h diff --git a/userspace/libraries/LibC/include/assert.h b/userspace/libraries/LibC/include/assert.h index 77d49bfa..da43af84 100644 --- a/userspace/libraries/LibC/include/assert.h +++ b/userspace/libraries/LibC/include/assert.h @@ -13,7 +13,8 @@ __BEGIN_DECLS -[[noreturn]] void __assert_fail(const char*, const char*, int, const char*); +__attribute__((noreturn)) +void __assert_fail(const char*, const char*, int, const char*); __END_DECLS diff --git a/userspace/libraries/LibC/include/stdint.h b/userspace/libraries/LibC/include/stdint.h new file mode 100644 index 00000000..e642471a --- /dev/null +++ b/userspace/libraries/LibC/include/stdint.h @@ -0,0 +1,5 @@ +#ifdef __TINYC__ +#include +#else +#include_next +#endif