From: Joel Rosdahl Date: Sun, 29 Aug 2010 10:09:23 +0000 (+0200) Subject: Add autoconf check and workaround for stdbool.h X-Git-Tag: v3.1~36 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=41113e3087aabc68bf4379d5c101da351a5c7e67;p=thirdparty%2Fccache.git Add autoconf check and workaround for stdbool.h --- diff --git a/configure.ac b/configure.ac index de645fb12..b8e97bc10 100644 --- a/configure.ac +++ b/configure.ac @@ -32,6 +32,7 @@ fi AC_HEADER_DIRENT AC_HEADER_TIME +AC_HEADER_STDBOOL AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(ctype.h pwd.h stdlib.h string.h strings.h sys/time.h sys/mman.h) diff --git a/system.h b/system.h index bf46c4661..e9b0abf2e 100644 --- a/system.h +++ b/system.h @@ -46,4 +46,20 @@ #include #include +#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 + #endif /* CCACHE_SYSTEM_H */