Mercurial > hg > th-libs
comparison th_types.h @ 457:85fa3d333556
Actually, revert the boolean changes .. meh.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 02 Jan 2018 23:09:29 +0200 |
parents | 1bf886fa9db5 |
children | e4ce60239d16 |
comparison
equal
deleted
inserted
replaced
456:1bf886fa9db5 | 457:85fa3d333556 |
---|---|
20 #elif defined(HAVE_SYS_TYPES_H) | 20 #elif defined(HAVE_SYS_TYPES_H) |
21 # include <sys/types.h> | 21 # include <sys/types.h> |
22 # ifndef HAVE_INT_TYPES | 22 # ifndef HAVE_INT_TYPES |
23 # define HAVE_INT_TYPES 1 | 23 # define HAVE_INT_TYPES 1 |
24 # endif | 24 # endif |
25 #endif | |
26 | |
27 #ifdef HAVE_STDBOOL_H | |
28 # define HAVE_BOOL 1 | |
29 # include <stdbool.h> | |
30 #endif | 25 #endif |
31 | 26 |
32 #ifdef HAVE_INTTYPES_H | 27 #ifdef HAVE_INTTYPES_H |
33 # include <inttypes.h> | 28 # include <inttypes.h> |
34 #endif | 29 #endif |
174 #endif | 169 #endif |
175 | 170 |
176 | 171 |
177 /* Define a boolean type, if needed | 172 /* Define a boolean type, if needed |
178 */ | 173 */ |
179 #ifndef HAVE_BOOL | 174 #if !defined(FALSE) && !defined(TRUE) && !defined(BOOL) |
180 # if !defined(false) && !defined(true) && !defined(bool) | 175 typedef enum { FALSE = 0, TRUE = 1 } BOOL; |
181 typedef enum { false = 0, true = 1 } bool; | 176 #endif |
182 # endif | |
183 # ifndef bool | |
184 # define bool int | |
185 # endif | |
186 | 177 |
187 #endif // !HAVE_BOOL | 178 #ifndef BOOL |
188 | 179 # ifdef bool |
180 # define BOOL bool | |
181 # else | |
182 # define BOOL int | |
183 # endif | |
184 #endif | |
189 | 185 |
190 #endif // TH_TYPES_H | 186 #endif // TH_TYPES_H |