+added an MBIMPL macro;

*fixed some platform dependent macro issues for apple systems;
*polished OS names.
This commit is contained in:
Wang Renxin 2017-02-25 13:12:46 +08:00
parent 523c82b3fd
commit a1fd96aa03
3 changed files with 13 additions and 5 deletions

View File

@ -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

View File

@ -71,11 +71,11 @@ extern "C" {
#elif defined __APPLE__
# include <TargetConditionals.h>
# 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 */

View File

@ -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