From 6004d0f9bd2f986192fa11a6d1983339ae92d9b0 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Wed, 27 Dec 2023 23:26:14 +0000 Subject: Use builtin wasm macros --- runtime/src/alloc.h | 2 +- runtime/src/namespaces/Shed/Builtins.c | 2 +- runtime/src/patio/exceptions.c | 2 +- runtime/src/patio/patio.h | 2 +- runtime/src/std/unistd.h | 2 +- runtime/wasm32.meson | 2 +- runtime/wasm64.meson | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) (limited to 'runtime') 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 #include 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 -#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 -- cgit v1.2.3