summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-11-04 21:06:17 (GMT)
committerBrad King <brad.king@kitware.com>2009-11-04 21:06:17 (GMT)
commitd785cb0021a5994e620a29eda68bfb8ac385a713 (patch)
tree761a926676eea5610f5174c50486881c4a5a85f6 /Utilities/cmlibarchive/libarchive
parent08dc3d51700c7ad125a4ebafb5172ea94de062a5 (diff)
downloadCMake-d785cb0021a5994e620a29eda68bfb8ac385a713.zip
CMake-d785cb0021a5994e620a29eda68bfb8ac385a713.tar.gz
CMake-d785cb0021a5994e620a29eda68bfb8ac385a713.tar.bz2
libarchive: Fix wincrypt.h inclusion on VS 6
The VS 6 version of wincrypt.h only works if _WIN32_WINNT >= 0x0400. We block its inclusion through windows.h by defining NOCRYPT, and then define _WIN32_WINNT and include it only when necessary.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_windows.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_windows.h b/Utilities/cmlibarchive/libarchive/archive_windows.h
index 5a6ad7a..0a9b826 100644
--- a/Utilities/cmlibarchive/libarchive/archive_windows.h
+++ b/Utilities/cmlibarchive/libarchive/archive_windows.h
@@ -59,6 +59,7 @@
#include <sys/stat.h>
#include <process.h>
#include <direct.h>
+#define NOCRYPT
#include <windows.h>
//#define EFTYPE 7
@@ -296,6 +297,9 @@ typedef int pid_t;
/* Message digest define */
#if !defined(HAVE_OPENSSL_MD5_H) && !defined(HAVE_OPENSSL_SHA_H)
+# if defined(_MSC_VER) && _MSC_VER < 1300
+# define _WIN32_WINNT 0x0400
+# endif
#include <wincrypt.h>
typedef struct {
int valid;