diff --git a/CHANGES b/CHANGES index f65203e..6f35fce 100644 --- a/CHANGES +++ b/CHANGES @@ -107,6 +107,9 @@ porting: compile errors when they were already provided by build framework. Thanks to Liyu Liu for providing a patch. + David Arnstein contributed a patch for NetBSD 5.1 including stdbool.h + support and appropriate files in Config/ + testing: Do not distribute testcert.conf with socat source but generate it (and new testcert6.conf) during test.sh run. diff --git a/Makefile.in b/Makefile.in index 01f11f9..7d7771d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -82,6 +82,7 @@ OSFILES = Config/Makefile.Linux-2-6-24 Config/config.Linux-2-6-24.h \ Config/Makefile.SunOS-5-10 Config/config.SunOS-5-10.h \ Config/Makefile.FreeBSD-6-1 Config/config.FreeBSD-6-1.h \ Config/Makefile.NetBSD-4-0 Config/config.NetBSD-4-0.h \ + Config/Makefile.NetBSD-5-1 Config/config.NetBSD-5-1.h \ Config/Makefile.OpenBSD-4-3 Config/config.OpenBSD-4-3.h \ Config/Makefile.AIX-5-3 Config/config.AIX-5-3.h \ Config/Makefile.Cygwin-1-5-25 Config/config.Cygwin-1-5-25.h \ diff --git a/config.h.in b/config.h.in index 3ed5bff..40ccf6a 100644 --- a/config.h.in +++ b/config.h.in @@ -146,6 +146,9 @@ /* Define if you have the hstrerror prototype */ #undef HAVE_PROTOTYPE_HSTRERROR +/* Define if you have the header file. */ +#undef HAVE_STDBOOL_H + /* Define if you have the header file. */ #undef HAVE_INTTYPES_H diff --git a/configure.in b/configure.in index 52d0293..8d8fff6 100644 --- a/configure.in +++ b/configure.in @@ -57,6 +57,7 @@ export CFLAGS dnl Checks for header files. AC_HEADER_STDC +AC_CHECK_HEADERS(stdbool.h) AC_CHECK_HEADERS(inttypes.h) AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h limits.h strings.h sys/param.h sys/ioctl.h sys/time.h syslog.h unistd.h) @@ -768,7 +769,10 @@ AC_CHECK_TYPE(sig_atomic_t,AC_DEFINE(HAVE_TYPE_SIG_ATOMIC_T),,[#include "sysincl AC_MSG_CHECKING(for bool) AC_CACHE_VAL(sc_cv_type_bool, -[AC_TRY_COMPILE([],[bool b;], +[AC_TRY_COMPILE([#ifdef HAVE_STDBOOL_H + #include + #endif], +[bool b;], [sc_cv_type_bool=yes], [sc_cv_type_bool=no])]) if test $sc_cv_type_bool = yes; then diff --git a/dalan.c b/dalan.c index 1d7334f..2bf4dd2 100644 --- a/dalan.c +++ b/dalan.c @@ -1,12 +1,16 @@ /* source: dalan.c */ -/* Copyright Gerhard Rieger 2001-2008 */ +/* Copyright Gerhard Rieger */ /* Published under the GNU General Public License V.2, see file COPYING */ /* idea of a low level data description language. currently only a most primitive subset exists. */ +#include "config.h" #include #include +#if HAVE_STDBOOL_H +#include +#endif #include #include "dalan.h" diff --git a/sysincludes.h b/sysincludes.h index 9635f12..094a118 100644 --- a/sysincludes.h +++ b/sysincludes.h @@ -5,6 +5,9 @@ #ifndef __sysincludes_h_included #define __sysincludes_h_included 1 +#if HAVE_STDBOOL_H +#include /* bool, true, false */ +#endif #if HAVE_INTTYPES_H #include /* uint16_t */ #endif