From 6fad1a3ca7e1a998ce17a9d5fe8347c4128ba391 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Thu, 13 Aug 2026 22:20:57 -0400 Subject: [PATCH 1/2] Utilize stdbool.h unconditionally This resolves a build failure when using a C23 compiler and pyldns is enabled. ``` In file included from ./ldns/buffer.h:16, from ./include/ldns/ldns.h:96, from ../contrib/python/ldns_wrapper.c:3547: /usr/include/assert.h:115:14: error: conflicting types for '__assert_single_arg'; have 'signed char(signed char)' 115 | extern _Bool __assert_single_arg (_Bool); | ^~~~~~~~~~~~~~~~~~~ In file included from /usr/include/python3.14/Python.h:20, from ../contrib/python/ldns_wrapper.c:203: /usr/include/assert.h:115:14: note: previous declaration of '__assert_single_arg' with type 'bool(bool)' 115 | extern _Bool __assert_single_arg (_Bool); | ^~~~~~~~~~~~~~~~~~~ make: *** [Makefile:329: ldns_wrapper.lo] Error 1 ``` Also, the autoconf-2.73 documentation suggests that any reasonably modern C compiler will supply stdbool.h. The AC_HEADER_STDBOOL macro and the HAVE_STDBOOL_H macro are obsolete. The HAVE_STDBOOL_H macro was unusable in installed headers anyway, so this makes the headers behave more consistently all around. --- configure.ac | 1 - ldns/common.h.in | 28 +--------------------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/configure.ac b/configure.ac index a7082ce0..b0ad29e2 100644 --- a/configure.ac +++ b/configure.ac @@ -840,7 +840,6 @@ m4_warn([obsolete], AC_CHECK_INCLUDES_DEFAULT AC_PROG_EGREP -AC_HEADER_STDBOOL #AC_HEADER_SYS_WAIT #AC_CHECK_HEADERS([getopt.h fcntl.h stdlib.h string.h strings.h unistd.h]) # do the very minimum - we can always extend this diff --git a/ldns/common.h.in b/ldns/common.h.in index db559608..87144184 100644 --- a/ldns/common.h.in +++ b/ldns/common.h.in @@ -31,33 +31,7 @@ #define LDNS_BUILD_CONFIG_USE_ED25519 @ldns_build_config_use_ed25519@ #define LDNS_BUILD_CONFIG_USE_ED448 @ldns_build_config_use_ed448@ -/* - * HAVE_STDBOOL_H is not available when distributed as a library, but no build - * configuration variables may be used (like those above) because the header - * is sometimes only available when using special compiler flags to enable the - * c99 environment. Because we cannot force the usage of this flag, we have to - * provide a default type. Below what is suggested by the autoconf manual. - */ -/*@ignore@*/ -/* splint barfs on this construct */ -#ifndef __bool_true_false_are_defined -# 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 -/*@end@*/ +#include #if LDNS_BUILD_CONFIG_HAVE_ATTR_FORMAT #define ATTR_FORMAT(archetype, string_index, first_to_check) \ From ae3a7c1a8be7d8639327debc2653beefcc20263d Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Thu, 13 Aug 2026 22:34:21 -0400 Subject: [PATCH 2/2] configure.ac: call AC_PROG_INSTALL This ensures that autoconf-2.73 will create install-sh in the source directory. --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/configure.ac b/configure.ac index b0ad29e2..989d4129 100644 --- a/configure.ac +++ b/configure.ac @@ -55,6 +55,7 @@ CFLAGS="$CFLAGS" AC_PROG_CC ACX_DEPFLAG AC_PROG_MAKE_SET +AC_PROG_INSTALL # Extra (sp)lint flags for NetBSD AC_CANONICAL_HOST