[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] Re: inet_ntop fix for mingw32
From: |
Bruno Haible |
Subject: |
Re: [bug-gnulib] Re: inet_ntop fix for mingw32 |
Date: |
Mon, 9 Jan 2006 21:34:56 +0100 |
User-agent: |
KMail/1.5 |
Simon Josefsson wrote:
> > - sys/socket.h is currently included. It is not needed on OpenBSD 3.4.
> > But it is needed for 'socklen_t' to be defined portably, I think - look
> > at socklen.m4.
>
> Strictly, I don't believe it is needed -- arpa/inet.h must provide a
> prototype for inet_ntop and consequently also make sure socklen_t is
> available.
The "consequently" is a false deduction. Look how glibc does it is
numerous places: They define a private equivalent of the type - would
be __socklen_t here - and use this private equivalent in the function
prototypes. So you can have a prototype with a type identical to
socklen_t but socklen_t is nevertheless not visible.
> Hence, all code that use
> socklen_t will need to include that file, conditioned on
> HAVE_SYS_SOCKET_H. Perhaps this:
>
> #ifdef HAVE_SYS_SOCKET_H
> # include <sys/socket.h>
> #endif
>
> should go into modules/socklen's Include statement then?
Yes, I agree. Similarly, I propose to modify modules/ssize as follows:
*** modules/ssize_t 15 Aug 2005 12:12:53 -0000 1.2
--- modules/ssize_t 9 Jan 2006 20:42:54 -0000
***************
*** 12,17 ****
--- 12,18 ----
Makefile.am:
Include:
+ #include <sys/types.h>
License:
unlimited
Bruno
- Re: [bug-gnulib] Re: inet_ntop fix for mingw32, Bruno Haible, 2006/01/06
- Re: inet_ntop fix for mingw32, Simon Josefsson, 2006/01/09
- Re: [bug-gnulib] Re: inet_ntop fix for mingw32,
Bruno Haible <=
- Re: inet_ntop fix for mingw32, Simon Josefsson, 2006/01/17
- Re: inet_ntop fix for mingw32, Bruno Haible, 2006/01/17
- Re: inet_ntop fix for mingw32, Simon Josefsson, 2006/01/17
- Re: inet_ntop fix for mingw32, Bruno Haible, 2006/01/17
- Re: inet_ntop fix for mingw32, Simon Josefsson, 2006/01/18
- Re: inet_ntop fix for mingw32, Bruno Haible, 2006/01/18
- Re: inet_ntop fix for mingw32, Simon Josefsson, 2006/01/18
- socklen_t (was: Re: inet_ntop fix for mingw32), Simon Josefsson, 2006/01/19
- Re: inet_ntop fix for mingw32, Simon Josefsson, 2006/01/18