mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-18 14:56:05 -05:00
- Fix configure test for nonstring attribute so that it does not
Some checks failed
ci / build (push) Has been cancelled
Some checks failed
ci / build (push) Has been cancelled
accept when the compiler prints a warning about an unknown attribute.
This commit is contained in:
parent
f9b9050ab8
commit
e887a79a92
3 changed files with 22 additions and 2 deletions
|
|
@ -2,7 +2,9 @@
|
|||
# Copyright 2009, Wouter Wijngaards, NLnet Labs.
|
||||
# BSD licensed.
|
||||
#
|
||||
# Version 50
|
||||
# Version 51
|
||||
# 2025-11-06 Fix ACX_CHECK_NONSTRING_ATTRIBUTE to reject clang, that prints
|
||||
# a warning for 'unknown attribute' when nonstring is used.
|
||||
# 2025-09-29 add ac_cv_func_malloc_0_nonnull as a cache value for the malloc(0)
|
||||
# check by ACX_FUNC_MALLOC.
|
||||
# 2025-09-29 add ACX_CHECK_NONSTRING_ATTRIBUTE, AHX_CONFIG_NONSTRING_ATTRIBUTE.
|
||||
|
|
@ -535,6 +537,9 @@ dnl result in HAVE_ATTR_NONSTRING.
|
|||
dnl Make sure you include AHX_CONFIG_NONSTRING_ATTRIBUTE also.
|
||||
AC_DEFUN([ACX_CHECK_NONSTRING_ATTRIBUTE],
|
||||
[AC_REQUIRE([AC_PROG_CC])
|
||||
AC_REQUIRE([ACX_CHECK_ERROR_FLAGS])
|
||||
BAKCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $ERRFLAG"
|
||||
AC_MSG_CHECKING(whether the C compiler (${CC-cc}) accepts the "nonstring" attribute)
|
||||
AC_CACHE_VAL(ac_cv_c_nonstring_attribute,
|
||||
[ac_cv_c_nonstring_attribute=no
|
||||
|
|
@ -546,6 +551,7 @@ struct test {
|
|||
struct test t = { "1" };
|
||||
(void) t;
|
||||
]])],[ac_cv_c_nonstring_attribute="yes"],[ac_cv_c_nonstring_attribute="no"])
|
||||
CFLAGS="$BAKCFLAGS"
|
||||
])
|
||||
|
||||
dnl Setup ATTR_NONSTRING config.h parts.
|
||||
|
|
|
|||
13
configure
vendored
13
configure
vendored
|
|
@ -6949,6 +6949,9 @@ printf "%s\n" "#define HAVE_ATTR_UNUSED 1" >>confdefs.h
|
|||
fi
|
||||
|
||||
|
||||
|
||||
BAKCFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS $ERRFLAG"
|
||||
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"nonstring\" attribute" >&5
|
||||
printf %s "checking whether the C compiler (${CC-cc}) accepts the \"nonstring\" attribute... " >&6; }
|
||||
if test ${ac_cv_c_nonstring_attribute+y}
|
||||
|
|
@ -6981,6 +6984,7 @@ else $as_nop
|
|||
ac_cv_c_nonstring_attribute="no"
|
||||
fi
|
||||
rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
|
||||
CFLAGS="$BAKCFLAGS"
|
||||
|
||||
fi
|
||||
|
||||
|
|
@ -7059,7 +7063,14 @@ else $as_nop
|
|||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||
/* end confdefs.h. */
|
||||
#include <stdio.h>
|
||||
__attribute__((noreturn)) void f(int x) { printf("%d", x); }
|
||||
#ifdef STDC_HEADERS
|
||||
# include <stdlib.h>
|
||||
#else
|
||||
# ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
# endif
|
||||
#endif
|
||||
__attribute__((noreturn)) void f(int x) { printf("%d", x); exit(1); }
|
||||
|
||||
int
|
||||
main (void)
|
||||
|
|
|
|||
|
|
@ -2,6 +2,9 @@
|
|||
- Fix add comment to worker_handle_request function that explain it.
|
||||
- Fix configure test for noreturn attribute so it compiles without
|
||||
warning.
|
||||
- Fix configure test for nonstring attribute so that it does not
|
||||
accept when the compiler prints a warning about an unknown
|
||||
attribute.
|
||||
|
||||
4 November 2025: Wouter
|
||||
- Fix dns64 log output to log the default instead of a null string.
|
||||
|
|
|
|||
Loading…
Reference in a new issue