Add missing header for Windows 8, Windows Server 2012, and Windows Phone 8

pull/131/head
Jeffrey Walton 2016-04-27 22:45:34 -04:00
parent e06b50f564
commit 500c312a58
4 changed files with 32 additions and 4 deletions

View File

@ -10,6 +10,13 @@
#include "wait.h"
// Windows 8, Windows Server 2012, and Windows Phone 8.1 need <synchapi.h>
#if defined(CRYPTOPP_WIN32_AVAILABLE)
# if defined(_WIN32_WINNT_WIN8) && ((WINVER >= _WIN32_WINNT_WIN8) || (_WIN32_WINNT >= _WIN32_WINNT_WIN8))
# include <synchapi.h>
# endif
#endif
#ifdef USE_BERKELEY_STYLE_SOCKETS
#include <errno.h>
#include <netdb.h>

7
wait.cpp Normal file → Executable file
View File

@ -13,6 +13,13 @@
#ifdef SOCKETS_AVAILABLE
// Windows 8, Windows Server 2012, and Windows Phone 8.1 need <synchapi.h>
#if defined(CRYPTOPP_WIN32_AVAILABLE)
# if defined(_WIN32_WINNT_WIN8) && ((WINVER >= _WIN32_WINNT_WIN8) || (_WIN32_WINNT >= _WIN32_WINNT_WIN8))
# include <synchapi.h>
# endif
#endif
#ifdef USE_BERKELEY_STYLE_SOCKETS
#include <errno.h>
#include <sys/types.h>

15
wait.h Normal file → Executable file
View File

@ -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 <vector>
#ifdef USE_WINDOWS_STYLE_SOCKETS
#include <winsock2.h>
#else
@ -16,6 +17,12 @@
#include <sys/select.h>
#endif
// For defintions of VOID, PVOID, HANDLE, PHANDLE, etc.
#if defined(CRYPTOPP_WIN32_AVAILABLE)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
#include "hrtimer.h"
#if defined(__has_feature)

View File

@ -7,6 +7,13 @@
#include "wait.h"
// Windows 8, Windows Server 2012, and Windows Phone 8.1 need <synchapi.h>
#if defined(CRYPTOPP_WIN32_AVAILABLE)
# if defined(_WIN32_WINNT_WIN8) && ((WINVER >= _WIN32_WINNT_WIN8) || (_WIN32_WINNT >= _WIN32_WINNT_WIN8))
# include <synchapi.h>
# endif
#endif
NAMESPACE_BEGIN(CryptoPP)
WindowsHandle::WindowsHandle(HANDLE h, bool own)