bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getaddrinfo: port to Haiku


From: Bruno Haible
Subject: getaddrinfo: port to Haiku
Date: Sun, 16 Nov 2008 05:12:50 +0100
User-agent: KMail/1.5.4

Hi Simon,

Here comes a patch to change the getaddrinfo module to make use of the new
modules 'servent' and 'hostent'. I have tested this on Linux, Solaris,
mingw, and Haiku.

OK to apply, or objections?


2008-11-15  Bruno Haible  <address@hidden>

        * modules/getaddrinfo (Depends-on): Add servent, hostent.
        * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_SERVENT and
        gl_HOSTENT.

--- m4/getaddrinfo.m4.orig      2008-11-16 05:07:05.000000000 +0100
+++ m4/getaddrinfo.m4   2008-11-16 03:01:34.000000000 +0100
@@ -75,25 +75,9 @@
 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])
--- modules/getaddrinfo.orig    2008-11-16 05:07:05.000000000 +0100
+++ modules/getaddrinfo 2008-11-15 14:59:06.000000000 +0100
@@ -16,6 +16,8 @@
 sys_socket
 netdb
 strdup
+servent
+hostent
 
 configure.ac:
 gl_GETADDRINFO





reply via email to

[Prev in Thread] Current Thread [Next in Thread]