cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Patch to Fix winsock2.h Issues in multi.h

From: Guenter Knauf <eflash_at_gmx.net>
Date: Fri, 3 Sep 2004 19:15:54 +0200

Hi Daniel,
are you fine with that additional ifdef below?
The winsock2 include seems only be needed when you build curl, not for libcurl....

Guenter.

> I just went ahead and did it this way...based on what you said
> earlier. Would be cool to have it as part of the main source tree.

> Thanks.
> Casey

> (PATCH TEXT)

> Index: include/curl/multi.h
> ===================================================================
> RCS file: /cvsroot/curl/curl/include/curl/multi.h,v
> retrieving revision 1.18
> diff -u -r1.18 multi.h
> --- include/curl/multi.h 24 Mar 2004 22:53:42 -0000 1.18
> +++ include/curl/multi.h 18 Aug 2004 17:20:33 -0000
> @@ -52,7 +52,9 @@
> #endif

> #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
> +#if !defined(_DONTWANT_WINSOCK2_INCLUDED_)
> #include <winsock2.h>
> +#endif
> #else

> /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does
> oldish

> On Mon, 16 Aug 2004 08:14:44 -0400, Casey ODonnell
> <caseyodonnell_at_gmail.com> wrote:
>> That looks like a good solution to me. Unless anyone else had another
>> naming thought.
> <SNIP>
>>
>>
>> On Mon, 16 Aug 2004 05:34:45 +0200, Guenter Knauf <eflash_at_gmx.net> wrote:
>> > perhaps its better to additionally ifndef with some other, f.e.:
>> >
>> > #ifndef DONT_NEED_WINSOCK2_H
>> > #include <winsock2.h>
>> > #endif
>> >
>> > this way you can avoid the include when ever you want while we change
>> > nothing with the usual builds...?

> --
> Casey O'Donnell
> RPI STS Department - Graduate Student

> http://homepage.mac.com/codonnell/
> http://homepage.mac.com/codonnell/wxblogger/
Received on 2004-09-03