From dc4ef6b517a9c8fad89ae384059b9926f2baa9ea Mon Sep 17 00:00:00 2001 From: "Evgeny Grin (Karlson2k)" Date: Thu, 17 Nov 2016 17:49:20 +0300 Subject: Additional 'bool' configure checks and fixes for old VS compilers --- w32/common/MHD_config.h | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'w32') diff --git a/w32/common/MHD_config.h b/w32/common/MHD_config.h index 793e353c..02d96424 100644 --- a/w32/common/MHD_config.h +++ b/w32/common/MHD_config.h @@ -9,13 +9,6 @@ /* Define if MS VC compiler is used */ #define MSVC 1 -/* Define to type which will be used as boolean type. */ -#if _MSC_VER+0 >= 1800 -#define _MHD_bool _Bool -#else /* before VS 2013 */ -#define _MHD_bool int -#endif /* before VS 2013 */ - /* Define to 1 if your C compiler supports inline functions. */ #define INLINE_FUNC 1 @@ -139,9 +132,23 @@ /* Define to 1 if you have the header file. */ #define HAVE_STDDEF_H 1 +#if _MSC_VER+0 >= 1800 /* VS 2013 and later */ /* Define to 1 if you have the header file and defines -'bool' type. */ + 'bool' type. */ #define HAVE_STDBOOL_H 1 +#else /* before VS 2013 */ + +/* Define to type name which will be used as boolean type. */ +#define bool int + +/* Define to value interpreted by compiler as boolean "false", if "false" is + not defined by system headers. */ +#define false 0 + +/* Define to value interpreted by compiler as boolean "true", if "true" is not + defined by system headers. */ +#define true (!0) +#endif /* before VS 2013 */ /* *** Other useful staff *** */ -- cgit v1.2.3