On Sunday 29 February 2004 20:49, Juan Lang wrote: > > Shouldn't wininet build on ws2_32 and thus compile? > > I think it should be investigated... > > wininet currently depends on OpenSSL and BSD (unix) > sockets. I think the way OpenSSL is being used makes > it rather hard to use ws2_32 instead, but if someone > wants to take that on that would help. I'm trying to > implement SSL in secur32.dll so wininet can use this, > but it will take me a while (it's rather large). > Helpers welcome :) > > I can fix up vnb.vxd, it really should build on MinGW, > whether or not it's useful to do so. I'll send a > patch shortly.
If I include winsock2.h, get rid of the sys/socket.h, netinet/in.h and arpa/inet.h includes and additionally link to ws2_32 it builds on MinGW as well as Wine. > Hans, why didn't wsock32 build? It looks like > configure should protect you against missing headers > and whatnot; it mostly forwards to iphlpapi and > ws2_32. It's missing some constants: ../../../wine/dlls/wsock32/protocol.c:144: `SOCK_STREAM' undeclared (first use in this function) ../../../wine/dlls/wsock32/protocol.c:155: `SOCK_DGRAM' undeclared (first use in this function) These are in winsock.h but protocol.c only includes winsock2.h When I change the include to winsock.h I get: ../../../wine/include/winsock.h:25:4: #error Please use Winsock2 in Wine winsock2.h says: FIXME: Still missing required Winsock 2 definitions. MinGW and MSVC versions of winsock2.h have the defines, so I guess we need to add them. Attached patch does so. -Hans Changelog: add protocol type constants.
Index: include/winsock2.h =================================================================== RCS file: /home/wine/wine/include/winsock2.h,v retrieving revision 1.21 diff -u -r1.21 winsock2.h --- include/winsock2.h 11 Dec 2003 05:16:48 -0000 1.21 +++ include/winsock2.h 1 Mar 2004 13:54:29 -0000 @@ -76,6 +76,21 @@ #define WS_SO_CONDITIONAL_ACCEPT 0x3002 #endif +/* protocol types */ + +#ifndef USE_WS_PREFIX +#define SOCK_STREAM 1 +#define SOCK_DGRAM 2 +#define SOCK_RAW 3 +#define SOCK_RDM 4 +#define SOCK_SEQPACKET 5 +#else /* USE_WS_PREFIX */ +#define WS_SOCK_STREAM 1 +#define WS_SOCK_DGRAM 2 +#define WS_SOCK_RAW 3 +#define WS_SOCK_RDM 4 +#define WS_SOCK_SEQPACKET 5 +#endif /* USE_WS_PREFIX */ /* option flags per socket */
