mirror of
https://github.com/bellard/quickjs.git
synced 2026-05-27 19:09:36 +00:00
use __EMSCRIPTEN__ define instead of EMSCRIPTEN
This commit is contained in:
parent
efda450a21
commit
9b90125510
2
cutils.c
2
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 *);
|
||||
|
||||
2
qjs.c
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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user