From: <no...@so...> - 2002-08-17 10:36:27
|
Bugs item #596369, was opened at 2002-08-17 19:22 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=596369&group_id=2435 Category: w32api Group: None Status: Open Resolution: None Priority: 5 Submitted By: Jan Hlavatý (hlavac) Assigned to: Earnie Boyd (earnie) Summary: winsock2.h vs winsock.h conflict Initial Comment: I ran into this compiling OpenSSL 0.9.6g. winsock2.h gets included automatically with windows.h, which blocks any subsequent inclusion of winsock.h. OpenSSL 0.9.6g seems to make use of winsock 1.1 API. Although it includes winsock.h, WSACancelBlockingCall() prototype is not imported and link will fail because wrong calling convention is chosen. As a simple fix, please activate section of winsock2.h which includes these Winsock 1.1 functions (like WSACancelBlockingCall() ) and is disabled using #if 0 so that code that uses it will compile... ---------------------------------------------------------------------- >Comment By: Danny Smith (dannysmith) Date: 2002-08-17 22:36 Message: Logged In: YES user_id=11494 Hmm, well maybe I was being a bit too protective. The pseudo-blocking functions are deprecated but they are available throught ws2_32.dll (another doc i had read earlier said they were notavailable _directly_ from ws2_32.dll. However, the names certainly are exported). Unless, I hear an objection I'll remove the #if 0 and correct the comment. GCC3.x has a new attribute __attibute__((deprecated)) that warns about obsolete functions. But I can already hear the screams from failing configure scripts that don't like warnings. Danny Danny ---------------------------------------------------------------------- Comment By: Danny Smith (dannysmith) Date: 2002-08-17 21:30 Message: Logged In: YES user_id=11494 A simpler and safer fix if you want to use the winsock1.1 interface is to include winsock.h before windows.h. This will block inclusion of winsock2.h Some of the defines in winsock2.h are incompatable with functions exported from wsock32.dll (and similarly there are proplems including winsock.h and linking in ws2_32.dll before wsock32.dll). The documentation for WSACancelBlockingCall at http://msdn.microsoft.com/library/default.asp? url=/library/en-us/winsock/wsapiref_704y.asp is very explicit in the deprecation of that function for winsock2 interface Danny ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=102435&aid=596369&group_id=2435 |