diff options
author | Lorenz <12514511+RincewindsHat@users.noreply.github.com> | 2023-02-10 10:43:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 10:43:20 (GMT) |
commit | c07206f2ccc2356aa74bc6813a94c2190017d44e (patch) | |
tree | 1677e5fdca5c3ce544e92c5484e16a0b68df1cc9 /gl/m4/inet_ntop.m4 | |
parent | e92046f810658016b7c373677efefda3b21400e4 (diff) | |
parent | d2fcf49ad4afc15f37d082d7bc96a808369ec2d4 (diff) | |
download | monitoring-plugins-c07206f2ccc2356aa74bc6813a94c2190017d44e.tar.gz |
Merge pull request #1832 from RincewindsHat/gnulib_update_2023
Gnulib update 2023 and attendant fixes
Diffstat (limited to 'gl/m4/inet_ntop.m4')
-rw-r--r-- | gl/m4/inet_ntop.m4 | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4 index 476f063..48822d6 100644 --- a/gl/m4/inet_ntop.m4 +++ b/gl/m4/inet_ntop.m4 | |||
@@ -1,5 +1,5 @@ | |||
1 | # inet_ntop.m4 serial 19 | 1 | # inet_ntop.m4 serial 21 |
2 | dnl Copyright (C) 2005-2006, 2008-2013 Free Software Foundation, Inc. | 2 | dnl Copyright (C) 2005-2006, 2008-2023 Free Software Foundation, Inc. |
3 | dnl This file is free software; the Free Software Foundation | 3 | dnl This file is free software; the Free Software Foundation |
4 | dnl gives unlimited permission to copy and/or distribute it, | 4 | dnl gives unlimited permission to copy and/or distribute it, |
5 | dnl with or without modifications, as long as this notice is preserved. | 5 | dnl with or without modifications, as long as this notice is preserved. |
@@ -16,6 +16,7 @@ AC_DEFUN([gl_FUNC_INET_NTOP], | |||
16 | dnl Most platforms that provide inet_ntop define it in libc. | 16 | dnl Most platforms that provide inet_ntop define it in libc. |
17 | dnl Solaris 8..10 provide inet_ntop in libnsl instead. | 17 | dnl Solaris 8..10 provide inet_ntop in libnsl instead. |
18 | dnl Solaris 2.6..7 provide inet_ntop in libresolv instead. | 18 | dnl Solaris 2.6..7 provide inet_ntop in libresolv instead. |
19 | dnl Haiku provides it in -lnetwork. | ||
19 | dnl Native Windows provides it in -lws2_32 instead, with a declaration in | 20 | dnl Native Windows provides it in -lws2_32 instead, with a declaration in |
20 | dnl <ws2tcpip.h>, and it uses stdcall calling convention, not cdecl | 21 | dnl <ws2tcpip.h>, and it uses stdcall calling convention, not cdecl |
21 | dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it). | 22 | dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it). |
@@ -23,19 +24,20 @@ AC_DEFUN([gl_FUNC_INET_NTOP], | |||
23 | INET_NTOP_LIB= | 24 | INET_NTOP_LIB= |
24 | gl_PREREQ_SYS_H_WINSOCK2 | 25 | gl_PREREQ_SYS_H_WINSOCK2 |
25 | if test $HAVE_WINSOCK2_H = 1; then | 26 | if test $HAVE_WINSOCK2_H = 1; then |
27 | dnl It needs to be overridden, because the stdcall calling convention | ||
28 | dnl is not compliant with POSIX. Set REPLACE_INET_NTOP in order to avoid | ||
29 | dnl a name conflict at the linker level, even though the header file | ||
30 | dnl <ws2tcpip.h> declares inet_ntop only if _WIN32_WINNT >= 0x0600. | ||
31 | REPLACE_INET_NTOP=1 | ||
26 | AC_CHECK_DECLS([inet_ntop],,, [[#include <ws2tcpip.h>]]) | 32 | AC_CHECK_DECLS([inet_ntop],,, [[#include <ws2tcpip.h>]]) |
27 | if test $ac_cv_have_decl_inet_ntop = yes; then | 33 | if test $ac_cv_have_decl_inet_ntop = yes; then |
28 | dnl It needs to be overridden, because the stdcall calling convention | ||
29 | dnl is not compliant with POSIX. | ||
30 | REPLACE_INET_NTOP=1 | ||
31 | INET_NTOP_LIB="-lws2_32" | 34 | INET_NTOP_LIB="-lws2_32" |
32 | else | 35 | else |
33 | HAVE_DECL_INET_NTOP=0 | 36 | HAVE_DECL_INET_NTOP=0 |
34 | HAVE_INET_NTOP=0 | ||
35 | fi | 37 | fi |
36 | else | 38 | else |
37 | gl_save_LIBS=$LIBS | 39 | gl_save_LIBS=$LIBS |
38 | AC_SEARCH_LIBS([inet_ntop], [nsl resolv], [], | 40 | AC_SEARCH_LIBS([inet_ntop], [nsl resolv network], [], |
39 | [AC_CHECK_FUNCS([inet_ntop]) | 41 | [AC_CHECK_FUNCS([inet_ntop]) |
40 | if test $ac_cv_func_inet_ntop = no; then | 42 | if test $ac_cv_func_inet_ntop = no; then |
41 | HAVE_INET_NTOP=0 | 43 | HAVE_INET_NTOP=0 |