projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test-chown.h: correct a cast
[gnulib.git]
/
m4
/
getaddrinfo.m4
diff --git
a/m4/getaddrinfo.m4
b/m4/getaddrinfo.m4
index
3dfc17d
..
e576236
100644
(file)
--- a/
m4/getaddrinfo.m4
+++ b/
m4/getaddrinfo.m4
@@
-1,5
+1,5
@@
-# getaddrinfo.m4 serial 2
1
-dnl Copyright (C) 2004-20
09
Free Software Foundation, Inc.
+# getaddrinfo.m4 serial 2
4
+dnl Copyright (C) 2004-20
11
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.
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.
@@
-39,7
+39,7
@@
AC_DEFUN([gl_GETADDRINFO],
[gl_cv_func_getaddrinfo=no])])
if test $gl_cv_func_getaddrinfo = no; then
AC_CACHE_CHECK([for getaddrinfo in ws2tcpip.h and -lws2_32],
[gl_cv_func_getaddrinfo=no])])
if test $gl_cv_func_getaddrinfo = no; then
AC_CACHE_CHECK([for getaddrinfo in ws2tcpip.h and -lws2_32],
- gl_cv_w32_getaddrinfo, [
+
gl_cv_w32_getaddrinfo, [
gl_cv_w32_getaddrinfo=no
am_save_LIBS="$LIBS"
LIBS="$LIBS -lws2_32"
gl_cv_w32_getaddrinfo=no
am_save_LIBS="$LIBS"
LIBS="$LIBS -lws2_32"
@@
-96,6
+96,7
@@
AC_DEFUN([gl_PREREQ_GETADDRINFO], [
AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
AC_REQUIRE([gl_HOSTENT]) dnl for HOSTENT_LIB
AC_REQUIRE([gl_SERVENT]) dnl for SERVENT_LIB
AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
AC_REQUIRE([gl_HOSTENT]) dnl for HOSTENT_LIB
AC_REQUIRE([gl_SERVENT]) dnl for SERVENT_LIB
+ AC_REQUIRE([gl_FUNC_INET_NTOP]) dnl for INET_NTOP_LIB
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_SOCKET_FAMILIES])
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
AC_REQUIRE([AC_C_RESTRICT])
AC_REQUIRE([gl_SOCKET_FAMILIES])
AC_REQUIRE([gl_HEADER_SYS_SOCKET])
@@
-104,7
+105,10
@@
AC_DEFUN([gl_PREREQ_GETADDRINFO], [
dnl Including sys/socket.h is wrong for Windows, but Windows does not
dnl have sa_len so the result is correct anyway.
dnl Including sys/socket.h is wrong for Windows, but Windows does not
dnl have sa_len so the result is correct anyway.
- AC_CHECK_MEMBERS([struct sockaddr.sa_len], , , [#include <sys/socket.h>])
+ AC_CHECK_MEMBERS([struct sockaddr.sa_len], , , [
+#include <sys/types.h>
+#include <sys/socket.h>
+])
AC_CHECK_HEADERS_ONCE([netinet/in.h])
AC_CHECK_HEADERS_ONCE([netinet/in.h])
@@
-163,4
+167,10
@@
AC_DEFUN([gl_PREREQ_GETADDRINFO], [
*" $SERVENT_LIB "*) ;;
*) GETADDRINFO_LIB="$GETADDRINFO_LIB $SERVENT_LIB" ;;
esac
*" $SERVENT_LIB "*) ;;
*) GETADDRINFO_LIB="$GETADDRINFO_LIB $SERVENT_LIB" ;;
esac
+
+ dnl Append $INET_NTOP_LIB to GETADDRINFO_LIB, avoiding gratuitous duplicates.
+ case " $GETADDRINFO_LIB " in
+ *" $INET_NTOP_LIB "*) ;;
+ *) GETADDRINFO_LIB="$GETADDRINFO_LIB $INET_NTOP_LIB" ;;
+ esac
])
])