From: Brad King Date: Wed, 11 Nov 2009 14:19:19 +0000 (-0500) Subject: Fix wincrypt.h inclusion on VS 6 X-Git-Tag: v2.8.0~182 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6fbc847e164c6e3ebaa8174ad38368bacfd85100;p=thirdparty%2Flibarchive.git 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. SVN-Revision: 1633 --- diff --git a/libarchive/archive_windows.h b/libarchive/archive_windows.h index 90116ed48..9ed6fc32c 100644 --- a/libarchive/archive_windows.h +++ b/libarchive/archive_windows.h @@ -59,6 +59,7 @@ #include #include #include +#define NOCRYPT #include //#define EFTYPE 7 @@ -277,6 +278,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 typedef struct { int valid;