diff options
| author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2026-03-26 12:53:53 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-03-26 12:53:53 +0100 |
| commit | 13e14a6bfd9f29cbfeab0c5161d2a994f97532e7 (patch) | |
| tree | 3aa7186fe092e42783dc7e981dc39a74ea61c466 /gl/m4/getaddrinfo.m4 | |
| parent | 9d8503f90ef25b2cecd324dc118e441f40233ea8 (diff) | |
| download | monitoring-plugins-13e14a6bfd9f29cbfeab0c5161d2a994f97532e7.tar.gz | |
* Sync with the 202601-stable Gnulib code (4a3650d887)
* Ignore more deps stuff in gnulib
* Remove autogenerated gnulib files
* Ignore more gnulib generated headers
Diffstat (limited to 'gl/m4/getaddrinfo.m4')
| -rw-r--r-- | gl/m4/getaddrinfo.m4 | 28 |
1 files changed, 21 insertions, 7 deletions
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 @@ | |||
| 1 | # getaddrinfo.m4 | 1 | # getaddrinfo.m4 |
| 2 | # serial 38 | 2 | # serial 39 |
| 3 | dnl Copyright (C) 2004-2025 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2004-2026 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | 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 | |||
| 90 | fi | 90 | fi |
| 91 | fi | 91 | fi |
| 92 | if test $HAVE_GETADDRINFO != 0; then | 92 | if test $HAVE_GETADDRINFO != 0; then |
| 93 | AC_CACHE_CHECK([whether getaddrinfo supports AI_NUMERICSERV], | 93 | AC_CACHE_CHECK([whether getaddrinfo supports AI_NUMERICHOST and AI_NUMERICSERV], |
| 94 | [gl_cv_func_getaddrinfo_works], | 94 | [gl_cv_func_getaddrinfo_works], |
| 95 | [AC_RUN_IFELSE( | 95 | [AC_RUN_IFELSE( |
| 96 | [AC_LANG_PROGRAM([[ | 96 | [AC_LANG_PROGRAM([[ |
| @@ -107,16 +107,30 @@ int getaddrinfo (const char *, const char *, const struct addrinfo *, struct add | |||
| 107 | #include <stddef.h> | 107 | #include <stddef.h> |
| 108 | #include <string.h> | 108 | #include <string.h> |
| 109 | ]], [[ | 109 | ]], [[ |
| 110 | struct addrinfo hints; | 110 | int result = 0; |
| 111 | struct addrinfo *ai; | 111 | struct addrinfo *ai; |
| 112 | memset (&hints, 0, sizeof (hints)); | 112 | { |
| 113 | hints.ai_flags = AI_NUMERICSERV; | 113 | struct addrinfo hints; |
| 114 | return getaddrinfo ("www.gnu.org", "http", &hints, &ai) != EAI_NONAME; | 114 | memset (&hints, 0, sizeof (hints)); |
| 115 | hints.ai_flags = AI_NUMERICHOST; | ||
| 116 | if (getaddrinfo ("www.gnu.org", "http", &hints, &ai) != EAI_NONAME) | ||
| 117 | result |= 1; | ||
| 118 | } | ||
| 119 | { | ||
| 120 | struct addrinfo hints; | ||
| 121 | memset (&hints, 0, sizeof (hints)); | ||
| 122 | hints.ai_flags = AI_NUMERICSERV; | ||
| 123 | if (getaddrinfo ("www.gnu.org", "http", &hints, &ai) != EAI_NONAME) | ||
| 124 | result |= 2; | ||
| 125 | } | ||
| 126 | return result; | ||
| 115 | ]]) | 127 | ]]) |
| 116 | ], | 128 | ], |
| 117 | [gl_cv_func_getaddrinfo_works=yes], | 129 | [gl_cv_func_getaddrinfo_works=yes], |
| 118 | [gl_cv_func_getaddrinfo_works=no], | 130 | [gl_cv_func_getaddrinfo_works=no], |
| 119 | [case "$host_os" in | 131 | [case "$host_os" in |
| 132 | # Guess no on Solaris. | ||
| 133 | solaris*) gl_cv_func_getaddrinfo_works="guessing no" ;; | ||
| 120 | # Guess no on native Windows. | 134 | # Guess no on native Windows. |
| 121 | mingw* | windows*) gl_cv_func_getaddrinfo_works="guessing no" ;; | 135 | mingw* | windows*) gl_cv_func_getaddrinfo_works="guessing no" ;; |
| 122 | # Guess yes otherwise. | 136 | # Guess yes otherwise. |
