From 74971e5df7b6ee2e48a9ff4601e48c75ec68e64d Mon Sep 17 00:00:00 2001 From: Wang Renxin Date: Sun, 13 May 2018 10:07:04 +0800 Subject: [PATCH] +added platform dependent macros for emscripten. --- HISTORY | 3 +++ core/my_basic.h | 8 ++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/HISTORY b/HISTORY index 5f206d3..1ff423d 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +May. 13 2018 +Added platform dependent macros for Emscripten + May. 9 2018 Fixed a crash bug in invalid conditional expression with class member, thanks to AaBc for pointing it out Fixed a wrong error with the VAL statement diff --git a/core/my_basic.h b/core/my_basic.h index 94b6567..da9803e 100755 --- a/core/my_basic.h +++ b/core/my_basic.h @@ -30,7 +30,9 @@ extern "C" { #endif /* __cplusplus */ -#if defined ARDUINO +#if defined __EMSCRIPTEN__ +# define MB_CP_EMSCRIPTEN +#elif defined ARDUINO # define MB_CP_ARDUINO #elif defined __BORLANDC__ # define MB_CP_BORLANDC @@ -62,7 +64,9 @@ extern "C" { # define MB_CP_UNKNOWN #endif /* Compiler dependent macro */ -#if defined _WIN64 +#if defined __EMSCRIPTEN__ +# define MB_OS_HTML +#elif defined _WIN64 # define MB_OS_WIN # define MB_OS_WIN64 #elif defined _WIN32