From a1fd96aa0363f959c1b08bff436421ff66dd0483 Mon Sep 17 00:00:00 2001 From: Wang Renxin Date: Sat, 25 Feb 2017 13:12:46 +0800 Subject: [PATCH] +added an MBIMPL macro; *fixed some platform dependent macro issues for apple systems; *polished OS names. --- HISTORY | 4 ++++ core/my_basic.h | 10 +++++++--- shell/main.c | 4 ++-- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/HISTORY b/HISTORY index 9b8b015..8e0b261 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,7 @@ +Feb. 25 2017 +Added an MBIMPL macro +Fixed some platform dependent macro issues for apple systems + Feb. 22 2017 Improved API by replacing assertions with checking code Improved function calling of referenced usertype diff --git a/core/my_basic.h b/core/my_basic.h index 40c7e9b..5a468c6 100755 --- a/core/my_basic.h +++ b/core/my_basic.h @@ -71,11 +71,11 @@ extern "C" { #elif defined __APPLE__ # include # define MB_OS_APPLE -# ifdef TARGET_OS_IPHONE +# if defined TARGET_OS_IPHONE && TARGET_OS_IPHONE == 1 # define MB_OS_IOS -# elif defined TARGET_IPHONE_SIMULATOR +# elif defined TARGET_IPHONE_SIMULATOR && TARGET_IPHONE_SIMULATOR == 1 # define MB_OS_IOS_SIM -# elif defined TARGET_OS_MAC +# elif defined TARGET_OS_MAC && TARGET_OS_MAC == 1 # define MB_OS_MAC # endif #elif defined __unix__ @@ -92,6 +92,10 @@ extern "C" { # define MBAPI #endif /* MBAPI */ +#ifndef MBIMPL +# define MBIMPL +#endif /* MBIMPL */ + #ifndef MBCONST # define MBCONST #endif /* MBCONST */ diff --git a/shell/main.c b/shell/main.c index 8673913..56d13d9 100755 --- a/shell/main.c +++ b/shell/main.c @@ -1217,11 +1217,11 @@ static bool_t _process_parameters(int argc, char* argv[]) { */ #ifdef MB_OS_WIN -# define _OS "WIN" +# define _OS "WINDOWS" #elif defined MB_OS_IOS || MB_OS_IOS_SIM # define _OS "IOS" #elif defined MB_OS_MAC -# define _OS "MAC" +# define _OS "MACOS" #elif defined MB_OS_UNIX # define _OS "UNIX" #elif defined MB_OS_LINUX