From c02aedbe59a3abc2a7b84b7e1a8bf3a7f11ee20f Mon Sep 17 00:00:00 2001
From: Tobias Markmann <tm@ayena.de>
Date: Thu, 16 Oct 2014 11:31:55 +0200
Subject: Specify minimal Windows API version for Windows builds.

This sets _WIN32_WINNT and NTDDI_VERSION defines. The minimal version required
is Windows Vista since smart card support requires this version.

Test-Information:

With these defines Swift/-en builds successfully on Windows 8.1 with VisualStudio
Express 2013 for Desktop.

Change-Id: I8745f201559cd9c401caef7661f09939dffae38f

diff --git a/3rdParty/Boost/SConscript b/3rdParty/Boost/SConscript
index adb6d4e..a0d6500 100644
--- a/3rdParty/Boost/SConscript
+++ b/3rdParty/Boost/SConscript
@@ -40,7 +40,7 @@ elif env.get("BOOST_BUNDLED", False) :
 				"LIBS": ["Swiften_Boost"]
 			}
 		if env["PLATFORM"] == "win32" :
-			env["BOOST_FLAGS"]["CPPDEFINES"] += [("_WIN32_WINNT", "0x0501")]
+			env["BOOST_FLAGS"]["CPPDEFINES"] += [("_WIN32_WINNT", "_WIN32_WINNT_VISTA")]
 			if env["PLATFORM"] == "cygwin" :
 				env["BOOST_FLAGS"]["CPPDEFINES"] += ["__USE_W32_SOCKETS"]
 
diff --git a/Swiften/SConscript b/Swiften/SConscript
index a37767c..29298ca 100644
--- a/Swiften/SConscript
+++ b/Swiften/SConscript
@@ -76,6 +76,9 @@ if env["SCONS_STAGE"] == "flags" :
 				"FRAMEWORKS": e.get("FRAMEWORKS", []),
 			}
 
+	if env["PLATFORM"] == "win32" :
+		env.Append(CPPDEFINES = [("_WIN32_WINNT","_WIN32_WINNT_VISTA") , ("NTDDI_VERSION","NTDDI_VISTA")])
+
 ################################################################################
 # Build
 ################################################################################
-- 
cgit v0.10.2-6-g49f6