use __EMSCRIPTEN__ define instead of EMSCRIPTEN

This commit is contained in:
Fabrice Bellard 2026-05-14 15:41:29 +02:00
parent efda450a21
commit 9b90125510
4 changed files with 7 additions and 7 deletions

@ -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 *);

2
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);

@ -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"

@ -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
@ -68,11 +68,11 @@
/* 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);