aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDan Gohman <sunfish@google.com>2014-02-24 08:46:38 -0800
committerDan Gohman <sunfish@google.com>2014-02-25 11:58:53 -0800
commit3317f2cd793893073619a87a462da26c505ba9eb (patch)
tree89929a716269220d19aa3c4b6d2cd8bbe13343b7 /tests
parentc600155b1fef26a248d6467a89030328db0fedab (diff)
Use __EMSCRIPTEN__ instead of EMSCRIPTEN in tests.
Diffstat (limited to 'tests')
-rw-r--r--tests/799.cpp2
-rw-r--r--tests/aniso.c2
-rw-r--r--tests/box2d/Benchmark.cpp8
-rw-r--r--tests/cube_explosion.c4
-rw-r--r--tests/cubegeom.c4
-rw-r--r--tests/cubegeom_color.c6
-rw-r--r--tests/cubegeom_color2.c4
-rw-r--r--tests/cubegeom_fog.c4
-rw-r--r--tests/cubegeom_glew.c2
-rw-r--r--tests/cubegeom_mt.c4
-rw-r--r--tests/cubegeom_normal.c4
-rw-r--r--tests/cubegeom_normal_dap.c4
-rw-r--r--tests/cubegeom_normal_dap_far.c4
-rw-r--r--tests/cubegeom_normal_dap_far_glda.c4
-rw-r--r--tests/cubegeom_normal_dap_far_glda_quad.c4
-rw-r--r--tests/cubegeom_normal_dap_far_range.c4
-rw-r--r--tests/cubegeom_pre.c4
-rw-r--r--tests/cubegeom_pre2.c4
-rw-r--r--tests/cubegeom_pre2_vao.c4
-rw-r--r--tests/cubegeom_pre2_vao2.c4
-rw-r--r--tests/cubegeom_pre3.c4
-rw-r--r--tests/cubegeom_pre_vao.c4
-rw-r--r--tests/cubegeom_proc.c4
-rw-r--r--tests/cubegeom_texturematrix.c4
-rw-r--r--tests/gl_matrix_identity.c6
-rw-r--r--tests/gl_ps.c6
-rw-r--r--tests/gl_ps_packed.c6
-rw-r--r--tests/gl_ps_strides.c6
-rw-r--r--tests/gl_renderers.c6
-rw-r--r--tests/gl_stride.c6
-rw-r--r--tests/gl_vertex_buffer.c6
-rw-r--r--tests/gl_vertex_buffer_pre.c6
-rw-r--r--tests/glbegin_points.c2
-rw-r--r--tests/glgettexenv.c2
-rw-r--r--tests/module/test_stdin.c4
-rw-r--r--tests/nbody-java/native_java_lang_String.c4
-rw-r--r--tests/nbody-java/native_java_lang_System.c2
-rw-r--r--tests/nbody-java/xmlvm.c4
-rw-r--r--tests/nbody-java/xmlvm.h2
-rw-r--r--tests/openal_buffers.c8
-rw-r--r--tests/openal_playback.cpp8
-rw-r--r--tests/perspective.c6
-rw-r--r--tests/poppler/utils/pdftoppm.cc2
-rwxr-xr-xtests/runner.py2
-rw-r--r--tests/s3tc.c2
-rw-r--r--tests/s3tc_crunch.c2
-rw-r--r--tests/sdl_alloctext.c2
-rw-r--r--tests/sdl_audio_beep.cpp8
-rw-r--r--tests/sdl_audio_mix_channels.c2
-rw-r--r--tests/sdl_canvas.c2
-rw-r--r--tests/sdl_canvas_size.c6
-rw-r--r--tests/sdl_canvas_twice.c2
-rw-r--r--tests/sdl_fog_density.c2
-rw-r--r--tests/sdl_fog_exp2.c2
-rw-r--r--tests/sdl_fog_linear.c2
-rw-r--r--tests/sdl_fog_negative.c2
-rw-r--r--tests/sdl_fog_simple.c2
-rw-r--r--tests/sdl_gfx_primitives.c4
-rw-r--r--tests/sdl_headless.c2
-rw-r--r--tests/sdl_ogl.c2
-rw-r--r--tests/sdl_ogl_defaultMatrixMode.c2
-rw-r--r--tests/sdl_ogl_p.c2
-rw-r--r--tests/sdl_ogl_proc_alias.c2
-rw-r--r--tests/sdl_rotozoom.c4
-rw-r--r--tests/sdl_swsurface.c2
-rw-r--r--tests/sdlglshader.c2
-rw-r--r--tests/sockets/test_enet_client.c10
-rw-r--r--tests/sockets/test_enet_server.c8
-rw-r--r--tests/sockets/test_getaddrinfo.c2
-rw-r--r--tests/sockets/test_gethostbyname.c2
-rw-r--r--tests/sockets/test_getnameinfo.c4
-rw-r--r--tests/sockets/test_sockets_echo_client.c6
-rw-r--r--tests/sockets/test_sockets_echo_server.c4
-rw-r--r--tests/sockets/test_sockets_partial_client.c6
-rw-r--r--tests/sockets/test_sockets_partial_server.c4
-rw-r--r--tests/sockets/test_sockets_select_server_closes_connection_client_rw.c6
-rw-r--r--tests/sockets/test_sockets_select_server_down_client.c6
-rw-r--r--tests/sockets/test_sockets_select_server_down_server.c4
-rw-r--r--tests/sockets/webrtc_host.c6
-rw-r--r--tests/sockets/webrtc_peer.c4
-rw-r--r--tests/sqlite/sqlite3.c8
-rw-r--r--tests/stat/test_mknod.c2
-rw-r--r--tests/stat/test_stat.c12
-rw-r--r--tests/test_float_literals.cpp4
-rw-r--r--tests/tex_nonbyte.c6
-rw-r--r--tests/unistd/unlink.c4
-rw-r--r--tests/uuid/test.c2
87 files changed, 179 insertions, 179 deletions
diff --git a/tests/799.cpp b/tests/799.cpp
index 6c4c9b18..aa3213af 100644
--- a/tests/799.cpp
+++ b/tests/799.cpp
@@ -6,7 +6,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <arpa/inet.h>
#endif
diff --git a/tests/aniso.c b/tests/aniso.c
index 443e50aa..b925149d 100644
--- a/tests/aniso.c
+++ b/tests/aniso.c
@@ -208,7 +208,7 @@ int main(int argc, char *argv[])
*/
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(2000);
#endif
diff --git a/tests/box2d/Benchmark.cpp b/tests/box2d/Benchmark.cpp
index 4fd79651..6c9b3c5b 100644
--- a/tests/box2d/Benchmark.cpp
+++ b/tests/box2d/Benchmark.cpp
@@ -25,7 +25,7 @@ typedef struct {
#include <time.h>
#include <math.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -131,7 +131,7 @@ int main(int argc, char **argv) {
world->Step(1.0f/60.0f, 3, 3);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
responsive_main_loop = argc > 2 ? argv[2][0] - '0' : 0;
if (responsive_main_loop) {
printf("responsive main loop\n");
@@ -141,7 +141,7 @@ int main(int argc, char **argv) {
do {
iter();
} while (frameCounter <= FRAMES);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
}
#endif
@@ -173,7 +173,7 @@ void iter() {
printf("frame averages: %.3f +- %.3f, range: %.3f to %.3f \n", result.mean, result.stddev, float(minn)/CLOCKS_PER_SEC * 1000, float(maxx)/CLOCKS_PER_SEC * 1000);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_run_script("if (Module.reportCompletion) Module.reportCompletion()");
if (responsive_main_loop) emscripten_cancel_main_loop();
#endif
diff --git a/tests/cube_explosion.c b/tests/cube_explosion.c
index 0c6eb674..a899f068 100644
--- a/tests/cube_explosion.c
+++ b/tests/cube_explosion.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -216,7 +216,7 @@ int main(int argc, char *argv[])
glDeleteTextures(1, &texture);
assert(!glIsTexture(texture)); // but not anymore
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom.c b/tests/cubegeom.c
index e749045b..950439ec 100644
--- a/tests/cubegeom.c
+++ b/tests/cubegeom.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -316,7 +316,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_color.c b/tests/cubegeom_color.c
index ff30e1a9..0d2b6ecb 100644
--- a/tests/cubegeom_color.c
+++ b/tests/cubegeom_color.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -38,7 +38,7 @@ void verify() {
for (int x = 0; x < width*height*4; x++) {
if (x % 4 != 3) sum += x * data[x];
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
int result = sum;
REPORT_RESULT();
#endif
@@ -286,7 +286,7 @@ int main(int argc, char *argv[])
verify();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_color2.c b/tests/cubegeom_color2.c
index 76d71d00..76bbb119 100644
--- a/tests/cubegeom_color2.c
+++ b/tests/cubegeom_color2.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -273,7 +273,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_fog.c b/tests/cubegeom_fog.c
index cae6ca2d..50d2843b 100644
--- a/tests/cubegeom_fog.c
+++ b/tests/cubegeom_fog.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -281,7 +281,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_glew.c b/tests/cubegeom_glew.c
index 210e1c60..96f401c6 100644
--- a/tests/cubegeom_glew.c
+++ b/tests/cubegeom_glew.c
@@ -287,7 +287,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_mt.c b/tests/cubegeom_mt.c
index b4ad28a7..cbfcbfdf 100644
--- a/tests/cubegeom_mt.c
+++ b/tests/cubegeom_mt.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -274,7 +274,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_normal.c b/tests/cubegeom_normal.c
index 02655edf..e56286fb 100644
--- a/tests/cubegeom_normal.c
+++ b/tests/cubegeom_normal.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -269,7 +269,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_normal_dap.c b/tests/cubegeom_normal_dap.c
index 752911a8..594aec05 100644
--- a/tests/cubegeom_normal_dap.c
+++ b/tests/cubegeom_normal_dap.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -266,7 +266,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_normal_dap_far.c b/tests/cubegeom_normal_dap_far.c
index 35a068d9..da28f775 100644
--- a/tests/cubegeom_normal_dap_far.c
+++ b/tests/cubegeom_normal_dap_far.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#if !defined(__EMSCRIPTEN__)
#define USE_GLEW 1
#endif
@@ -263,7 +263,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#if !defined(__EMSCRIPTEN__)
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_normal_dap_far_glda.c b/tests/cubegeom_normal_dap_far_glda.c
index 849245b8..ee381458 100644
--- a/tests/cubegeom_normal_dap_far_glda.c
+++ b/tests/cubegeom_normal_dap_far_glda.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -254,7 +254,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_normal_dap_far_glda_quad.c b/tests/cubegeom_normal_dap_far_glda_quad.c
index 93c157a4..91f60031 100644
--- a/tests/cubegeom_normal_dap_far_glda_quad.c
+++ b/tests/cubegeom_normal_dap_far_glda_quad.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -254,7 +254,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_normal_dap_far_range.c b/tests/cubegeom_normal_dap_far_range.c
index 17691ce9..3f041668 100644
--- a/tests/cubegeom_normal_dap_far_range.c
+++ b/tests/cubegeom_normal_dap_far_range.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -263,7 +263,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_pre.c b/tests/cubegeom_pre.c
index 40b03cf7..70e3435f 100644
--- a/tests/cubegeom_pre.c
+++ b/tests/cubegeom_pre.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -283,7 +283,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_pre2.c b/tests/cubegeom_pre2.c
index df04ae31..88c82541 100644
--- a/tests/cubegeom_pre2.c
+++ b/tests/cubegeom_pre2.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -322,7 +322,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_pre2_vao.c b/tests/cubegeom_pre2_vao.c
index 733c8fc6..5abe1868 100644
--- a/tests/cubegeom_pre2_vao.c
+++ b/tests/cubegeom_pre2_vao.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -354,7 +354,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_pre2_vao2.c b/tests/cubegeom_pre2_vao2.c
index 69096833..d2d55597 100644
--- a/tests/cubegeom_pre2_vao2.c
+++ b/tests/cubegeom_pre2_vao2.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -355,7 +355,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_pre3.c b/tests/cubegeom_pre3.c
index ceaa757e..81c87589 100644
--- a/tests/cubegeom_pre3.c
+++ b/tests/cubegeom_pre3.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -322,7 +322,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_pre_vao.c b/tests/cubegeom_pre_vao.c
index 8c598143..4f7adf9e 100644
--- a/tests/cubegeom_pre_vao.c
+++ b/tests/cubegeom_pre_vao.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -308,7 +308,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_proc.c b/tests/cubegeom_proc.c
index e80b9b31..2dfe85ae 100644
--- a/tests/cubegeom_proc.c
+++ b/tests/cubegeom_proc.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -321,7 +321,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/cubegeom_texturematrix.c b/tests/cubegeom_texturematrix.c
index abb667eb..21824344 100644
--- a/tests/cubegeom_texturematrix.c
+++ b/tests/cubegeom_texturematrix.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -287,7 +287,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/gl_matrix_identity.c b/tests/gl_matrix_identity.c
index 9f990a77..8ca7d0cb 100644
--- a/tests/gl_matrix_identity.c
+++ b/tests/gl_matrix_identity.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -38,7 +38,7 @@ void verify() {
for (int x = 0; x < width*height*4; x++) {
if (x % 4 != 3) sum += x * data[x];
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
int result = sum;
REPORT_RESULT();
#endif
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
verify();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(1500);
#endif
diff --git a/tests/gl_ps.c b/tests/gl_ps.c
index 4fa79922..d9f3b079 100644
--- a/tests/gl_ps.c
+++ b/tests/gl_ps.c
@@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -219,7 +219,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/gl_ps_packed.c b/tests/gl_ps_packed.c
index 9ab99cb8..be139cd9 100644
--- a/tests/gl_ps_packed.c
+++ b/tests/gl_ps_packed.c
@@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -216,7 +216,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/gl_ps_strides.c b/tests/gl_ps_strides.c
index d88f5d0b..1ff28c94 100644
--- a/tests/gl_ps_strides.c
+++ b/tests/gl_ps_strides.c
@@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -120,7 +120,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -227,7 +227,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/gl_renderers.c b/tests/gl_renderers.c
index 0a8e6e78..ca6e828e 100644
--- a/tests/gl_renderers.c
+++ b/tests/gl_renderers.c
@@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 0
#endif
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -180,7 +180,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/gl_stride.c b/tests/gl_stride.c
index c254ad5a..d6cf1fd2 100644
--- a/tests/gl_stride.c
+++ b/tests/gl_stride.c
@@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 0
#endif
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -141,7 +141,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/gl_vertex_buffer.c b/tests/gl_vertex_buffer.c
index 6b695462..73c30d48 100644
--- a/tests/gl_vertex_buffer.c
+++ b/tests/gl_vertex_buffer.c
@@ -22,7 +22,7 @@
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 0
#endif
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -184,7 +184,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/gl_vertex_buffer_pre.c b/tests/gl_vertex_buffer_pre.c
index 84b76569..fb967d11 100644
--- a/tests/gl_vertex_buffer_pre.c
+++ b/tests/gl_vertex_buffer_pre.c
@@ -22,7 +22,7 @@
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 0
#endif
@@ -62,7 +62,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/glbegin_points.c b/tests/glbegin_points.c
index 9128a4f5..ae061bb2 100644
--- a/tests/glbegin_points.c
+++ b/tests/glbegin_points.c
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#if !defined(__EMSCRIPTEN__)
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/glgettexenv.c b/tests/glgettexenv.c
index a051a690..54bf2af8 100644
--- a/tests/glgettexenv.c
+++ b/tests/glgettexenv.c
@@ -12,7 +12,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
diff --git a/tests/module/test_stdin.c b/tests/module/test_stdin.c
index 319c686c..2772fcf0 100644
--- a/tests/module/test_stdin.c
+++ b/tests/module/test_stdin.c
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -48,7 +48,7 @@ int main(int argc, char const *argv[])
// should exit out after calling main_loop once.
main_loop();
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 60, 0);
#else
while (1) main_loop(); sleep(1);
diff --git a/tests/nbody-java/native_java_lang_String.c b/tests/nbody-java/native_java_lang_String.c
index 5ccf21df..c55e5412 100644
--- a/tests/nbody-java/native_java_lang_String.c
+++ b/tests/nbody-java/native_java_lang_String.c
@@ -10,7 +10,7 @@
JAVA_INT java_lang_String_toLowerCaseImpl___int(JAVA_OBJECT me, JAVA_INT n1)
{
//XMLVM_BEGIN_NATIVE[java_lang_String_toLowerCaseImpl___int]
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
return tolower(n1);
#else
return towlower(n1);
@@ -21,7 +21,7 @@ JAVA_INT java_lang_String_toLowerCaseImpl___int(JAVA_OBJECT me, JAVA_INT n1)
JAVA_INT java_lang_String_toUpperCaseImpl___int(JAVA_OBJECT me, JAVA_INT n1)
{
//XMLVM_BEGIN_NATIVE[java_lang_String_toUpperCaseImpl___int]
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
return toupper(n1);
#else
return towupper(n1);
diff --git a/tests/nbody-java/native_java_lang_System.c b/tests/nbody-java/native_java_lang_System.c
index 861781ca..201f8beb 100644
--- a/tests/nbody-java/native_java_lang_System.c
+++ b/tests/nbody-java/native_java_lang_System.c
@@ -97,7 +97,7 @@ JAVA_OBJECT java_lang_System_getEncoding___int(JAVA_INT n1)
{
//XMLVM_BEGIN_NATIVE[java_lang_System_getEncoding___int]
//Get charset from the OS
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
return xmlvm_create_java_string("UTF-8");
#else
char charset[CHARSETBUFF];
diff --git a/tests/nbody-java/xmlvm.c b/tests/nbody-java/xmlvm.c
index 35e04d16..dedf1bc6 100644
--- a/tests/nbody-java/xmlvm.c
+++ b/tests/nbody-java/xmlvm.c
@@ -102,7 +102,7 @@ void xmlvm_init()
xmlvm_clear_constant_pool_cache();
#ifndef XMLVM_NO_GC
-#ifndef EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
GC_finalize_on_demand = 1;
GC_java_finalization = 1;
java_lang_Thread* finalizerThread = (java_lang_Thread*) org_xmlvm_runtime_FinalizerNotifier_startFinalizerThread__();
@@ -115,7 +115,7 @@ void xmlvm_init()
void xmlvm_destroy(java_lang_Thread* mainThread)
{
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
return; // Let the JS engine handle clean up
#endif
diff --git a/tests/nbody-java/xmlvm.h b/tests/nbody-java/xmlvm.h
index 0d931565..04f645db 100644
--- a/tests/nbody-java/xmlvm.h
+++ b/tests/nbody-java/xmlvm.h
@@ -22,7 +22,7 @@
#ifndef __XMLVM_H__
#define __XMLVM_H__
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
// Workaround definitions for Emscripten
// TODO: Determine if different solution is needed
diff --git a/tests/openal_buffers.c b/tests/openal_buffers.c
index 31104a33..df6d8e3f 100644
--- a/tests/openal_buffers.c
+++ b/tests/openal_buffers.c
@@ -1,7 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#include <AL/al.h>
#include <AL/alc.h>
@@ -68,7 +68,7 @@ void iter() {
// Exit once we've processed the entire clip.
if (offset >= size) {
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
int result = 0;
REPORT_RESULT();
#endif
@@ -87,7 +87,7 @@ int main(int argc, char* argv[]) {
//
// Read in the audio sample.
//
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
FILE* fp = fopen("the_entertainer.wav", "rb");
#else
FILE* fp = fopen("sounds/the_entertainer.wav", "rb");
@@ -176,7 +176,7 @@ int main(int argc, char* argv[]) {
//
// Cycle and refill the buffers until we're done.
//
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(iter, 0, 0);
#else
while (1) {
diff --git a/tests/openal_playback.cpp b/tests/openal_playback.cpp
index 6a8dae38..880b6906 100644
--- a/tests/openal_playback.cpp
+++ b/tests/openal_playback.cpp
@@ -5,7 +5,7 @@
#include <assert.h>
#include <stdint.h>
#include <unistd.h>
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -25,7 +25,7 @@ void playSource(void* arg)
alGetSourcei(source, AL_SOURCE_STATE, &state);
assert(state == AL_STOPPED);
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
int result = 1;
REPORT_RESULT();
#endif
@@ -63,7 +63,7 @@ int main() {
alGenBuffers(1, buffers);
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
FILE* source = fopen("audio.wav", "rb");
#else
FILE* source = fopen("sounds/audio.wav", "rb");
@@ -146,7 +146,7 @@ int main() {
alGetSourcei(sources[0], AL_SOURCE_STATE, &state);
assert(state == AL_PLAYING);
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_async_call(playSource, reinterpret_cast<void*>(sources[0]), 700);
#else
usleep(700000);
diff --git a/tests/perspective.c b/tests/perspective.c
index 72f4c50f..77998557 100644
--- a/tests/perspective.c
+++ b/tests/perspective.c
@@ -8,7 +8,7 @@
#include <SDL/SDL.h>
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <GL/gl.h>
#include <GL/glu.h>
#include "emscripten.h"
@@ -19,7 +19,7 @@
#include <stdio.h>
#include <stdlib.h>
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#define emColor4ubv(x)
#else
#define emColor4ubv(x) glColor4ubv(x)
@@ -392,7 +392,7 @@ int main( int argc, char* argv[] )
*/
one_iter(); // just one for testing purposes
-#ifndef EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(2000);
#endif
diff --git a/tests/poppler/utils/pdftoppm.cc b/tests/poppler/utils/pdftoppm.cc
index 4df0f5d8..a6865cc6 100644
--- a/tests/poppler/utils/pdftoppm.cc
+++ b/tests/poppler/utils/pdftoppm.cc
@@ -183,7 +183,7 @@ static void savePageSlice(PDFDoc *doc,
bitmap->writePNMFile(ppmFile);
}
} else {
-#if EMSCRIPTEN // XXX EMSCRIPTEN: avoid writing to stdout, better for benchmarking
+#ifdef __EMSCRIPTEN__ // XXX EMSCRIPTEN: avoid writing to stdout, better for benchmarking
printf("avoiding writing to stdout\n");
#else
diff --git a/tests/runner.py b/tests/runner.py
index 32575a1a..ba43e15a 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -583,7 +583,7 @@ class BrowserCore(RunnerCore):
def with_report_result(self, code):
return r'''
- #if EMSCRIPTEN
+ #ifdef __EMSCRIPTEN__
#include <emscripten.h>
#define REPORT_RESULT_INTERNAL(sync) \
char output[1000]; \
diff --git a/tests/s3tc.c b/tests/s3tc.c
index 5f7bee83..ca575ffc 100644
--- a/tests/s3tc.c
+++ b/tests/s3tc.c
@@ -143,7 +143,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(1500);
#endif
diff --git a/tests/s3tc_crunch.c b/tests/s3tc_crunch.c
index c2606c8f..ae5e1228 100644
--- a/tests/s3tc_crunch.c
+++ b/tests/s3tc_crunch.c
@@ -195,7 +195,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(1500);
#endif
diff --git a/tests/sdl_alloctext.c b/tests/sdl_alloctext.c
index 173be348..b7e9e6cf 100644
--- a/tests/sdl_alloctext.c
+++ b/tests/sdl_alloctext.c
@@ -25,7 +25,7 @@ int main()
SDL_FreeSurface(text);
}
-#if __EMSCRIPTEN__
+#ifdef __EMSCRIPTEN__
result = 1;
REPORT_RESULT();
#endif
diff --git a/tests/sdl_audio_beep.cpp b/tests/sdl_audio_beep.cpp
index 95a5a7e8..82001e8a 100644
--- a/tests/sdl_audio_beep.cpp
+++ b/tests/sdl_audio_beep.cpp
@@ -9,7 +9,7 @@
#define M_PI 3.14159265358979323846f
#endif
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include "emscripten/emscripten.h"
#endif
@@ -170,7 +170,7 @@ void nextTest(void *unused = 0) {
++s;
if (s >= NUM_ELEMS(sdlAudioFormats)) {
printf("All tests done. Quit.\n");
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_cancel_main_loop();
#ifdef REPORT_RESULT
int result = 1;
@@ -204,7 +204,7 @@ void update() {
if (size == 0 && beep) {
delete beep;
beep = 0;
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_async_call(nextTest, 0, 1500);
#else
SDL_Delay(1500);
@@ -233,7 +233,7 @@ int main(int argc, char** argv) {
nextTest();
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(update, 60, 0);
#else
while(beep) {
diff --git a/tests/sdl_audio_mix_channels.c b/tests/sdl_audio_mix_channels.c
index dd91d594..73d21963 100644
--- a/tests/sdl_audio_mix_channels.c
+++ b/tests/sdl_audio_mix_channels.c
@@ -42,7 +42,7 @@ int main(int argc, char **argv) {
int lastChannel = loadAndPlay();
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
int result = (lastChannel == -1);
REPORT_RESULT();
#endif
diff --git a/tests/sdl_canvas.c b/tests/sdl_canvas.c
index cab48985..4420d73e 100644
--- a/tests/sdl_canvas.c
+++ b/tests/sdl_canvas.c
@@ -6,7 +6,7 @@
int main(int argc, char **argv) {
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
// include GL stuff, to check that we can compile hybrid 2d/GL apps
extern void glBegin(int mode);
extern void glBindBuffer(int target, int buffer);
diff --git a/tests/sdl_canvas_size.c b/tests/sdl_canvas_size.c
index 923a9014..0d184823 100644
--- a/tests/sdl_canvas_size.c
+++ b/tests/sdl_canvas_size.c
@@ -30,7 +30,7 @@ REDISTRIBUTION OF THIS SOFTWARE.
#include <string.h>
#include <assert.h>
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -46,7 +46,7 @@ int main(int argc, char *argv[])
SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); // *new*
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
// Test 1: Check that initializing video mode with size (0,0) will use the size from the <canvas> element.
screen = SDL_SetVideoMode( 0, 0, 16, SDL_OPENGL ); // *changed*
@@ -177,7 +177,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/sdl_canvas_twice.c b/tests/sdl_canvas_twice.c
index 28a7a01c..ba62846b 100644
--- a/tests/sdl_canvas_twice.c
+++ b/tests/sdl_canvas_twice.c
@@ -1,6 +1,6 @@
#include <SDL/SDL.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
diff --git a/tests/sdl_fog_density.c b/tests/sdl_fog_density.c
index cab6a4d2..46d4a8a1 100644
--- a/tests/sdl_fog_density.c
+++ b/tests/sdl_fog_density.c
@@ -165,7 +165,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(30000);
#endif
diff --git a/tests/sdl_fog_exp2.c b/tests/sdl_fog_exp2.c
index dba0c708..f813cede 100644
--- a/tests/sdl_fog_exp2.c
+++ b/tests/sdl_fog_exp2.c
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#if !defined(__EMSCRIPTEN__)
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(30000);
#endif
diff --git a/tests/sdl_fog_linear.c b/tests/sdl_fog_linear.c
index f0805650..d7107914 100644
--- a/tests/sdl_fog_linear.c
+++ b/tests/sdl_fog_linear.c
@@ -167,7 +167,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(30000);
#endif
diff --git a/tests/sdl_fog_negative.c b/tests/sdl_fog_negative.c
index 1ede63a7..f99467bb 100644
--- a/tests/sdl_fog_negative.c
+++ b/tests/sdl_fog_negative.c
@@ -164,7 +164,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(30000);
#endif
diff --git a/tests/sdl_fog_simple.c b/tests/sdl_fog_simple.c
index 6c052bf5..269b7432 100644
--- a/tests/sdl_fog_simple.c
+++ b/tests/sdl_fog_simple.c
@@ -167,7 +167,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(30000);
#endif
diff --git a/tests/sdl_gfx_primitives.c b/tests/sdl_gfx_primitives.c
index db0c6181..dbf9849c 100644
--- a/tests/sdl_gfx_primitives.c
+++ b/tests/sdl_gfx_primitives.c
@@ -1,7 +1,7 @@
#include "SDL/SDL.h"
#include "SDL/SDL_gfxPrimitives.h"
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include "emscripten.h"
#endif
@@ -31,7 +31,7 @@ int main(int argc, char **argv) {
SDL_UpdateRect(screen, 0, 0, 0, 0);
-#ifndef EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Event evt;
SDL_SaveBMP(screen, "native_output.bmp");
while (1) {
diff --git a/tests/sdl_headless.c b/tests/sdl_headless.c
index 349c5e26..6157a46d 100644
--- a/tests/sdl_headless.c
+++ b/tests/sdl_headless.c
@@ -6,7 +6,7 @@
int main(int argc, char **argv) {
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
// include GL stuff, to check that we can compile hybrid 2d/GL apps
extern void glBegin(int mode);
extern void glBindBuffer(int target, int buffer);
diff --git a/tests/sdl_ogl.c b/tests/sdl_ogl.c
index e7071dcd..78efd7e0 100644
--- a/tests/sdl_ogl.c
+++ b/tests/sdl_ogl.c
@@ -157,7 +157,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/sdl_ogl_defaultMatrixMode.c b/tests/sdl_ogl_defaultMatrixMode.c
index eec2a831..6044f1ab 100644
--- a/tests/sdl_ogl_defaultMatrixMode.c
+++ b/tests/sdl_ogl_defaultMatrixMode.c
@@ -158,7 +158,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/sdl_ogl_p.c b/tests/sdl_ogl_p.c
index 1889d926..2607f35c 100644
--- a/tests/sdl_ogl_p.c
+++ b/tests/sdl_ogl_p.c
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/sdl_ogl_proc_alias.c b/tests/sdl_ogl_proc_alias.c
index c96da81b..4c251f83 100644
--- a/tests/sdl_ogl_proc_alias.c
+++ b/tests/sdl_ogl_proc_alias.c
@@ -166,7 +166,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/sdl_rotozoom.c b/tests/sdl_rotozoom.c
index 2c0d35df..cc0ee224 100644
--- a/tests/sdl_rotozoom.c
+++ b/tests/sdl_rotozoom.c
@@ -2,7 +2,7 @@
#include "SDL/SDL_image.h"
#include "SDL/SDL_rotozoom.h"
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include "emscripten.h"
#endif
@@ -45,7 +45,7 @@ int main(int argc, char **argv) {
mainloop();
-#ifndef EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Event evt;
SDL_SaveBMP(screen, "native_output.bmp");
while (1) {
diff --git a/tests/sdl_swsurface.c b/tests/sdl_swsurface.c
index 93141857..c859dbc7 100644
--- a/tests/sdl_swsurface.c
+++ b/tests/sdl_swsurface.c
@@ -12,7 +12,7 @@ int main(int argc, char** argv) {
SDL_Quit();
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
int result = 1;
REPORT_RESULT();
#endif
diff --git a/tests/sdlglshader.c b/tests/sdlglshader.c
index 9cd80097..d629ca94 100644
--- a/tests/sdlglshader.c
+++ b/tests/sdlglshader.c
@@ -148,7 +148,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
SDL_Delay(3000);
#endif
diff --git a/tests/sockets/test_enet_client.c b/tests/sockets/test_enet_client.c
index afcdcae8..b422e70c 100644
--- a/tests/sockets/test_enet_client.c
+++ b/tests/sockets/test_enet_client.c
@@ -1,14 +1,14 @@
#include <stdio.h>
#include <string.h>
#include <enet/enet.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
ENetHost * host;
void main_loop() {
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
static int counter = 0;
counter++;
if (counter == 100) {
@@ -34,7 +34,7 @@ void main_loop() {
event.channelID);
int result = strcmp("packetfoo", event.packet->data);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
REPORT_RESULT();
#else
exit(EXIT_SUCCESS);
@@ -92,7 +92,7 @@ int main (int argc, char ** argv)
exit (EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#if USE_IFRAME
emscripten_run_script("console.log('adding iframe');"
"var iframe = document.createElement('iframe');"
@@ -104,7 +104,7 @@ int main (int argc, char ** argv)
#endif
#endif
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 3, 1);
#else
while (1) main_loop();
diff --git a/tests/sockets/test_enet_server.c b/tests/sockets/test_enet_server.c
index 9a4518ac..30d86a99 100644
--- a/tests/sockets/test_enet_server.c
+++ b/tests/sockets/test_enet_server.c
@@ -4,7 +4,7 @@
#include <string.h>
#include <enet/enet.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -29,12 +29,12 @@ void send_msg(ENetPeer *peer) {
void main_loop() {
static int counter = 0;
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
counter++;
#endif
if (counter == 100) {
printf("stop!\n");
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_cancel_main_loop();
#endif
return;
@@ -101,7 +101,7 @@ int main (int argc, char ** argv)
exit (EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 3, 1);
#else
while (1) main_loop();
diff --git a/tests/sockets/test_getaddrinfo.c b/tests/sockets/test_getaddrinfo.c
index 1f912c69..85610473 100644
--- a/tests/sockets/test_getaddrinfo.c
+++ b/tests/sockets/test_getaddrinfo.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
diff --git a/tests/sockets/test_gethostbyname.c b/tests/sockets/test_gethostbyname.c
index 459c6b98..c0e11efb 100644
--- a/tests/sockets/test_gethostbyname.c
+++ b/tests/sockets/test_gethostbyname.c
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
diff --git a/tests/sockets/test_getnameinfo.c b/tests/sockets/test_getnameinfo.c
index c3fec6b4..dd4a0419 100644
--- a/tests/sockets/test_getnameinfo.c
+++ b/tests/sockets/test_getnameinfo.c
@@ -6,7 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -98,4 +98,4 @@ int main() {
puts("success");
return EXIT_SUCCESS;
-} \ No newline at end of file
+}
diff --git a/tests/sockets/test_sockets_echo_client.c b/tests/sockets/test_sockets_echo_client.c
index 684d767f..58d005c4 100644
--- a/tests/sockets/test_sockets_echo_client.c
+++ b/tests/sockets/test_sockets_echo_client.c
@@ -10,7 +10,7 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <assert.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -42,7 +42,7 @@ void finish(int result) {
close(server.fd);
server.fd = 0;
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
REPORT_RESULT();
#endif
exit(result);
@@ -160,7 +160,7 @@ int main() {
finish(EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 0, 0);
#else
while (1) main_loop();
diff --git a/tests/sockets/test_sockets_echo_server.c b/tests/sockets/test_sockets_echo_server.c
index b24472e8..55898add 100644
--- a/tests/sockets/test_sockets_echo_server.c
+++ b/tests/sockets/test_sockets_echo_server.c
@@ -11,7 +11,7 @@
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -186,7 +186,7 @@ int main() {
}
#endif
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 60, 0);
#else
while (1) main_loop();
diff --git a/tests/sockets/test_sockets_partial_client.c b/tests/sockets/test_sockets_partial_client.c
index 61084b17..2d930516 100644
--- a/tests/sockets/test_sockets_partial_client.c
+++ b/tests/sockets/test_sockets_partial_client.c
@@ -10,7 +10,7 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <assert.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -19,7 +19,7 @@ int sum = 0;
void finish(int result) {
close(sockfd);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
REPORT_RESULT();
#endif
exit(result);
@@ -108,7 +108,7 @@ int main() {
finish(EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(iter, 0, 0);
#else
while (1) iter();
diff --git a/tests/sockets/test_sockets_partial_server.c b/tests/sockets/test_sockets_partial_server.c
index f740c307..5c3621a0 100644
--- a/tests/sockets/test_sockets_partial_server.c
+++ b/tests/sockets/test_sockets_partial_server.c
@@ -11,7 +11,7 @@
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -124,7 +124,7 @@ int main() {
exit(EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(iter, 60, 0);
#else
while (1) iter();
diff --git a/tests/sockets/test_sockets_select_server_closes_connection_client_rw.c b/tests/sockets/test_sockets_select_server_closes_connection_client_rw.c
index e69c3ac0..28a81cd9 100644
--- a/tests/sockets/test_sockets_select_server_closes_connection_client_rw.c
+++ b/tests/sockets/test_sockets_select_server_closes_connection_client_rw.c
@@ -10,7 +10,7 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <assert.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -24,7 +24,7 @@ msg_t writemsg;
void finish(int result) {
close(sockfd);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
REPORT_RESULT();
#endif
exit(result);
@@ -216,7 +216,7 @@ int main() {
finish(EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 0, 0);
#else
while (1) main_loop();
diff --git a/tests/sockets/test_sockets_select_server_down_client.c b/tests/sockets/test_sockets_select_server_down_client.c
index 2765a879..5b050870 100644
--- a/tests/sockets/test_sockets_select_server_down_client.c
+++ b/tests/sockets/test_sockets_select_server_down_client.c
@@ -10,7 +10,7 @@
#include <fcntl.h>
#include <sys/ioctl.h>
#include <assert.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -20,7 +20,7 @@ int sockfd = -1;
void finish(int result) {
close(sockfd);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
REPORT_RESULT();
#endif
exit(result);
@@ -87,7 +87,7 @@ int main() {
finish(EXIT_FAILURE);
}
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(iter, 0, 0);
#else
while (1) iter();
diff --git a/tests/sockets/test_sockets_select_server_down_server.c b/tests/sockets/test_sockets_select_server_down_server.c
index 012932cf..07c5c847 100644
--- a/tests/sockets/test_sockets_select_server_down_server.c
+++ b/tests/sockets/test_sockets_select_server_down_server.c
@@ -10,7 +10,7 @@
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/socket.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -47,7 +47,7 @@ int main() {
close(serverfd);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(main_loop, 60, 0);
#else
while (1) main_loop(); sleep(1);
diff --git a/tests/sockets/webrtc_host.c b/tests/sockets/webrtc_host.c
index 866c875c..e482d4ae 100644
--- a/tests/sockets/webrtc_host.c
+++ b/tests/sockets/webrtc_host.c
@@ -9,7 +9,7 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <assert.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -37,7 +37,7 @@ void iter() {
shutdown(sock, SHUT_RDWR);
close(sock);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
int result = 1;
REPORT_RESULT();
exit(EXIT_SUCCESS);
@@ -79,7 +79,7 @@ int main(void)
hdr.msg_iov = iov;
hdr.msg_iovlen = 1;
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(iter, 0, 0);
#else
while (!done) iter();
diff --git a/tests/sockets/webrtc_peer.c b/tests/sockets/webrtc_peer.c
index dd44e93e..327782d6 100644
--- a/tests/sockets/webrtc_peer.c
+++ b/tests/sockets/webrtc_peer.c
@@ -9,7 +9,7 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <assert.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -71,7 +71,7 @@ int main(void)
hdr.msg_iov = iov;
hdr.msg_iovlen = 1;
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
emscripten_set_main_loop(iter, 0, 0);
#else
while (!done) iter();
diff --git a/tests/sqlite/sqlite3.c b/tests/sqlite/sqlite3.c
index bcbb7cdd..d49e1887 100644
--- a/tests/sqlite/sqlite3.c
+++ b/tests/sqlite/sqlite3.c
@@ -38132,7 +38132,7 @@ static int writeJournalHdr(Pager *pPager){
u32 nHeader = (u32)pPager->pageSize;/* Size of buffer pointed to by zHeader */
u32 nWrite; /* Bytes of header sector written */
int ii; /* Loop counter */
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
u8 temp[4];
#endif
@@ -38185,7 +38185,7 @@ static int writeJournalHdr(Pager *pPager){
}
/* The random check-hash initialiser */
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
sqlite3_randomness(sizeof(pPager->cksumInit), temp);
pPager->cksumInit = temp[0] + (((u32)temp[1]) << 8) + (((u32)temp[2]) << 16) + (((u32)temp[3]) << 24);
#else
@@ -52942,7 +52942,7 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
endPtr = &data[pPage->cellOffset + 2*pPage->nCell - 2];
assert( (SQLITE_PTR_TO_INT(ptr)&1)==0 ); /* ptr is always 2-byte aligned */
while( ptr<endPtr ){
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
ptr[0] = ptr[2];
ptr[1] = ptr[3];
#else
@@ -53043,7 +53043,7 @@ static void insertCell(
endPtr = &data[ins];
assert( (SQLITE_PTR_TO_INT(ptr)&1)==0 ); /* ptr is always 2-byte aligned */
while( ptr>endPtr ){
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
ptr[0] = ptr[-2];
ptr[1] = ptr[-1];
#else
diff --git a/tests/stat/test_mknod.c b/tests/stat/test_mknod.c
index 361b2315..262c8a5f 100644
--- a/tests/stat/test_mknod.c
+++ b/tests/stat/test_mknod.c
@@ -32,7 +32,7 @@ void test() {
// than a FIFO. so, the tests are disabled when running
// natively as they'd be utterly inconsistent.
//
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
// mknod a folder
err = mknod("mknod-folder", S_IFDIR | 0777, 0);
diff --git a/tests/stat/test_stat.c b/tests/stat/test_stat.c
index f59fb3c3..e14ebdc5 100644
--- a/tests/stat/test_stat.c
+++ b/tests/stat/test_stat.c
@@ -55,7 +55,7 @@ void test() {
assert(s.st_atime == 1200000000);
assert(s.st_mtime == 1200000000);
assert(s.st_ctime);
-#ifdef EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
assert(s.st_blksize == 4096);
assert(s.st_blocks == 1);
#endif
@@ -73,7 +73,7 @@ void test() {
assert(s.st_atime == 1200000000);
assert(s.st_mtime == 1200000000);
assert(s.st_ctime);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
assert(s.st_blksize == 4096);
assert(s.st_blocks == 1);
#endif
@@ -91,7 +91,7 @@ void test() {
assert(s.st_atime == 1200000000);
assert(s.st_mtime == 1200000000);
assert(s.st_ctime);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
assert(s.st_blksize == 4096);
assert(s.st_blocks == 1);
#endif
@@ -112,7 +112,7 @@ void test() {
assert(s.st_atime);
assert(s.st_mtime);
assert(s.st_ctime);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
assert(s.st_blksize == 4096);
assert(s.st_blocks == 0);
#endif
@@ -130,7 +130,7 @@ void test() {
assert(s.st_atime == 1200000000);
assert(s.st_mtime == 1200000000);
assert(s.st_ctime);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
assert(s.st_blksize == 4096);
assert(s.st_blocks == 1);
#endif
@@ -148,7 +148,7 @@ void test() {
assert(s.st_atime != 1200000000); // should NOT match the utime call we did for dir/file
assert(s.st_mtime != 1200000000);
assert(s.st_ctime);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
assert(s.st_blksize == 4096);
assert(s.st_blocks == 1);
#endif
diff --git a/tests/test_float_literals.cpp b/tests/test_float_literals.cpp
index fdae2764..2920fbd1 100644
--- a/tests/test_float_literals.cpp
+++ b/tests/test_float_literals.cpp
@@ -4,7 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
-#if defined(_MSC_VER) || defined(EMSCRIPTEN)
+#if defined(_MSC_VER) || defined(__EMSCRIPTEN__)
#define FLOAT_NAN ((float)std::numeric_limits<float>::quiet_NaN())
#define FLOAT_INF ((float)std::numeric_limits<float>::infinity())
#else
@@ -12,7 +12,7 @@
#define FLOAT_INF ((float)INFINITY)
#endif
-#if defined(_MSC_VER) || defined(EMSCRIPTEN)
+#if defined(_MSC_VER) || defined(__EMSCRIPTEN__)
#define DOUBLE_NAN ((double)std::numeric_limits<double>::quiet_NaN())
#define DOUBLE_INF ((double)std::numeric_limits<double>::infinity())
#else
diff --git a/tests/tex_nonbyte.c b/tests/tex_nonbyte.c
index 960d0efb..ffeb9f24 100644
--- a/tests/tex_nonbyte.c
+++ b/tests/tex_nonbyte.c
@@ -22,7 +22,7 @@ RESULTING FROM THE USE, MODIFICATION, OR
REDISTRIBUTION OF THIS SOFTWARE.
*/
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
#define USE_GLEW 1
#endif
@@ -118,7 +118,7 @@ int main(int argc, char *argv[])
glClearColor( 0, 0, 0, 0 );
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
#endif
@@ -192,7 +192,7 @@ int main(int argc, char *argv[])
SDL_GL_SwapBuffers();
-#if !EMSCRIPTEN
+#ifndef __EMSCRIPTEN__
// Wait for 3 seconds to give us a chance to see the image
SDL_Delay(3000);
#endif
diff --git a/tests/unistd/unlink.c b/tests/unistd/unlink.c
index 9f532325..a15baab8 100644
--- a/tests/unistd/unlink.c
+++ b/tests/unistd/unlink.c
@@ -7,7 +7,7 @@
#include <string.h>
#include <unistd.h>
#include <sys/stat.h>
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
#include <emscripten.h>
#endif
@@ -23,7 +23,7 @@ static void create_file(const char *path, const char *buffer, int mode) {
void setup() {
mkdir("working", 0777);
-#if EMSCRIPTEN
+#ifdef __EMSCRIPTEN__
EM_ASM(
#if NODEFS
FS.mount(NODEFS, { root: '.' }, 'working');
diff --git a/tests/uuid/test.c b/tests/uuid/test.c
index dc2c6589..f5f84011 100644
--- a/tests/uuid/test.c
+++ b/tests/uuid/test.c
@@ -59,7 +59,7 @@ int main() {
// The following lets the browser test exit cleanly.
int result = 1;
- #if EMSCRIPTEN
+ #if defined(__EMSCRIPTEN__)
#ifdef REPORT_RESULT
REPORT_RESULT();
#endif