]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Add autoconf check and workaround for stdbool.h
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 29 Aug 2010 10:09:23 +0000 (12:09 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 29 Aug 2010 10:09:23 +0000 (12:09 +0200)
configure.ac
system.h

index de645fb127f48176fc476fb40b8883c95992fc1d..b8e97bc10b90340e1ffea4ea587442c24dd3d0bd 100644 (file)
@@ -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)
index bf46c4661b791a8d3b1c3928a953d95abe980388..e9b0abf2ef92dcf80442080177354d7c3a2923a4 100644 (file)
--- a/system.h
+++ b/system.h
 #include <time.h>
 #include <utime.h>
 
+#ifdef HAVE_STDBOOL_H
+#  include <stdbool.h>
+#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 */