curl-library
Win32 inet_pton fixes (Was: Re: curl-7.10.8-pre3)
Date: Wed, 8 Oct 2003 19:43:53 -0400
> Due to some additional functionality in lib/ssluse.c, we now use
inet_pton()
> in libcurl and thus we check for it in configure and I provide an internal
one
> for platforms that lack it.
>
> This will cause warnings/errors on some platforms, please help me fix
them.
Couple of errors here on Win32 with MSVC.NET.
The inet_pton4/6 uses u_char, MSVC doesn't have a u_char defined. Probably
the easiest way to fix this, rather than adding a portability typedef type
of thing, would just be to change inet_pton to use unsigned char.
Also, winsock.h must be included in inet_pton if MSVC is in use.
Lastly, a #define for EAFNOSUPPORT is needed in MSVC since MS likes the WSA
prefix. Attached is a little patch to make the above mentioned changes. It
shouldn't effect building on other OSes, the only non-#ifdef'ed change I
made was u_char -> unsigned char, but I don't anticipate that causing
problems, but testing never hurts :)
Dominick Meglio
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
- application/octet-stream attachment: inet_ptonwin32.patch