bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] socklen: do not depend on sys_socket


From: Bruno Haible
Subject: Re: [PATCH] socklen: do not depend on sys_socket
Date: Sat, 19 Mar 2011 14:00:21 +0100
User-agent: KMail/1.9.9

Paul Eggert wrote:
> +       * modules/inet_ntop (Depends-on): Remove socklen, since
> +       sys_socket is supposed to provide socklen_t and we already
> +       depend on sys_socket.
> +       * modules/inet_pton, modules/netdb: Likewise.

This part is undoubtedly correct, after we document that 'sys_socket'
provides 'socklen_t', and with comments adjusted. I'm applying these 3 patches,
which include yours:


2011-03-19  Bruno Haible  <address@hidden>

        sys_socket, netdb: Document problem with socklen_t.
        * doc/posix-headers/sys_socket.texi: Mention lack of socklen_t on some
        platforms.
        * doc/posix-headers/netdb.texi: Likewise.

diff --git a/doc/posix-headers/netdb.texi b/doc/posix-headers/netdb.texi
index dd152be..c53dcfb 100644
--- a/doc/posix-headers/netdb.texi
+++ b/doc/posix-headers/netdb.texi
@@ -16,6 +16,10 @@ This header file is incomplete on some platforms:
 Cygwin 1.5.x, Haiku.
 
 @item
+This header file does not define the type @code{socklen_t} on some platforms:
+HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS.
+
address@hidden
 This header file does not define @code{AI_ALL}, @code{AI_V4MAPPED},
 @code{AI_ADDRCONFIG} on some platforms:
 NetBSD 5.0.
diff --git a/doc/posix-headers/sys_socket.texi 
b/doc/posix-headers/sys_socket.texi
index dc975b6..c8e4228 100644
--- a/doc/posix-headers/sys_socket.texi
+++ b/doc/posix-headers/sys_socket.texi
@@ -14,6 +14,9 @@ mingw.
 This header file is not self-contained on some platforms: it requires
 @code{<sys/types.h>} to be included first.
 @item
+This header file does not define the type @code{socklen_t} on some platforms:
+HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS.
address@hidden
 This header file is lacking the @code{SHUT_RD}, @code{SHUT_WR},
 @code{SHUT_RDWR} macros on some platforms, despite having the @code{shutdown}
 functions:


2011-03-19  Paul Eggert  <address@hidden>
            Bruno Haible  <address@hidden>

        netdb: Simplify.
        * modules/netdb (Depends-on): Remove socklen, since sys_socket is
        documented to provide socklen_t and we already depend on sys_socket.
        * lib/netdb.in.h: Adjust comment.

--- lib/netdb.in.h.orig Sat Mar 19 13:53:24 2011
+++ lib/netdb.in.h      Sat Mar 19 13:51:34 2011
@@ -37,7 +37,8 @@
 #ifndef _GL_NETDB_H
 #define _GL_NETDB_H
 
-/* Get netdb.h definitions such as struct hostent for MinGW.  */
+/* Get <netdb.h> definitions such as 'socklen_t' on IRIX 6.5 and OSF/1 4.0 and
+   'struct hostent' on MinGW.  */
 #include <sys/socket.h>
 
 /* The definition of _GL_ARG_NONNULL is copied here.  */
--- modules/netdb.orig  Sat Mar 19 13:53:24 2011
+++ modules/netdb       Sat Mar 19 13:49:01 2011
@@ -10,7 +10,6 @@
 arg-nonnull
 warn-on-use
 sys_socket
-socklen
 
 configure.ac:
 gl_HEADER_NETDB


2011-03-19  Paul Eggert  <address@hidden>
            Bruno Haible  <address@hidden>

        inet_ntop, inet_pton: Simplify.
        * modules/inet_ntop (Depends-on): Remove socklen, since sys_socket is
        documented to provide socklen_t and we already depend on sys_socket.
        * modules/inet_pton (Depends-on): Likewise.
        * lib/arpa_inet.in.h: Adjust comment.

--- lib/arpa_inet.in.h.orig     Sat Mar 19 13:56:51 2011
+++ lib/arpa_inet.in.h  Sat Mar 19 13:52:32 2011
@@ -27,8 +27,8 @@
 # include <features.h> /* for __GLIBC__ */
 #endif
 
-/* Gnulib's sys/socket.h is responsible for pulling in winsock2.h etc
-   under MinGW.
+/* Gnulib's sys/socket.h is responsible for defining socklen_t (used below) and
+   for pulling in winsock2.h etc. under MinGW.
    But avoid namespace pollution on glibc systems.  */
 #ifndef __GLIBC__
 # include <sys/socket.h>
--- modules/inet_ntop.orig      Sat Mar 19 13:56:51 2011
+++ modules/inet_ntop   Sat Mar 19 13:56:23 2011
@@ -6,7 +6,6 @@
 m4/inet_ntop.m4
 
 Depends-on:
-socklen
 sys_socket
 arpa_inet
 errno
--- modules/inet_pton.orig      Sat Mar 19 13:56:52 2011
+++ modules/inet_pton   Sat Mar 19 13:56:28 2011
@@ -7,7 +7,6 @@
 
 Depends-on:
 c-ctype
-socklen
 sys_socket
 arpa_inet
 errno


-- 
In memoriam Fred Scamaroni <http://fr.wikipedia.org/wiki/Fred_Scamaroni>



reply via email to

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