]> git.kaiwu.me - quickjs.git/commitdiff
use __EMSCRIPTEN__ define instead of EMSCRIPTEN
authorFabrice Bellard <fabrice@bellard.org>
Thu, 14 May 2026 13:41:29 +0000 (15:41 +0200)
committerFabrice Bellard <fabrice@bellard.org>
Thu, 14 May 2026 14:39:41 +0000 (16:39 +0200)
cutils.c
qjs.c
quickjs-libc.c
quickjs.c

index 52ff1649bdb8073deeac18eaa1c8d4a9f4afa4f8..6a3aeca454bd60e4f79f2bfc39415c08f3dbb341 100644 (file)
--- a/cutils.c
+++ b/cutils.c
@@ -315,7 +315,7 @@ int unicode_from_utf8(const uint8_t *p, int max_len, const uint8_t **pp)
 
 #if 0
 
-#if defined(EMSCRIPTEN) || defined(__ANDROID__)
+#if defined(__EMSCRIPTEN__) || defined(__ANDROID__)
 
 static void *rqsort_arg;
 static int (*rqsort_cmp)(const void *, const void *, void *);
diff --git a/qjs.c b/qjs.c
index 0224f7cfa24f658fbdf31ac2944505f86b8f0120..3ee63408dba17b971a7c062f825271376ecee338 100644 (file)
--- a/qjs.c
+++ b/qjs.c
@@ -139,7 +139,7 @@ static size_t js_trace_malloc_usable_size(const void *ptr)
     return malloc_size(ptr);
 #elif defined(_WIN32)
     return _msize((void *)ptr);
-#elif defined(EMSCRIPTEN)
+#elif defined(__EMSCRIPTEN__)
     return 0;
 #elif defined(__linux__) || defined(__GLIBC__)
     return malloc_usable_size((void *)ptr);
index c24b6d53ec6d8fdda92b0cef36e0830a7b7e642a..99ba96fc5d58de52cbc0942ca6697f74303a0fd9 100644 (file)
@@ -3879,7 +3879,7 @@ void js_std_set_worker_new_context_func(JSContext *(*func)(JSRuntime *rt))
 #define OS_PLATFORM "win32"
 #elif defined(__APPLE__)
 #define OS_PLATFORM "darwin"
-#elif defined(EMSCRIPTEN)
+#elif defined(__EMSCRIPTEN__)
 #define OS_PLATFORM "js"
 #else
 #define OS_PLATFORM "linux"
index 14f8509429e781d8492bac91ded5b587ba8c4786..84474d1d1fdcb8e54f2f9883c031e466839a6666 100644 (file)
--- a/quickjs.c
+++ b/quickjs.c
@@ -49,7 +49,7 @@
 
 #define OPTIMIZE         1
 #define SHORT_OPCODES    1
-#if defined(EMSCRIPTEN)
+#if defined(__EMSCRIPTEN__)
 #define DIRECT_DISPATCH  0
 #else
 #define DIRECT_DISPATCH  1
 
 /* define to include Atomics.* operations which depend on the OS
    threads */
-#if !defined(EMSCRIPTEN)
+#if !defined(__EMSCRIPTEN__)
 #define CONFIG_ATOMICS
 #endif
 
-#if !defined(EMSCRIPTEN)
+#if !defined(__EMSCRIPTEN__)
 /* enable stack limitation */
 #define CONFIG_STACK_CHECK
 #endif
@@ -1723,7 +1723,7 @@ static size_t js_def_malloc_usable_size(const void *ptr)
     return malloc_size(ptr);
 #elif defined(_WIN32)
     return _msize((void *)ptr);
-#elif defined(EMSCRIPTEN)
+#elif defined(__EMSCRIPTEN__)
     return 0;
 #elif defined(__linux__) || defined(__GLIBC__)
     return malloc_usable_size((void *)ptr);