From 2e66a0d2601cd4275f039a7cc82c41e4add19f7f Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Wed, 24 May 2017 20:34:38 +0100 Subject: [PATCH] Fix a build failure under Visual Studio 2010. Patch due to Brian K. White; we now condition our own declaration of DLL_DIRECTORY_COOKIE on whether the toolchain's headers had #defined it already, rather than trying to guess the answer to that from version-number macros. (Apparently everything that defines DLL_DIRECTORY_COOKIE does it by does seem to work in all my tests.) --- windows/winstuff.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/windows/winstuff.h b/windows/winstuff.h index dfa032f4..10fcdaba 100644 --- a/windows/winstuff.h +++ b/windows/winstuff.h @@ -533,8 +533,9 @@ GLOBAL int restricted_acl; #ifndef LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR #define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x00000100 #endif -#if _MSC_VER < 1400 +#ifndef DLL_DIRECTORY_COOKIE typedef PVOID DLL_DIRECTORY_COOKIE; +DECLSPEC_IMPORT DLL_DIRECTORY_COOKIE WINAPI AddDllDirectory (PCWSTR NewDirectory); #endif /*