From eb6f461fc1a383c19cc1be62663f682d1ac108ff Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 18 May 2011 10:09:23 -0400 Subject: [PATCH] VS 6: Define _WIN32_WINNT to load wincrypt.h correctly --- Source/cmSystemTools.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 4167355fb..1491a9950 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -9,6 +9,9 @@ implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the License for more information. ============================================================================*/ +#if defined(_MSC_VER) && _MSC_VER < 1300 +# define _WIN32_WINNT 0x0400 /* for wincrypt.h */ +#endif #include "cmSystemTools.h" #include #include @@ -2236,6 +2239,9 @@ bool cmSystemTools::FileTimeSet(const char* fname, cmSystemToolsFileTime* t) //---------------------------------------------------------------------------- #ifdef _WIN32 +# ifndef CRYPT_SILENT +# define CRYPT_SILENT 0x40 /* Not defined by VS 6 version of header. */ +# endif static int WinCryptRandom(void* data, size_t size) { int result = 0;