From: W.C.A. Wijngaards Date: Fri, 17 Apr 2026 15:00:09 +0000 (+0200) Subject: - Update generated configure, with autoconf. X-Git-Tag: release-1.25.0rc1~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=82359c8fb16a4edbe885e22478a8edc26ad4a345;p=thirdparty%2Funbound.git - Update generated configure, with autoconf. --- diff --git a/config.h.in b/config.h.in index d14257fda..735485991 100644 --- a/config.h.in +++ b/config.h.in @@ -564,12 +564,27 @@ /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD +/* Define to 1 if you have the header file. */ +#undef HAVE_PTHREAD_NP_H + /* Have PTHREAD_PRIO_INHERIT. */ #undef HAVE_PTHREAD_PRIO_INHERIT /* Define to 1 if the system has the type `pthread_rwlock_t'. */ #undef HAVE_PTHREAD_RWLOCK_T +/* Define if pthread_setname_np has the common 2 arguments. */ +#undef HAVE_PTHREAD_SETNAME_NP + +/* Define if pthread_setname_np has only 1 argument. */ +#undef HAVE_PTHREAD_SETNAME_NP1 + +/* Define if pthread_setname_np has 3 arguments. */ +#undef HAVE_PTHREAD_SETNAME_NP3 + +/* Define if pthread_setname_np exists as pthread_set_name_np instead. */ +#undef HAVE_PTHREAD_SET_NAME_NP + /* Define to 1 if the system has the type `pthread_spinlock_t'. */ #undef HAVE_PTHREAD_SPINLOCK_T diff --git a/configure b/configure index de41ecd14..c7fc98c4e 100755 --- a/configure +++ b/configure @@ -19080,6 +19080,168 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi +if test x_$ub_have_pthreads != x_no; then + # Long checks to support pthread_setname_np(). + # Some OSes have the extra non-portable functions in a specific + # header file. + ac_fn_c_check_header_compile "$LINENO" "pthread_np.h" "ac_cv_header_pthread_np_h" "$ac_includes_default +" +if test "x$ac_cv_header_pthread_np_h" = xyes +then : + printf "%s\n" "#define HAVE_PTHREAD_NP_H 1" >>confdefs.h + +fi + + # MacOS only has 1 argument, the name. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_setname_np has only 1 argument" >&5 +printf %s "checking whether pthread_setname_np has only 1 argument... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#include +#ifdef HAVE_PTHREAD_NP_H +#include +#endif + +int +main (void) +{ + + (void)pthread_setname_np(""); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_PTHREAD_SETNAME_NP1 1" >>confdefs.h + + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + # NetBSD has 3 arguments to allow for formatting of the name. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_setname_np has 3 arguments" >&5 +printf %s "checking whether pthread_setname_np has 3 arguments... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#include +#ifdef HAVE_PTHREAD_NP_H +#include +#endif + +int +main (void) +{ + + (void)pthread_setname_np(0, "", NULL); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_PTHREAD_SETNAME_NP3 1" >>confdefs.h + + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + # Most OSes have the common 2 arguments, thread and name. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_setname_np has the common 2 arguments" >&5 +printf %s "checking whether pthread_setname_np has the common 2 arguments... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#include +#ifdef HAVE_PTHREAD_NP_H +#include +#endif + +int +main (void) +{ + + (void)pthread_setname_np(0, ""); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_PTHREAD_SETNAME_NP 1" >>confdefs.h + + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + # FreeBSD/OpenBSD use a slightly different function name. + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_setname_np exists as pthread_set_name_np instead" >&5 +printf %s "checking whether pthread_setname_np exists as pthread_set_name_np instead... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$ac_includes_default +#include +#ifdef HAVE_PTHREAD_NP_H +#include +#endif + +int +main (void) +{ + + (void)pthread_set_name_np(0, ""); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } + +printf "%s\n" "#define HAVE_PTHREAD_SET_NAME_NP 1" >>confdefs.h + + +else $as_nop + + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } + +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + # check solaris thread library # Check whether --with-solaris-threads was given. diff --git a/doc/Changelog b/doc/Changelog index 53595e53c..b1c4e4f54 100644 --- a/doc/Changelog +++ b/doc/Changelog @@ -16,6 +16,7 @@ - Fix ttl comparisons in rdata_copy for 32bit signed or unsigned. - Fix subnet store of servfail to not leak memory. - Update generated man pages. + - Update generated configure, with autoconf. 17 April 2026: Yorgos - Merge #1400: Support pthread_setname_np. Adds support for