diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-11-17 17:49:20 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-11-17 17:49:20 +0300 |
commit | dc4ef6b517a9c8fad89ae384059b9926f2baa9ea (patch) | |
tree | 7361b66c8daca2f3c225c3fa30edca03e72550f5 /w32 | |
parent | c99bb7febbe4ad5f36b1882c94c51e6429a0e7d4 (diff) | |
download | libmicrohttpd-dc4ef6b517a9c8fad89ae384059b9926f2baa9ea.tar.gz libmicrohttpd-dc4ef6b517a9c8fad89ae384059b9926f2baa9ea.zip |
Additional 'bool' configure checks and fixes for old VS compilers
Diffstat (limited to 'w32')
-rw-r--r-- | w32/common/MHD_config.h | 23 |
1 files changed, 15 insertions, 8 deletions
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 @@ | |||
9 | /* Define if MS VC compiler is used */ | 9 | /* Define if MS VC compiler is used */ |
10 | #define MSVC 1 | 10 | #define MSVC 1 |
11 | 11 | ||
12 | /* Define to type which will be used as boolean type. */ | ||
13 | #if _MSC_VER+0 >= 1800 | ||
14 | #define _MHD_bool _Bool | ||
15 | #else /* before VS 2013 */ | ||
16 | #define _MHD_bool int | ||
17 | #endif /* before VS 2013 */ | ||
18 | |||
19 | /* Define to 1 if your C compiler supports inline functions. */ | 12 | /* Define to 1 if your C compiler supports inline functions. */ |
20 | #define INLINE_FUNC 1 | 13 | #define INLINE_FUNC 1 |
21 | 14 | ||
@@ -139,9 +132,23 @@ | |||
139 | /* Define to 1 if you have the <stddef.h> header file. */ | 132 | /* Define to 1 if you have the <stddef.h> header file. */ |
140 | #define HAVE_STDDEF_H 1 | 133 | #define HAVE_STDDEF_H 1 |
141 | 134 | ||
135 | #if _MSC_VER+0 >= 1800 /* VS 2013 and later */ | ||
142 | /* Define to 1 if you have the <stdbool.h> header file and <stdbool.h> defines | 136 | /* Define to 1 if you have the <stdbool.h> header file and <stdbool.h> defines |
143 | 'bool' type. */ | 137 | 'bool' type. */ |
144 | #define HAVE_STDBOOL_H 1 | 138 | #define HAVE_STDBOOL_H 1 |
139 | #else /* before VS 2013 */ | ||
140 | |||
141 | /* Define to type name which will be used as boolean type. */ | ||
142 | #define bool int | ||
143 | |||
144 | /* Define to value interpreted by compiler as boolean "false", if "false" is | ||
145 | not defined by system headers. */ | ||
146 | #define false 0 | ||
147 | |||
148 | /* Define to value interpreted by compiler as boolean "true", if "true" is not | ||
149 | defined by system headers. */ | ||
150 | #define true (!0) | ||
151 | #endif /* before VS 2013 */ | ||
145 | 152 | ||
146 | 153 | ||
147 | /* *** Other useful staff *** */ | 154 | /* *** Other useful staff *** */ |