X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=m4%2Fsockpfaf.m4;h=25d9755c5ea7b9a1f939fbfb22e5220fce6f24ed;hb=d390fdd374ff2bd0918dcf486a4dfe20f1c1cdb3;hp=9e396ebaf9e4ab284d5bd1d2dff908c2949b4411;hpb=c90d9d892409c285cc426fc42ad5ad4faeba0efb;p=gnulib.git diff --git a/m4/sockpfaf.m4 b/m4/sockpfaf.m4 index 9e396ebaf..25d9755c5 100644 --- a/m4/sockpfaf.m4 +++ b/m4/sockpfaf.m4 @@ -1,4 +1,4 @@ -# sockpfaf.m4 serial 3 +# sockpfaf.m4 serial 5 dnl Copyright (C) 2004, 2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -13,7 +13,8 @@ dnl From Bruno Haible. AC_DEFUN([gl_SOCKET_FAMILIES], [ - AC_CHECK_HEADERS_ONCE(sys/socket.h netinet/in.h winsock2.h) + AC_REQUIRE([gl_HEADER_SYS_SOCKET]) + AC_CHECK_HEADERS_ONCE([netinet/in.h]) AC_MSG_CHECKING(for IPv4 sockets) AC_CACHE_VAL(gl_cv_socket_ipv4, @@ -27,7 +28,8 @@ AC_DEFUN([gl_SOCKET_FAMILIES], #ifdef HAVE_WINSOCK2_H #include #endif], -[int x = AF_INET; struct in_addr y; struct sockaddr_in z;], +[int x = AF_INET; struct in_addr y; struct sockaddr_in z; + if (&x && &y && &z) return 0;], gl_cv_socket_ipv4=yes, gl_cv_socket_ipv4=no)]) AC_MSG_RESULT($gl_cv_socket_ipv4) if test $gl_cv_socket_ipv4 = yes; then @@ -46,7 +48,8 @@ AC_DEFUN([gl_SOCKET_FAMILIES], #ifdef HAVE_WINSOCK2_H #include #endif], -[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;], +[int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; + if (&x && &y && &z) return 0;], gl_cv_socket_ipv6=yes, gl_cv_socket_ipv6=no)]) AC_MSG_RESULT($gl_cv_socket_ipv6) if test $gl_cv_socket_ipv6 = yes; then