From d35821fb1673ce1dacd5aada3c66446d9264e7f3 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 2 Aug 2025 02:27:18 +0900 Subject: feat: add ducc version of stddef.h --- include/stddef.h | 10 ++++++++++ std.h | 4 +--- 2 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 include/stddef.h diff --git a/include/stddef.h b/include/stddef.h new file mode 100644 index 0000000..d4977de --- /dev/null +++ b/include/stddef.h @@ -0,0 +1,10 @@ +#define NULL 0 + +// TODO: unsigned +typedef long size_t; + +// TODO: +// - max_align_t (C11) +// - nullptr_t (C23) +// - offsetof +// - ptrdiff_t diff --git a/std.h b/std.h index 7ba993a..80eaacd 100644 --- a/std.h +++ b/std.h @@ -1,4 +1,4 @@ -typedef long size_t; +#include struct FILE; typedef struct FILE FILE; @@ -29,8 +29,6 @@ size_t strlen(const char*); int strncmp(const char*, const char*, size_t); char* strstr(const char*, const char*); -#define NULL 0 - #include int vfprintf(FILE*, const char*, va_list); -- cgit v1.2.3-70-g09d2