summaryrefslogtreecommitdiffstats
path: root/gl/m4/inet_ntop.m4
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-08-23 19:42:51 +0200
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-09-14 11:08:55 +0200
commit868beb15ae02c352005a2df8857f4ebb9bd758fd (patch)
tree0dc6e6a91c4ef0f131ca82a777e6ac2ad193c399 /gl/m4/inet_ntop.m4
parentb89aee56964f7d933f2da5f371e32b4d7db9410b (diff)
downloadmonitoring-plugins-868beb15ae02c352005a2df8857f4ebb9bd758fd.tar.gz
Sync with the latest Gnulib code (d27c820595)
Diffstat (limited to 'gl/m4/inet_ntop.m4')
-rw-r--r--gl/m4/inet_ntop.m416
1 files changed, 9 insertions, 7 deletions
diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4
index 476f063f..c335cae7 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
2dnl Copyright (C) 2005-2006, 2008-2013 Free Software Foundation, Inc. 2dnl Copyright (C) 2005-2006, 2008-2022 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 3dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 4dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 5dnl 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