From 13e14a6bfd9f29cbfeab0c5161d2a994f97532e7 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 26 Mar 2026 12:53:53 +0100 Subject: Update/gnulib 2026 03 (#2247) * Sync with the 202601-stable Gnulib code (4a3650d887) * Ignore more deps stuff in gnulib * Remove autogenerated gnulib files * Ignore more gnulib generated headers --- gl/m4/getaddrinfo.m4 | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'gl/m4/getaddrinfo.m4') diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4 index 2931d526..8a63600b 100644 --- a/gl/m4/getaddrinfo.m4 +++ b/gl/m4/getaddrinfo.m4 @@ -1,6 +1,6 @@ # getaddrinfo.m4 -# serial 38 -dnl Copyright (C) 2004-2025 Free Software Foundation, Inc. +# serial 39 +dnl Copyright (C) 2004-2026 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -90,7 +90,7 @@ int getaddrinfo (const char *, const char *, const struct addrinfo *, struct add fi fi if test $HAVE_GETADDRINFO != 0; then - AC_CACHE_CHECK([whether getaddrinfo supports AI_NUMERICSERV], + AC_CACHE_CHECK([whether getaddrinfo supports AI_NUMERICHOST and AI_NUMERICSERV], [gl_cv_func_getaddrinfo_works], [AC_RUN_IFELSE( [AC_LANG_PROGRAM([[ @@ -107,16 +107,30 @@ int getaddrinfo (const char *, const char *, const struct addrinfo *, struct add #include #include ]], [[ - struct addrinfo hints; + int result = 0; struct addrinfo *ai; - memset (&hints, 0, sizeof (hints)); - hints.ai_flags = AI_NUMERICSERV; - return getaddrinfo ("www.gnu.org", "http", &hints, &ai) != EAI_NONAME; + { + struct addrinfo hints; + memset (&hints, 0, sizeof (hints)); + hints.ai_flags = AI_NUMERICHOST; + if (getaddrinfo ("www.gnu.org", "http", &hints, &ai) != EAI_NONAME) + result |= 1; + } + { + struct addrinfo hints; + memset (&hints, 0, sizeof (hints)); + hints.ai_flags = AI_NUMERICSERV; + if (getaddrinfo ("www.gnu.org", "http", &hints, &ai) != EAI_NONAME) + result |= 2; + } + return result; ]]) ], [gl_cv_func_getaddrinfo_works=yes], [gl_cv_func_getaddrinfo_works=no], [case "$host_os" in + # Guess no on Solaris. + solaris*) gl_cv_func_getaddrinfo_works="guessing no" ;; # Guess no on native Windows. mingw* | windows*) gl_cv_func_getaddrinfo_works="guessing no" ;; # Guess yes otherwise. -- cgit v1.2.3-74-g34f1