summaryrefslogtreecommitdiffstats
path: root/Source/cmSystemTools.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-05-18 14:09:23 (GMT)
committerBrad King <brad.king@kitware.com>2011-05-18 14:09:23 (GMT)
commiteb6f461fc1a383c19cc1be62663f682d1ac108ff (patch)
tree2c5a4a6863e235000dd7414923296086abdfc691 /Source/cmSystemTools.cxx
parente1b0a11dd471e1593ade56897185a9d4dd2e0857 (diff)
downloadCMake-eb6f461fc1a383c19cc1be62663f682d1ac108ff.zip
CMake-eb6f461fc1a383c19cc1be62663f682d1ac108ff.tar.gz
CMake-eb6f461fc1a383c19cc1be62663f682d1ac108ff.tar.bz2
VS 6: Define _WIN32_WINNT to load wincrypt.h correctly
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r--Source/cmSystemTools.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx
index 4167355..1491a99 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 <ctype.h>
#include <errno.h>
@@ -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;