From 0c332da27a59294bd08ce6e07b85b2a3bb2fc6b5 Mon Sep 17 00:00:00 2001 From: Wang Renxin Date: Wed, 28 Oct 2015 20:02:42 +0800 Subject: [PATCH] *improved compile compatibility with c++. --- core/my_basic.h | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/core/my_basic.h b/core/my_basic.h index c89612f..82a3697 100755 --- a/core/my_basic.h +++ b/core/my_basic.h @@ -89,12 +89,14 @@ extern "C" { # pragma pack(1) #endif /* MB_COMPACT_MODE */ -#ifndef true -# define true (!0) -#endif /* true */ -#ifndef false -# define false (0) -#endif /* false */ +#ifndef __cplusplus +# ifndef true +# define true (!0) +# endif /* true */ +# ifndef false +# define false (0) +# endif /* false */ +#endif /* __cplusplus */ #ifndef bool_t # define bool_t int