Add WIN32_LEAN_AND_MEAN to source files which inlude Windows headers

This commit is contained in:
Jeffrey Walton 2016-04-28 01:05:47 -04:00
parent a9715898b2
commit 24d10aa83e
3 changed files with 11 additions and 1 deletions

View File

@ -7,6 +7,7 @@
#include <time.h>
#if defined(CRYPTOPP_WIN32_AVAILABLE)
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#elif defined(CRYPTOPP_UNIX_AVAILABLE)
#include <sys/time.h>

View File

@ -21,6 +21,7 @@
#include "whrlpool.h"
#include "tiger.h"
#include "smartptr.h"
#include "ocb.h"
#include "validate.h"
#include "bench.h"
@ -33,6 +34,7 @@
#include <time.h>
#ifdef CRYPTOPP_WIN32_AVAILABLE
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
@ -141,7 +143,13 @@ int CRYPTOPP_API main(int argc, char *argv[])
#endif
try
{
{
OCB<AES>::Encryption enc1;
OCB<AES>::Decryption dec1;
OCB3<AES>::Encryption enc2;
OCB3<AES>::Decryption dec2;
RegisterFactories();
// Some editors have problems with the '\0' character when redirecting output.

View File

@ -14,6 +14,7 @@
#include "trdlocal.h"
#ifdef HAS_WINTHREADS
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif