From 8986839e4ac67facb52abc7fff3d5082e854aab5 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 3 May 2018 01:34:26 -0700 Subject: [PATCH] Use __EMSCRIPTEN__ (rather then EMSCRIPTEN) to check for emscripten (#583) The old EMSCRIPTEN macro is deprecated and not enabled when EMCC_STRICT is set. Also fix a typo in EMSCRIPTN (not sure how this ever worked). --- include/benchmark/benchmark.h | 2 +- src/internal_macros.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/benchmark/benchmark.h b/include/benchmark/benchmark.h index 6be8c12a..a6015b81 100644 --- a/include/benchmark/benchmark.h +++ b/include/benchmark/benchmark.h @@ -292,7 +292,7 @@ BENCHMARK_UNUSED static int stream_init_anchor = InitializeStreams(); #if (!defined(__GNUC__) && !defined(__clang__)) || defined(__pnacl__) || \ - defined(EMSCRIPTN) + defined(__EMSCRIPTEN__) # define BENCHMARK_HAS_NO_INLINE_ASSEMBLY #endif diff --git a/src/internal_macros.h b/src/internal_macros.h index f7b9203e..edb8a5c0 100644 --- a/src/internal_macros.h +++ b/src/internal_macros.h @@ -57,7 +57,7 @@ #define BENCHMARK_OS_LINUX 1 #elif defined(__native_client__) #define BENCHMARK_OS_NACL 1 -#elif defined(EMSCRIPTEN) +#elif defined(__EMSCRIPTEN__) #define BENCHMARK_OS_EMSCRIPTEN 1 #elif defined(__rtems__) #define BENCHMARK_OS_RTEMS 1