curl-library
Re: Patch to Fix winsock2.h Issues in multi.h
Date: Mon, 16 Aug 2004 05:34:45 +0200
Hi Casey,
> I made the following changes to multi.h, which seemed to work fine
> compiling (libcurl as well as wxWidgets apps using curl) under MSW, as
> well as compiling from wxWidgets with none of the problems that I
> previously had (resulting in lots of errors because wxWidgets includes
> winsock prior to anywhere I can prevent it from doing it). I based
> this off the suggestions of Gisle Vanem in his response to my
> questions. This seemed to prevent the multiply defined errors I
> mentioned before. (I still made the change in config-win32.h
> commenting out the line for:
> /* Define if you have the <winsock2.h> header file. */
> /* #define HAVE_WINSOCK2_H 1 */
> And it still builds correctly regardless of that line being commented out.
that is not true; I've tested that already yesterday, but the reason I didnt apply it were:
- with MSVC curl doesnt build, but only the libcurl.
- with Borland you cant get it compiled at all.
from what I saw the winsock2 include in multi.h is needed for the fd_set stuff....
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...?
Guenter.
Received on 2004-08-16