Skip to content

Utilize stdbool.h unconditionally - #315

Open
floppym wants to merge 2 commits into
NLnetLabs:developfrom
floppym:stdbool
Open

floppym wants to merge 2 commits into
NLnetLabs:developfrom
floppym:stdbool

Conversation

@floppym

@floppym floppym commented Aug 14, 2026

Copy link
Copy Markdown

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.

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.
This ensures that autoconf-2.73 will create install-sh in the source
directory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant