aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/stddef.h10
-rw-r--r--std.h4
2 files changed, 11 insertions, 3 deletions
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 <stddef.h>
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 <stdarg.h>
int vfprintf(FILE*, const char*, va_list);