diff --git a/socketft.cpp b/socketft.cpp index 1c54f008..ad31f68a 100644 --- a/socketft.cpp +++ b/socketft.cpp @@ -10,6 +10,13 @@ #include "wait.h" +// Windows 8, Windows Server 2012, and Windows Phone 8.1 need +#if defined(CRYPTOPP_WIN32_AVAILABLE) +# if defined(_WIN32_WINNT_WIN8) && ((WINVER >= _WIN32_WINNT_WIN8) || (_WIN32_WINNT >= _WIN32_WINNT_WIN8)) +# include +# endif +#endif + #ifdef USE_BERKELEY_STYLE_SOCKETS #include #include diff --git a/wait.cpp b/wait.cpp old mode 100644 new mode 100755 index c9078eac..5db5cf39 --- a/wait.cpp +++ b/wait.cpp @@ -13,6 +13,13 @@ #ifdef SOCKETS_AVAILABLE +// Windows 8, Windows Server 2012, and Windows Phone 8.1 need +#if defined(CRYPTOPP_WIN32_AVAILABLE) +# if defined(_WIN32_WINNT_WIN8) && ((WINVER >= _WIN32_WINNT_WIN8) || (_WIN32_WINNT >= _WIN32_WINNT_WIN8)) +# include +# endif +#endif + #ifdef USE_BERKELEY_STYLE_SOCKETS #include #include diff --git a/wait.h b/wait.h old mode 100644 new mode 100755 index 622257df..298ca684 --- a/wait.h +++ b/wait.h @@ -1,14 +1,15 @@ +// wait.h - written and placed in the public domain by Wei Dai + #ifndef CRYPTOPP_WAIT_H #define CRYPTOPP_WAIT_H #include "config.h" +#include "cryptlib.h" +#include "misc.h" +#include "stdcpp.h" #ifdef SOCKETS_AVAILABLE -#include "misc.h" -#include "cryptlib.h" -#include - #ifdef USE_WINDOWS_STYLE_SOCKETS #include #else @@ -16,6 +17,12 @@ #include #endif +// For defintions of VOID, PVOID, HANDLE, PHANDLE, etc. +#if defined(CRYPTOPP_WIN32_AVAILABLE) +#define WIN32_LEAN_AND_MEAN +#include +#endif + #include "hrtimer.h" #if defined(__has_feature) diff --git a/winpipes.cpp b/winpipes.cpp index b1ec6d28..66725a2f 100644 --- a/winpipes.cpp +++ b/winpipes.cpp @@ -7,6 +7,13 @@ #include "wait.h" +// Windows 8, Windows Server 2012, and Windows Phone 8.1 need +#if defined(CRYPTOPP_WIN32_AVAILABLE) +# if defined(_WIN32_WINNT_WIN8) && ((WINVER >= _WIN32_WINNT_WIN8) || (_WIN32_WINNT >= _WIN32_WINNT_WIN8)) +# include +# endif +#endif + NAMESPACE_BEGIN(CryptoPP) WindowsHandle::WindowsHandle(HANDLE h, bool own)