aboutsummaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2023-12-27 23:26:14 +0000
committerMichael Williamson <mike@zwobble.org>2023-12-27 23:26:14 +0000
commit6004d0f9bd2f986192fa11a6d1983339ae92d9b0 (patch)
treef5c72e08a28451bfc67fc06b31aab11ba49c8d74 /runtime
parent618f4b35a852f8282c395675ab9dac9756b72c22 (diff)
Use builtin wasm macros
Diffstat (limited to 'runtime')
-rw-r--r--runtime/src/alloc.h2
-rw-r--r--runtime/src/namespaces/Shed/Builtins.c2
-rw-r--r--runtime/src/patio/exceptions.c2
-rw-r--r--runtime/src/patio/patio.h2
-rw-r--r--runtime/src/std/unistd.h2
-rw-r--r--runtime/wasm32.meson2
-rw-r--r--runtime/wasm64.meson2
7 files changed, 7 insertions, 7 deletions
diff --git a/runtime/src/alloc.h b/runtime/src/alloc.h
index 5e92573f..07a14436 100644
--- a/runtime/src/alloc.h
+++ b/runtime/src/alloc.h
@@ -3,7 +3,7 @@
#include "./std/unistd.h"
-#ifdef __WASM__
+#ifdef __wasm__
void* malloc(unsigned long);
void free(void*);
diff --git a/runtime/src/namespaces/Shed/Builtins.c b/runtime/src/namespaces/Shed/Builtins.c
index aa09911c..142a1317 100644
--- a/runtime/src/namespaces/Shed/Builtins.c
+++ b/runtime/src/namespaces/Shed/Builtins.c
@@ -2,7 +2,7 @@
#include "../../shed.h"
-#ifdef __WASM__
+#ifdef __wasm__
typedef struct __wasi_ciovec_t {
uint8_t * buf;
diff --git a/runtime/src/patio/exceptions.c b/runtime/src/patio/exceptions.c
index e465b4f6..23685d8c 100644
--- a/runtime/src/patio/exceptions.c
+++ b/runtime/src/patio/exceptions.c
@@ -1,4 +1,4 @@
-#ifndef __WASM__
+#ifndef __wasm__
#include <setjmp.h>
#include <stdint.h>
diff --git a/runtime/src/patio/patio.h b/runtime/src/patio/patio.h
index f4bde0dd..fe9f9c05 100644
--- a/runtime/src/patio/patio.h
+++ b/runtime/src/patio/patio.h
@@ -3,7 +3,7 @@
#include <stdint.h>
-#ifdef __WASM32__
+#ifdef __wasm32__
typedef uint32_t PatioInt;
#else
typedef uint64_t PatioInt;
diff --git a/runtime/src/std/unistd.h b/runtime/src/std/unistd.h
index 6a761e6f..8f4dc71a 100644
--- a/runtime/src/std/unistd.h
+++ b/runtime/src/std/unistd.h
@@ -1,7 +1,7 @@
#ifndef SHED_STD_UNISTD_H
#define SHED_STD_UNISTD_H
-#ifdef __WASM__
+#ifdef __wasm__
typedef unsigned long size_t;
typedef long ssize_t;
#ifndef NULL
diff --git a/runtime/wasm32.meson b/runtime/wasm32.meson
index 6e628352..a0eaef0b 100644
--- a/runtime/wasm32.meson
+++ b/runtime/wasm32.meson
@@ -4,6 +4,6 @@ ld = 'wasm-ld-17'
ar = 'llvm-ar-17'
[properties]
-c_args = [ '--target=wasm32', '-D__WASM__', '-D__WASM32__', '-mbulk-memory' ]
+c_args = [ '--target=wasm32', '-mbulk-memory' ]
c_link_args = [ '--target=wasm32' ]
shed_runtime_is_wasm = true
diff --git a/runtime/wasm64.meson b/runtime/wasm64.meson
index 7088ffb2..bf8abb81 100644
--- a/runtime/wasm64.meson
+++ b/runtime/wasm64.meson
@@ -4,6 +4,6 @@ ld = 'wasm-ld-17'
ar = 'llvm-ar-17'
[properties]
-c_args = [ '--target=wasm64', '-D__WASM__', '-D__WASM64__', '-mbulk-memory' ]
+c_args = [ '--target=wasm64', '-mbulk-memory' ]
c_link_args = [ '--target=wasm64' ]
shed_runtime_is_wasm = true