[gnutls-devel] [patch]: windows build fix: ws2tcpip.h supplies inet_ntop

Eli Zaretskii eliz at gnu.org
Mon Nov 24 19:24:03 CET 2014


> From: Nikos Mavrogiannopoulos <nmav at gnutls.org>
> Cc: mabrand at mabrand.nl, gnutls-devel at lists.gnutls.org
> Date: Mon, 24 Nov 2014 19:15:08 +0100
> 
> On Mon, 2014-11-24 at 20:11 +0200, Eli Zaretskii wrote:
> > > From: Nikos Mavrogiannopoulos <nmav at gnutls.org>
> > > Cc: Eli Zaretskii <eliz at gnu.org>, gnutls-devel at lists.gnutls.org
> > > Date: Mon, 24 Nov 2014 18:53:17 +0100
> > > 
> > > Thanks Mark. Wouldn't that make though the distributed gnutls binaries
> > > required windows vista+? I'd like to keep windows xp compatibility. A
> > > way would be by doing something similar to what system-keys-win.c does
> > > in master for the CNG API, or bundling a tiny inet_ntop, but I'm not
> > > sure it's worth the effort. In any case, if there is a patch that would
> > > allow compatibility with older windows systems I'll apply it.
> > There's inet_ntop module in gnulib, perhaps using it would be the
> > best.
> 
> I spent quite some time removing gnulib's networking part for the main
> library. It makes interplay with applications using windows sockets
> almost impossible.

OK, but since inet_ntop doesn't actually call any network functions,
you could just steal its code from gnulib, and provide that as
fallback on pre-Vista Windows systems.  IOW, the only "networking
part" I see in gnulib's inet_ntop is the inclusion of arpa/inet.h and
use of AF_* macros.  That is easy to deal with while leaving the code
parts intact.

In any case, if you want XP compatibility, you will have to provide
some replacement for that, right?  There's no way around that.



More information about the Gnutls-devel mailing list