]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Update gnulib files.
authorSimon Josefsson <simon@josefsson.org>
Wed, 30 Apr 2008 08:01:36 +0000 (10:01 +0200)
committerSimon Josefsson <simon@josefsson.org>
Wed, 30 Apr 2008 08:01:36 +0000 (10:01 +0200)
gl/arpa_inet.in.h
gl/getaddrinfo.c
gl/gnulib.mk
gl/m4/arpa_inet_h.m4
gl/m4/inet_ntop.m4
gl/m4/inet_pton.m4

index 89af96e50f6ca7b70fa1dd5344167c2f8ae134c1..81650dacfa923286bc19864575c83faf68485638 100644 (file)
@@ -1,5 +1,6 @@
-/* Provide a arpa/inet header file for systems lacking it (read: MinGW)
-   Copyright (C) 2008 Free Software Foundation, Inc.
+/* A GNU-like <arpa/inet.h>.
+
+   Copyright (C) 2005-2006, 2008 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 #ifndef _GL_ARPA_INET_H
-#define _GL_ARPA_INET_H
 
 /* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
    under MinGW. */
 #include <sys/socket.h>
 
+#if @HAVE_ARPA_INET_H@
+
+/* The include_next requires a split double-inclusion guard.  */
+# @INCLUDE_NEXT@ @NEXT_ARPA_INET_H@
+
+#endif
+
+#ifndef _GL_ARPA_INET_H
+#define _GL_ARPA_INET_H
+
 #if @GNULIB_INET_NTOP@
 # if !@HAVE_DECL_INET_NTOP@
 /* Converts an internet address from internal format to a printable,
@@ -44,8 +54,8 @@ extern const char *inet_ntop (int af, const void *restrict src,
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef inet_ntop
-# define inet_ntop(af,src,dst,cnt)                                     \
-    (GL_LINK_WARNING ("inet_ntop doesn't exist on mingw - " \
+# define inet_ntop(af,src,dst,cnt) \
+    (GL_LINK_WARNING ("inet_ntop is unportable - " \
                       "use gnulib module inet_ntop for portability"), \
      inet_ntop (af, src, dst, cnt))
 #endif
@@ -56,10 +66,11 @@ extern int inet_pton (int af, const char *restrict src, void *restrict dst);
 # endif
 #elif defined GNULIB_POSIXCHECK
 # undef inet_pton
-# define inet_pton(af,src,dst)                     \
-  (GL_LINK_WARNING ("inet_pton doesn't exist on mingw - "        \
-                   "use gnulib module inet_pton for portability"),       \
+# define inet_pton(af,src,dst) \
+  (GL_LINK_WARNING ("inet_pton is unportable - " \
+                   "use gnulib module inet_pton for portability"), \
    inet_pton (af, src, dst))
 #endif
 
 #endif /* _GL_ARPA_INET_H */
+#endif /* _GL_ARPA_INET_H */
index 41ca18580021178a9e6be55a826e5f34b10e93a8..8c6a9d1026b52c9bae3c294eab0e92bdbe492e95 100644 (file)
@@ -1,5 +1,5 @@
 /* Get address information (partial implementation).
-   Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2007 Free Software
+   Copyright (C) 1997, 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software
    Foundation, Inc.
    Contributed by Simon Josefsson <simon@josefsson.org>.
 
@@ -25,6 +25,9 @@
 # include <netinet/in.h>
 #endif
 
+/* Get inet_ntop.  */
+#include <arpa/inet.h>
+
 /* Get calloc. */
 #include <stdlib.h>
 
@@ -40,8 +43,6 @@
 #define _(String) gettext (String)
 #define N_(String) String
 
-#include "inet_ntop.h"
-
 /* BeOS has AF_INET, but not PF_INET.  */
 #ifndef PF_INET
 # define PF_INET AF_INET
index 2533fbe417e7600e8f2d1b1a7629dc8bb848b0dc..7d159d9029070af82b616d5ebecbd3a44eb6c64a 100644 (file)
@@ -32,7 +32,9 @@ arpa/inet.h:
        @MKDIR_P@ arpa
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         sed \
+         sed -e 's/@''INCLUDE_NEXT''@/$(INCLUDE_NEXT)/g' \
+             -e 's|@''NEXT_ARPA_INET_H''@|$(NEXT_ARPA_INET_H)|g' \
+             -e 's|@''HAVE_ARPA_INET_H''@|$(HAVE_ARPA_INET_H)|g' \
              -e 's|@''GNULIB_INET_NTOP''@|$(GNULIB_INET_NTOP)|g' \
              -e 's|@''GNULIB_INET_PTON''@|$(GNULIB_INET_PTON)|g' \
              -e 's|@''HAVE_DECL_INET_NTOP''@|$(HAVE_DECL_INET_NTOP)|g' \
index baddf0da7208b847e082d17ae3435073ca3b1a8a..20bd3bc6f5b81287f9d6e539c623158be0f5ee12 100644 (file)
@@ -1,10 +1,10 @@
-# arpa_inet_h.m4 serial 2
+# arpa_inet_h.m4 serial 4
 dnl Copyright (C) 2006, 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,
 dnl with or without modifications, as long as this notice is preserved.
 
-dnl Written by Simon Josefsson
+dnl Written by Simon Josefsson and Bruno Haible
 
 AC_DEFUN([gl_HEADER_ARPA_INET],
 [
@@ -14,11 +14,15 @@ AC_DEFUN([gl_HEADER_ARPA_INET],
 
   AC_CHECK_HEADERS_ONCE([arpa/inet.h])
   if test $ac_cv_header_arpa_inet_h = yes; then
-    ARPA_INET_H=''
+    HAVE_ARPA_INET_H=1
   else
     ARPA_INET_H='arpa/inet.h'
+    HAVE_ARPA_INET_H=0
   fi
-  AC_SUBST(ARPA_INET_H)
+  AC_SUBST([HAVE_ARPA_INET_H])
+  dnl Execute this unconditionally, because ARPA_INET_H may be set by other
+  dnl modules, after this code is executed.
+  gl_CHECK_NEXT_HEADERS([arpa/inet.h])
 ])
 
 AC_DEFUN([gl_ARPA_INET_MODULE_INDICATOR],
@@ -35,4 +39,5 @@ AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
   dnl Assume proper GNU behavior unless another module says otherwise.
   HAVE_DECL_INET_NTOP=1;  AC_SUBST([HAVE_DECL_INET_NTOP])
   HAVE_DECL_INET_PTON=1;  AC_SUBST([HAVE_DECL_INET_PTON])
+  ARPA_INET_H='';         AC_SUBST([ARPA_INET_H])
 ])
index 0848c07759faf944c9e99a8490d5d075c430facd..342cd28a471441185529981b723dd06b5162fc4c 100644 (file)
@@ -1,4 +1,4 @@
-# inet_ntop.m4 serial 4
+# inet_ntop.m4 serial 5
 dnl Copyright (C) 2005, 2006, 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,
@@ -6,6 +6,12 @@ dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_INET_NTOP],
 [
+  dnl Persuade Solaris <arpa/inet.h> to declare inet_ntop.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
+  ARPA_INET_H='arpa/inet.h'
+
   AC_REPLACE_FUNCS(inet_ntop)
   gl_PREREQ_INET_NTOP
 ])
index 58f2c31866681c41b87fdf330ff5ec68b0689d4b..7d7f993a008f42f5ddb19efa842fb5f56b4c9b08 100644 (file)
@@ -1,4 +1,4 @@
-# inet_pton.m4 serial 3
+# inet_pton.m4 serial 4
 dnl Copyright (C) 2006, 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,
@@ -6,6 +6,12 @@ dnl with or without modifications, as long as this notice is preserved.
 
 AC_DEFUN([gl_INET_PTON],
 [
+  dnl Persuade Solaris <arpa/inet.h> to declare inet_ntop.
+  AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+  AC_REQUIRE([gl_ARPA_INET_H_DEFAULTS])
+  ARPA_INET_H='arpa/inet.h'
+
   AC_REPLACE_FUNCS(inet_pton)
   gl_PREREQ_INET_PTON
 ])