]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Update gnulib files.
authorSimon Josefsson <simon@josefsson.org>
Mon, 17 Nov 2008 11:20:11 +0000 (12:20 +0100)
committerSimon Josefsson <simon@josefsson.org>
Mon, 17 Nov 2008 11:20:11 +0000 (12:20 +0100)
gl/m4/getaddrinfo.m4
gl/m4/gnulib-comp.m4
gl/m4/sockets.m4
gl/tests/test-select-out.sh
lib/gl/m4/sockets.m4

index 1c7b5c33bcfe2f2042608f74197390dd42f86282..f1cc01da1238439cdf6864dd36969a44635be12d 100644 (file)
@@ -1,4 +1,4 @@
-# getaddrinfo.m4 serial 17
+# getaddrinfo.m4 serial 18
 dnl Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -76,25 +76,9 @@ AC_DEFUN([gl_GETADDRINFO],
 AC_DEFUN([gl_PREREQ_GETADDRINFO], [
   AC_REQUIRE([gl_NETDB_H_DEFAULTS])
   AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
-  AC_SEARCH_LIBS(gethostbyname, [inet nsl])
-  AC_SEARCH_LIBS(getservbyname, [inet nsl socket xnet])
-  AC_CHECK_FUNCS(gethostbyname,, [
-    AC_CACHE_CHECK(for gethostbyname in winsock2.h and -lws2_32,
-                  gl_cv_w32_gethostbyname, [
-      gl_cv_w32_gethostbyname=no
-      am_save_LIBS="$LIBS"
-      LIBS="$LIBS -lws2_32"
-      AC_TRY_LINK([
-#ifdef HAVE_WINSOCK2_H
-#include <winsock2.h>
-#endif
-#include <stddef.h>
-], [gethostbyname(NULL);], gl_cv_w32_gethostbyname=yes)
-    LIBS="$am_save_LIBS"])
-    if test "$gl_cv_w32_gethostbyname" = "yes"; then
-      LIBS="$LIBS -lws2_32"
-    fi
-    ])
+  AC_REQUIRE([gl_HOSTENT]) dnl for HOSTENT_LIB
+  AC_REQUIRE([gl_SERVENT]) dnl for SERVENT_LIB
+  LIBS="$LIBS $HOSTENT_LIB $SERVENT_LIB"
   AC_REQUIRE([AC_C_RESTRICT])
   AC_REQUIRE([gl_SOCKET_FAMILIES])
   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
index 4dc6125c1451e644ef312726b19cae25f25edf4b..12870c683bdebdd966a2e472d857db6220063cac 100644 (file)
@@ -102,6 +102,7 @@ AC_SUBST([LTALLOCA])
        m4_defn([m4_PACKAGE_VERSION])), [1], [],
         [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
        [GNUmakefile=$GNUmakefile])])
+  gl_HOSTENT
   gl_INET_NTOP
   gl_ARPA_INET_MODULE_INDICATOR([inet_ntop])
   gl_INET_PTON
@@ -139,6 +140,7 @@ AC_SUBST([LTALLOCA])
     AC_LIBOBJ([send])
   fi
   gl_SYS_SOCKET_MODULE_INDICATOR([send])
+  gl_SERVENT
   AC_REQUIRE([gl_HEADER_SYS_SOCKET])
   if test "$ac_cv_header_winsock2_h" = yes; then
     AC_LIBOBJ([setsockopt])
@@ -425,6 +427,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/getpass.m4
   m4/gettimeofday.m4
   m4/gnulib-common.m4
+  m4/hostent.m4
   m4/include_next.m4
   m4/inet_ntop.m4
   m4/inet_pton.m4
@@ -445,6 +448,7 @@ AC_DEFUN([gl_FILE_LIST], [
   m4/read-file.m4
   m4/readline.m4
   m4/realloc.m4
+  m4/servent.m4
   m4/size_max.m4
   m4/snprintf.m4
   m4/sockets.m4
index c7bd6646a6ea4a7059ced424215b5fd6be0d3075..124e777a5e0f5c4fb0a5a53e1c7e3fcdc8f8fad2 100644 (file)
@@ -1,4 +1,4 @@
-# sockets.m4 serial 2
+# sockets.m4 serial 3
 dnl Copyright (C) 2008 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -32,8 +32,10 @@ AC_DEFUN([gl_SOCKETS],
   else
     dnl Unix API.
     dnl Solaris has most socket functions in libsocket.
-    AC_CACHE_CHECK([whether setsockopt requires -lsocket], [gl_cv_lib_socket], [
-      gl_cv_lib_socket=no
+    dnl Haiku has most socket functions in libnetwork.
+    dnl BeOS has most socket functions in libnet.
+    AC_CACHE_CHECK([for library containing setsockopt], [gl_cv_lib_socket], [
+      gl_cv_lib_socket=
       AC_TRY_LINK([extern
 #ifdef __cplusplus
 "C"
@@ -41,18 +43,39 @@ AC_DEFUN([gl_SOCKETS],
 char setsockopt();], [setsockopt();],
         [],
         [gl_save_LIBS="$LIBS"
-         LIBS="$LIBS -lsocket"
+         LIBS="$gl_save_LIBS -lsocket"
          AC_TRY_LINK([extern
 #ifdef __cplusplus
 "C"
 #endif
 char setsockopt();], [setsockopt();],
-           [gl_cv_lib_socket=yes])
+           [gl_cv_lib_socket="-lsocket"])
+         if test -z "$gl_cv_lib_socket"; then
+           LIBS="$gl_save_LIBS -lnetwork"
+           AC_TRY_LINK([extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();], [setsockopt();],
+             [gl_cv_lib_socket="-lnetwork"])
+           if test -z "$gl_cv_lib_socket"; then
+             LIBS="$gl_save_LIBS -lnet"
+             AC_TRY_LINK([extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();], [setsockopt();],
+               [gl_cv_lib_socket="-lnet"])
+           fi
+         fi
          LIBS="$gl_save_LIBS"
         ])
+      if test -z "$gl_cv_lib_socket"; then
+        gl_cv_lib_socket="none needed"
+      fi
     ])
-    if test $gl_cv_lib_socket = yes; then
-      LIBSOCKET='-lsocket'
+    if test "$gl_cv_lib_socket" != "none needed"; then
+      LIBSOCKET="$gl_cv_lib_socket"
     fi
   fi
   AC_SUBST([LIBSOCKET])
index 488dccd0c8e0059a944aca5765b391a6d345f500..556aae7b45f65cb786e19f87d39701f81981de5a 100755 (executable)
@@ -14,9 +14,9 @@ test `cat t-select-out.tmp` = "1" || exit 1
 
 # Pipes.
 
-#rm -f t-select-out.tmp
-#( { echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | { sleep 1; cat; } ) > /dev/null
-#test `cat t-select-out.tmp` = "0" || exit 1
+rm -f t-select-out.tmp
+( { echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | { sleep 1; cat; } ) > /dev/null
+test `cat t-select-out.tmp` = "0" || exit 1
 
 rm -f t-select-out.tmp
 ( { sleep 1; echo abc; ./test-select-fd${EXEEXT} w 1 t-select-out.tmp; } | cat) > /dev/null
index c7bd6646a6ea4a7059ced424215b5fd6be0d3075..124e777a5e0f5c4fb0a5a53e1c7e3fcdc8f8fad2 100644 (file)
@@ -1,4 +1,4 @@
-# sockets.m4 serial 2
+# sockets.m4 serial 3
 dnl Copyright (C) 2008 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -32,8 +32,10 @@ AC_DEFUN([gl_SOCKETS],
   else
     dnl Unix API.
     dnl Solaris has most socket functions in libsocket.
-    AC_CACHE_CHECK([whether setsockopt requires -lsocket], [gl_cv_lib_socket], [
-      gl_cv_lib_socket=no
+    dnl Haiku has most socket functions in libnetwork.
+    dnl BeOS has most socket functions in libnet.
+    AC_CACHE_CHECK([for library containing setsockopt], [gl_cv_lib_socket], [
+      gl_cv_lib_socket=
       AC_TRY_LINK([extern
 #ifdef __cplusplus
 "C"
@@ -41,18 +43,39 @@ AC_DEFUN([gl_SOCKETS],
 char setsockopt();], [setsockopt();],
         [],
         [gl_save_LIBS="$LIBS"
-         LIBS="$LIBS -lsocket"
+         LIBS="$gl_save_LIBS -lsocket"
          AC_TRY_LINK([extern
 #ifdef __cplusplus
 "C"
 #endif
 char setsockopt();], [setsockopt();],
-           [gl_cv_lib_socket=yes])
+           [gl_cv_lib_socket="-lsocket"])
+         if test -z "$gl_cv_lib_socket"; then
+           LIBS="$gl_save_LIBS -lnetwork"
+           AC_TRY_LINK([extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();], [setsockopt();],
+             [gl_cv_lib_socket="-lnetwork"])
+           if test -z "$gl_cv_lib_socket"; then
+             LIBS="$gl_save_LIBS -lnet"
+             AC_TRY_LINK([extern
+#ifdef __cplusplus
+"C"
+#endif
+char setsockopt();], [setsockopt();],
+               [gl_cv_lib_socket="-lnet"])
+           fi
+         fi
          LIBS="$gl_save_LIBS"
         ])
+      if test -z "$gl_cv_lib_socket"; then
+        gl_cv_lib_socket="none needed"
+      fi
     ])
-    if test $gl_cv_lib_socket = yes; then
-      LIBSOCKET='-lsocket'
+    if test "$gl_cv_lib_socket" != "none needed"; then
+      LIBSOCKET="$gl_cv_lib_socket"
     fi
   fi
   AC_SUBST([LIBSOCKET])