bug-gnulib
[Top][All Lists]
Advanced

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

Re: inet_ntop fix for mingw32


From: Simon Josefsson
Subject: Re: inet_ntop fix for mingw32
Date: Mon, 09 Jan 2006 15:28:44 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Bruno Haible <address@hidden> writes:

> Simon,
>
> Yoann Vandoorselaere wrote on 2005-10-25:
>> As you point out above, the untested netinet/in.h and sys/socket.h
>> change might lead to compilation warnings/failure on some systems. It
>> would be a good idea to check this specific change on OpenBSD 3.4 for
>> example.
>
> I now checked the current inet_ntop module on OpenBSD 3.4.
> - It fails to compile because it is missing the dependency to the 'restrict'
>   module. Simon, seems you forgot to commit the modules/inet_ntop patch?

Yes, I modified it locally but never installed it.  Done now, thanks.

> - netinet/in.h is currently not included by inet_ntop.h and is not needed.

Ok.

> - 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.

But due to the socklen.m4 design, it would be required on some
platforms, so let's keep it.  socklen.m4 wouldn't define socklen_t if
the system provided one in sys/socket.h.  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?  I'm not
sure.

Thanks.




reply via email to

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