From 9e0809db22aa694d9edad9dd74515d655dc70579 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Thu, 7 May 2009 12:50:17 -0700 Subject: [PATCH] configure.in: Use AC_HEADER_STDBOOL Signed-off-by: Doug MacEachern Signed-off-by: Florian Forster --- configure.in | 3 ++- src/collectd.h | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index af0219d2..e6a4964e 100644 --- a/configure.in +++ b/configure.in @@ -76,8 +76,9 @@ fi AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_HEADER_DIRENT +AC_HEADER_STDBOOL -AC_CHECK_HEADERS(stdio.h stdint.h stdbool.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h) +AC_CHECK_HEADERS(stdio.h stdint.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h) # For ping library AC_CHECK_HEADERS(netinet/in_systm.h, [], [], diff --git a/src/collectd.h b/src/collectd.h index 24e5add3..16bde1cf 100644 --- a/src/collectd.h +++ b/src/collectd.h @@ -58,6 +58,18 @@ #endif #if 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 #if HAVE_UNISTD_H # include -- 2.30.2