From: nekral-guest Date: Sat, 26 Jul 2008 16:13:29 +0000 (+0000) Subject: * lib/defines.h: Make sure the booleans are defined before using X-Git-Tag: 4.1.3~323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a363e1c51f08cdb626407742e821e177d4c69573;p=thirdparty%2Fshadow.git * lib/defines.h: Make sure the booleans are defined before using them. --- diff --git a/ChangeLog b/ChangeLog index c9c45c88d..f69f0373f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-07-26 Nicolas François + + * lib/defines.h: Make sure the booleans are defined before using + them. + 2008-07-26 Nicolas François * src/groupmems.c: Added Prog global variable to indicate the name diff --git a/lib/defines.h b/lib/defines.h index 4d536fbef..8381d82c6 100644 --- a/lib/defines.h +++ b/lib/defines.h @@ -6,6 +6,22 @@ #include +#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 + #define ISDIGIT_LOCALE(c) (IN_CTYPE_DOMAIN (c) && isdigit (c)) /* Take care of NLS matters. */ @@ -334,20 +350,4 @@ 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_ */