From: Anders Kaseorg Date: Mon, 23 Aug 2010 01:56:01 +0000 (-0400) Subject: Define bool X-Git-Tag: 2.0~10 X-Git-Url: http://andersk.mit.edu/gitweb/nss_nonlocal.git/commitdiff_plain/f9a5d9a70af495d60d6d15057768ab1e8d787bf7 Define bool Signed-off-by: Anders Kaseorg --- diff --git a/configure.ac b/configure.ac index fbf3247..9221340 100644 --- a/configure.ac +++ b/configure.ac @@ -9,6 +9,8 @@ AC_PROG_CC AC_PROG_INSTALL AC_PROG_LIBTOOL +AC_HEADER_STDBOOL + case "$target_cpu" in i386 | i486 | i586 | i686 | i786) AC_DEFINE([USE_REGPARMS], [], diff --git a/nonlocal.h b/nonlocal.h index a0746d4..b31a9a9 100644 --- a/nonlocal.h +++ b/nonlocal.h @@ -27,6 +27,23 @@ #define NONLOCAL_H #include "config.h" + +#ifdef HAVE_STDBOOL_H +# include +#else +# ifndef HAVE__BOOL +# ifdef __cplusplus +typedef bool _Bool; +# else +# define _Bool signed char +# endif +# endif +# define bool _Bool +# define false 0 +# define true 1 +# define __bool_true_false_are_defined 1 +#endif + #include "nsswitch-internal.h" struct walk_nss {