cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: More CVS Makefile.vc6 Issues...

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

Hi Casey,
have you also tried what Gisle suggested below?
I've somehow missed to read Gisle's post until now, but I think that's a better approach than my suggestion since you dont have to define an additional var - if that works for you...

Guenter.

--- multi.h.orig Wed Mar 24 23:53:42 2004
+++ multi.h Fri Sep 03 19:26:22 2004
@@ -52,7 +52,9 @@
 #endif
 
 #if defined(WIN32) && !defined(__GNUC__) || defined(__MINGW32__)
+#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H))
 #include <winsock2.h>
+#endif
 #else
 
 /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish

> "Casey ODonnell" <caseyodonnell_at_gmail.com> said:

>> Let me know what your thoughts are, and if there are good ways to
>> reconcile Winsock and Winsock2...

> Carefully reorder your headers and/or define _WINSOCKAPI_ in
> your CFLAGS.

> MingW's <winsock2.h> has this at top:
> #define _WINSOCK_H /* to prevent later inclusion of winsock.h */

> Microsoft in their SDK where not so smart to foresee this problem.
> <multi.h> could probably do something like:

> #if !defined(_WINSOCKAPI_) && !defined(_WINSOCK_H)
> #include <winsock2.h>
> #endif

> Do you provide a patch?

> But, winsock2.h is only needed for the definition of fd_set.
> So those args could just as well be 'void *' to avoid this problem.
> Anything can be converted to 'void *' without a cast in C, right?

> --gv
Received on 2004-09-03