From a4e0b7fb9643cba77e12df67d761dbc6950ab439 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 16 Dec 2023 11:56:40 +0000 Subject: Split std.h --- runtime/src/effects.c | 1 + runtime/src/namespaces/Shed/Builtins.c | 2 ++ runtime/src/patio/patio.h | 2 +- runtime/src/shed.h | 4 +++- runtime/src/std.h | 14 -------------- runtime/src/std/unistd.h | 13 +++++++++++++ 6 files changed, 20 insertions(+), 16 deletions(-) delete mode 100644 runtime/src/std.h create mode 100644 runtime/src/std/unistd.h (limited to 'runtime/src') diff --git a/runtime/src/effects.c b/runtime/src/effects.c index 98308f3d..3bf9852c 100644 --- a/runtime/src/effects.c +++ b/runtime/src/effects.c @@ -1,3 +1,4 @@ +#include "./std/unistd.h" #include "./shed.h" struct ShedEffectHandler { diff --git a/runtime/src/namespaces/Shed/Builtins.c b/runtime/src/namespaces/Shed/Builtins.c index 10953d62..4677e059 100644 --- a/runtime/src/namespaces/Shed/Builtins.c +++ b/runtime/src/namespaces/Shed/Builtins.c @@ -1,3 +1,5 @@ +#include "../../std/unistd.h" + #include "../../shed.h" #ifdef __WASM__ diff --git a/runtime/src/patio/patio.h b/runtime/src/patio/patio.h index c91f66f4..160cca9f 100644 --- a/runtime/src/patio/patio.h +++ b/runtime/src/patio/patio.h @@ -1,7 +1,7 @@ #ifndef SHED_PATIO_PATIO_H #define SHED_PATIO_PATIO_H -#include "../std.h" +#include #ifdef __WASM__ typedef uint32_t PatioInt; diff --git a/runtime/src/shed.h b/runtime/src/shed.h index 7b135e3c..c7950c43 100644 --- a/runtime/src/shed.h +++ b/runtime/src/shed.h @@ -1,7 +1,9 @@ #ifndef SHED_H #define SHED_H -#include "./std.h" +#include + +#include "./std/unistd.h" #include "./patio/patio.h" #include "./primitives.h" diff --git a/runtime/src/std.h b/runtime/src/std.h deleted file mode 100644 index 39ea6046..00000000 --- a/runtime/src/std.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef SHED_STD_H -#define SHED_STD_H - -#include - -#ifdef __WASM__ -typedef uint32_t size_t; -typedef int32_t ssize_t; -#define NULL 0 -#else -#include -#endif - -#endif diff --git a/runtime/src/std/unistd.h b/runtime/src/std/unistd.h new file mode 100644 index 00000000..df0b9dcb --- /dev/null +++ b/runtime/src/std/unistd.h @@ -0,0 +1,13 @@ +#ifndef SHED_STD_UNISTD_H +#define SHED_STD_UNISTD_H + +#ifdef __WASM__ +#include +typedef uint32_t size_t; +typedef int32_t ssize_t; +#define NULL 0 +#else +#include +#endif + +#endif -- cgit v1.2.3