aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
authorDan Gohman <sunfish@google.com>2014-02-24 08:46:09 -0800
committerDan Gohman <sunfish@google.com>2014-02-25 11:58:53 -0800
commitc600155b1fef26a248d6467a89030328db0fedab (patch)
tree5a72da7c752516383151913320d9713fd103eaa6 /system
parent377e75950fd04ed2705befe00b0c46f0e88a0cf7 (diff)
Begin using the Emscripten toolchain in clang.
With the Emscripten toolchain, we can make clang do more of what we need directly rather than in the wrapper scripts.
Diffstat (limited to 'system')
-rw-r--r--system/include/EGL/eglplatform.h2
-rw-r--r--system/include/SDL/SDL_config_minimal.h2
-rw-r--r--system/include/SDL/SDL_stdinc.h2
-rw-r--r--system/include/emscripten/emscripten.h12
-rw-r--r--system/include/jansson.h2
-rw-r--r--system/lib/compiler-rt/int_endianness.h2
-rw-r--r--system/lib/dlmalloc.c2
7 files changed, 12 insertions, 12 deletions
diff --git a/system/include/EGL/eglplatform.h b/system/include/EGL/eglplatform.h
index 2db2cc47..77e885a8 100644
--- a/system/include/EGL/eglplatform.h
+++ b/system/include/EGL/eglplatform.h
@@ -75,7 +75,7 @@ typedef HDC EGLNativeDisplayType;
typedef HBITMAP EGLNativePixmapType;
typedef HWND EGLNativeWindowType;
-#elif defined(EMSCRIPTEN)
+#elif defined(__EMSCRIPTEN__)
typedef int EGLNativeDisplayType;
typedef int EGLNativeWindowType;
diff --git a/system/include/SDL/SDL_config_minimal.h b/system/include/SDL/SDL_config_minimal.h
index ea0cec10..18951f18 100644
--- a/system/include/SDL/SDL_config_minimal.h
+++ b/system/include/SDL/SDL_config_minimal.h
@@ -33,7 +33,7 @@
#include <stddef.h>
#include <stdarg.h>
-#if !defined(EMSCRIPTEN) && !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
+#if !defined(__EMSCRIPTEN__) && !defined(_STDINT_H_) && (!defined(HAVE_STDINT_H) || !_HAVE_STDINT_H)
typedef unsigned int size_t;
typedef signed char int8_t;
typedef unsigned char uint8_t;
diff --git a/system/include/SDL/SDL_stdinc.h b/system/include/SDL/SDL_stdinc.h
index c4ce7ccd..508ecdb4 100644
--- a/system/include/SDL/SDL_stdinc.h
+++ b/system/include/SDL/SDL_stdinc.h
@@ -65,7 +65,7 @@
#endif
#if defined(HAVE_INTTYPES_H)
# include <inttypes.h>
-#elif defined(EMSCRIPTEN) || defined(HAVE_STDINT_H)
+#elif defined(__EMSCRIPTEN__) || defined(HAVE_STDINT_H)
# include <stdint.h>
#endif
#ifdef HAVE_CTYPE_H
diff --git a/system/include/emscripten/emscripten.h b/system/include/emscripten/emscripten.h
index 852a8e0d..c36bec63 100644
--- a/system/include/emscripten/emscripten.h
+++ b/system/include/emscripten/emscripten.h
@@ -14,7 +14,7 @@
extern "C" {
#endif
-#if !EMSCRIPTEN
+#if !__EMSCRIPTEN__
#include <SDL/SDL.h> /* for SDL_Delay in async_call */
#endif
@@ -141,7 +141,7 @@ extern void emscripten_async_load_script(const char *script, void (*onload)(), v
* you created an object on the stack, it will be cleaned up
* before the main loop will be called the first time.
*/
-#if EMSCRIPTEN
+#if __EMSCRIPTEN__
extern void emscripten_set_main_loop(void (*func)(), int fps, int simulate_infinite_loop);
extern void emscripten_set_main_loop_arg(void (*func)(void*), void *arg, int fps, int simulate_infinite_loop);
extern void emscripten_pause_main_loop();
@@ -166,7 +166,7 @@ extern void emscripten_cancel_main_loop();
* are not counted, do not block the main loop, and can fire
* at specific time in the future.
*/
-#if EMSCRIPTEN
+#if __EMSCRIPTEN__
extern void _emscripten_push_main_loop_blocker(void (*func)(void *), void *arg, const char *name);
extern void _emscripten_push_uncounted_main_loop_blocker(void (*func)(void *), void *arg, const char *name);
#else
@@ -188,7 +188,7 @@ inline void _emscripten_push_uncounted_main_loop_blocker(void (*func)(void *), v
* to 10, then push 10 blockers, as they complete the user will
* see x/10 and so forth.
*/
-#if EMSCRIPTEN
+#if __EMSCRIPTEN__
extern void emscripten_set_main_loop_expected_blockers(int num);
#else
inline void emscripten_set_main_loop_expected_blockers(int num) {}
@@ -203,7 +203,7 @@ inline void emscripten_set_main_loop_expected_blockers(int num) {}
* If millis is negative, the browser's requestAnimationFrame
* mechanism is used.
*/
-#if EMSCRIPTEN
+#if __EMSCRIPTEN__
extern void emscripten_async_call(void (*func)(void *), void *arg, int millis);
#else
inline void emscripten_async_call(void (*func)(void *), void *arg, int millis) {
@@ -247,7 +247,7 @@ void emscripten_get_canvas_size(int *width, int *height, int *isFullscreen);
* absolute time, and is only meaningful in comparison to
* other calls to this function. The unit is ms.
*/
-#if EMSCRIPTEN
+#if __EMSCRIPTEN__
double emscripten_get_now();
#else
#include <time.h>
diff --git a/system/include/jansson.h b/system/include/jansson.h
index 04c345e9..53715fcc 100644
--- a/system/include/jansson.h
+++ b/system/include/jansson.h
@@ -82,7 +82,7 @@ typedef long long json_int_t;
typedef long json_int_t;
#endif /* JSON_INTEGER_IS_LONG_LONG */
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
extern "C" bool json_typeof(const void *object);
extern "C" bool json_is_object(const void *object);
extern "C" bool json_is_array(const void *object);
diff --git a/system/lib/compiler-rt/int_endianness.h b/system/lib/compiler-rt/int_endianness.h
index 17905355..fa294c49 100644
--- a/system/lib/compiler-rt/int_endianness.h
+++ b/system/lib/compiler-rt/int_endianness.h
@@ -100,7 +100,7 @@
#endif /* Windows */
-#if defined(EMSCRIPTEN)
+#if defined(__EMSCRIPTEN__)
#define _YUGA_LITTLE_ENDIAN 1
#define _YUGA_BIG_ENDIAN 0
diff --git a/system/lib/dlmalloc.c b/system/lib/dlmalloc.c
index ce2c25f1..04e9e47b 100644
--- a/system/lib/dlmalloc.c
+++ b/system/lib/dlmalloc.c
@@ -1,6 +1,6 @@
/* XXX Emscripten XXX */
-#if EMSCRIPTEN
+#if __EMSCRIPTEN__
#define DLMALLOC_EXPORT __attribute__((__weak__, __visibility__("default")))
/* mmap uses malloc, so malloc can't use mmap */
#define HAVE_MMAP 0