Skip to content

Commit

Permalink
Compile Windows with winsock2.h. But note that we still link with wso…
Browse files Browse the repository at this point in the history
…ck32!

This works because wsock32 commonly loads ws2_32 anyway and we [intend to]
check upon presense of winsock2-specific API at run-time.
  • Loading branch information
Andy Polyakov committed Jan 2, 2006
1 parent 4eb76e2 commit 61aa213
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions e_os.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,18 @@ extern "C" {
*/
# define _WIN32_WINNT 0x0400
# endif
# if !defined(OPENSSL_NO_SOCK) && defined(_WIN32_WINNT)
/*
* Just like defining _WIN32_WINNT including winsock2.h implies
* certain "discipline" for maintaing [broad] binary compatibility.
* As long as structures are invariant among Winsock versions,
* it's sufficient to check for specific Winsock2 API availability
* at run-time [DSO_global_lookup is recommended]...
*/
# include <winsock2.h>
# include <ws2tcpip.h>
/* yes, they have to be #included prior <windows.h> */
# endif
# include <windows.h>
# include <stddef.h>
# include <errno.h>
Expand Down

0 comments on commit 61aa213

Please sign in to comment.