From 94af743baab2e32912bbc6f48e9ea54bda818593 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 24 Apr 2006 14:52:37 +0000 Subject: r15203: Allow system 'bool' type to be defined in another header then stdbool.h (This used to be commit a5a648de94014b13da3af8dfac06380c9ec26c53) --- source4/lib/replace/config.m4 | 9 +++++++++ source4/lib/replace/replace.h | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) (limited to 'source4') diff --git a/source4/lib/replace/config.m4 b/source4/lib/replace/config.m4 index ada9566b58..bac38f6439 100644 --- a/source4/lib/replace/config.m4 +++ b/source4/lib/replace/config.m4 @@ -130,6 +130,15 @@ AC_CHECK_FUNCS([syslog memset setnetgrent getnetgrent endnetgrent memcpy],, AC_CHECK_HEADERS(stdbool.h) +AC_CHECK_TYPE(bool, +[AC_DEFINE(HAVE_BOOL, 1, [Whether the bool type is available])],, +[ +AC_INCLUDES_DEFAULT +#ifdef HAVE_STDBOOL_H +#include +#endif] +) + sinclude(lib/replace/readline.m4) sinclude(lib/replace/getpass.m4) diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h index 218fd4cb2a..bc1be38de0 100644 --- a/source4/lib/replace/replace.h +++ b/source4/lib/replace/replace.h @@ -202,7 +202,9 @@ int rep_mkstemp(char *temp); #ifdef HAVE_STDBOOL_H #include -#else +#endif + +#ifndef HAVE_BOOL #define __bool_true_false_are_defined typedef bool int; #define false (0) -- cgit