diff options
author | Andy Polyakov <appro@openssl.org> | 2006-01-02 14:44:06 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2006-01-02 14:44:06 +0100 |
commit | 61aa2134a48a6a436f498cc69ce895cd8456e080 (patch) | |
tree | 06c045b6646f452226d02734a2009bfcc3034bd0 /e_os.h | |
parent | Fix typo and purify logic in b_sock.c (diff) | |
download | openssl-61aa2134a48a6a436f498cc69ce895cd8456e080.tar.xz openssl-61aa2134a48a6a436f498cc69ce895cd8456e080.zip |
Compile Windows with winsock2.h. But note that we still link with wsock32!
This works because wsock32 commonly loads ws2_32 anyway and we [intend to]
check upon presense of winsock2-specific API at run-time.
Diffstat (limited to 'e_os.h')
-rw-r--r-- | e_os.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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> |