diff --git a/ChangeLog b/ChangeLog index 04d41b34..3ff7b476 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-05-25 Nicolas François + + * configure.in, lib/defines.h: Allow usage of booleans in the + source. + 2008-05-25 Nicolas François * configure.in: Allow --disable-man and --enable-man=no. diff --git a/lib/defines.h b/lib/defines.h index a3ab5aaf..e946109e 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -321,4 +321,20 @@ extern char *strerror (); # define unused #endif +#if HAVE_STDBOOL_H +# include +#else +# if ! HAVE__BOOL +# ifdef __cplusplus +typedef bool _Bool; +# else +typedef unsigned char _Bool; +# endif +# endif +# define bool _Bool +# define false 0 +# define true 1 +# define __bool_true_false_are_defined 1 +#endif + #endif /* _DEFINES_H_ */