← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 3376: VS 2013 - Remove noexcept, SFINAE and decltype workarounds

 

------------------------------------------------------------
revno: 3376
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Fri 2013-12-06 01:08:00 +0100
message:
  VS 2013 - Remove noexcept, SFINAE and decltype workarounds
removed:
  dcpp/noexcept.h
  msvc/nov2012ctp.patch
added:
  msvc/nov2013ctp.patch
modified:
  Compile.txt
  SConstruct
  build_util.py
  dcpp/BufferedSocketListener.h
  dcpp/ClientListener.h
  dcpp/ClientManagerListener.h
  dcpp/ConnectionManagerListener.h
  dcpp/ConnectivityManager.h
  dcpp/DirectoryListing.h
  dcpp/Download.h
  dcpp/DownloadManagerListener.h
  dcpp/FavoriteManager.cpp
  dcpp/FavoriteManagerListener.h
  dcpp/HashManager.cpp
  dcpp/HttpConnectionListener.h
  dcpp/HttpManagerListener.h
  dcpp/LogManagerListener.h
  dcpp/Pointer.h
  dcpp/QueueManager.cpp
  dcpp/QueueManagerListener.h
  dcpp/SFVReader.h
  dcpp/Semaphore.h
  dcpp/SimpleXML.h
  dcpp/Speaker.h
  dcpp/StringSearch.h
  dcpp/Text.h
  dcpp/UploadManagerListener.h
  dcpp/UserCommand.h
  dcpp/UserConnectionListener.h
  dcpp/Util.h
  dcpp/compiler.h
  dwt/include/dwt/widgets/TableTree.h
  dwt/src/widgets/TableTree.cpp
  dwt/test/SConscript
  openssl/build/build.bat
  win32/compiler.h


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'Compile.txt'
--- Compile.txt	2013-09-22 13:51:20 +0000
+++ Compile.txt	2013-12-06 00:08:00 +0000
@@ -139,15 +139,17 @@
 		Make sure that Cygwin\bin is in your PATH environment variable.
 		Note that building with MinGW compilers provided by Cygwin is not often tested.
 
-	b. Microsoft Visual Studio 2012:
+	b. Microsoft Visual Studio 2013:
 	<http://msdn.microsoft.com/en-us/visualc/default.aspx>
 
-		Make sure VS is up-to-date; in particular, you will need the Nov 2012 CTP from
-		<http://www.microsoft.com/en-us/download/details.aspx?id=35515>. Use the patch in
-		msvc/nov2012ctp.patch to patch your VC/vcvarsall.bat file to make use of it (if you
+		Make sure VS is up-to-date; in particular, you will need the Nov 2013 CTP from
+		<http://www.microsoft.com/en-us/download/details.aspx?id=41151>. Use the patch in
+		msvc/nov2013ctp.patch to patch your VC/vcvarsall.bat file to make use of it (if you
 		generate project files and compile from the VS GUI, that won't be necessary).
 
 		To generate project files for MSVC, run "scons" with "msvcproj=1" and "tools=default".
+		[Temporary until SCons fully supports VS 2013: the above command has to be run from a VS
+		command prompt.]
 		The resulting solution file (DCPlusPlus.sln) will be in msvc/[mode-arch]/.
 
 

=== modified file 'SConstruct'
--- SConstruct	2013-08-11 15:02:21 +0000
+++ SConstruct	2013-12-06 00:08:00 +0000
@@ -69,7 +69,7 @@
 
 # TODO remove _VARIADIC_MAX if/when VC has proper variadic template support
 msvc_defs = {
-	'common' : ['_REENTRANT', '_VARIADIC_MAX=10', 'snprintf=_snprintf'],
+	'common' : ['_REENTRANT', 'snprintf=_snprintf'],
 	'debug' : ['_DEBUG', '_HAS_ITERATOR_DEBUGGING=0', '_SECURE_SCL=0'],
 	'release' : ['NDEBUG']
 }
@@ -125,8 +125,12 @@
 if TARGET_ARCH == 'x64':
 	TARGET_ARCH = 'amd64'
 
-env = Environment(ENV = os.environ, tools = [defEnv['tools']], options = opts,
-		TARGET_ARCH = TARGET_ARCH, MSVS_ARCH = TARGET_ARCH)
+# TODO MSVC_USE_SCRIPT disables SCons' automatic env setup as it doesn't know
+# about VC 12 yet.
+env = Environment(
+	ENV=os.environ, tools=[defEnv['tools']], options=opts,
+	TARGET_ARCH=TARGET_ARCH, MSVS_ARCH=TARGET_ARCH, MSVC_USE_SCRIPT=False
+)
 
 if env['distro']:
 	env['tools'] = 'mingw'

=== modified file 'build_util.py'
--- build_util.py	2013-08-08 18:48:28 +0000
+++ build_util.py	2013-12-06 00:08:00 +0000
@@ -412,10 +412,10 @@
 	# remove SConstruct from included files since it points nowhere anyway.
 	contents = re.sub('<ItemGroup>\s*<None Include="SConstruct" />\s*</ItemGroup>', '', contents)
 
-	# update the platform toolset to the VS 2012 one.
+	# update the platform toolset to the VS 2013 one.
 	# TODO remove when SCons adds this.
 	contents = contents.replace('<UseOfMfc>false</UseOfMfc>',
-	'<UseOfMfc>false</UseOfMfc>\r\n\t\t<PlatformToolset>v120_CTP_Nov2012</PlatformToolset>')
+	'<UseOfMfc>false</UseOfMfc>\r\n\t\t<PlatformToolset>v130_CTP_Nov2013</PlatformToolset>')
 
 	f = open(str(target[0]), 'wb')
 	f.write(contents)

=== modified file 'dcpp/BufferedSocketListener.h'
--- dcpp/BufferedSocketListener.h	2013-08-11 15:02:21 +0000
+++ dcpp/BufferedSocketListener.h	2013-12-06 00:08:00 +0000
@@ -20,7 +20,6 @@
 #define DCPLUSPLUS_DCPP_BUFFEREDSOCKETLISTENER_H_
 
 #include <cstdint>
-#include "noexcept.h"
 #include <string>
 
 namespace dcpp {

=== modified file 'dcpp/ClientListener.h'
--- dcpp/ClientListener.h	2013-09-15 16:39:42 +0000
+++ dcpp/ClientListener.h	2013-12-06 00:08:00 +0000
@@ -19,7 +19,6 @@
 #ifndef CLIENTLISTENER_H_
 #define CLIENTLISTENER_H_
 
-#include "noexcept.h"
 #include "typedefs.h"
 
 namespace dcpp {

=== modified file 'dcpp/ClientManagerListener.h'
--- dcpp/ClientManagerListener.h	2013-01-18 21:28:38 +0000
+++ dcpp/ClientManagerListener.h	2013-12-06 00:08:00 +0000
@@ -20,7 +20,6 @@
 #define DCPLUSPLUS_DCPP_CLIENT_MANAGER_LISTENER_H
 
 #include "forward.h"
-#include "noexcept.h"
 
 namespace dcpp {
 

=== modified file 'dcpp/ConnectionManagerListener.h'
--- dcpp/ConnectionManagerListener.h	2013-08-19 20:13:24 +0000
+++ dcpp/ConnectionManagerListener.h	2013-12-06 00:08:00 +0000
@@ -20,7 +20,6 @@
 #define CONNECTION_MANAGER_LISTENER_H
 
 #include "forward.h"
-#include "noexcept.h"
 #include "typedefs.h"
 
 namespace dcpp {

=== modified file 'dcpp/ConnectivityManager.h'
--- dcpp/ConnectivityManager.h	2013-01-18 21:28:38 +0000
+++ dcpp/ConnectivityManager.h	2013-12-06 00:08:00 +0000
@@ -19,7 +19,6 @@
 #ifndef DCPLUSPLUS_DCPP_CONNECTIVITY_MANAGER_H
 #define DCPLUSPLUS_DCPP_CONNECTIVITY_MANAGER_H
 
-#include "noexcept.h"
 #include "SettingsManager.h"
 #include "Singleton.h"
 #include "Speaker.h"

=== modified file 'dcpp/DirectoryListing.h'
--- dcpp/DirectoryListing.h	2013-03-03 23:23:07 +0000
+++ dcpp/DirectoryListing.h	2013-12-06 00:08:00 +0000
@@ -24,7 +24,6 @@
 #include <boost/noncopyable.hpp>
 
 #include "forward.h"
-#include "noexcept.h"
 
 #include "HintedUser.h"
 #include "FastAlloc.h"

=== modified file 'dcpp/Download.h'
--- dcpp/Download.h	2013-01-18 21:28:38 +0000
+++ dcpp/Download.h	2013-12-06 00:08:00 +0000
@@ -23,7 +23,6 @@
 #include <memory>
 
 #include "forward.h"
-#include "noexcept.h"
 #include "Transfer.h"
 #include "MerkleTree.h"
 #include "Flags.h"

=== modified file 'dcpp/DownloadManagerListener.h'
--- dcpp/DownloadManagerListener.h	2013-01-18 21:28:38 +0000
+++ dcpp/DownloadManagerListener.h	2013-12-06 00:08:00 +0000
@@ -20,7 +20,6 @@
 #define DCPLUSPLUS_DCPP_DOWNLOADMANAGERLISTENER_H_
 
 #include "typedefs.h"
-#include "noexcept.h"
 
 namespace dcpp {
 

=== modified file 'dcpp/FavoriteManager.cpp'
--- dcpp/FavoriteManager.cpp	2013-05-16 21:03:53 +0000
+++ dcpp/FavoriteManager.cpp	2013-12-06 00:08:00 +0000
@@ -286,8 +286,7 @@
 			const string& maxUsers = getAttrib(attribs, "Maxusers", 5);
 			const string& reliability = getAttrib(attribs, "Reliability", 5);
 			const string& rating = getAttrib(attribs, "Rating", 5);
-			/// @todo change to emplace_back when MSVC has templates with var args, thus allowing these 12 arguments! (its current emulation only goes up to 10)
-			publicHubs.push_back(HubEntry(name, server, description, users, country, shared, minShare, minSlots, maxHubs, maxUsers, reliability, rating));
+			publicHubs.emplace_back(name, server, description, users, country, shared, minShare, minSlots, maxHubs, maxUsers, reliability, rating);
 		}
 	}
 private:

=== modified file 'dcpp/FavoriteManagerListener.h'
--- dcpp/FavoriteManagerListener.h	2013-03-30 14:28:28 +0000
+++ dcpp/FavoriteManagerListener.h	2013-12-06 00:08:00 +0000
@@ -22,7 +22,6 @@
 #include <string>
 
 #include "forward.h"
-#include "noexcept.h"
 
 namespace dcpp {
 

=== modified file 'dcpp/HashManager.cpp'
--- dcpp/HashManager.cpp	2013-02-14 16:25:20 +0000
+++ dcpp/HashManager.cpp	2013-12-06 00:08:00 +0000
@@ -233,12 +233,7 @@
 		}
 
 		for (auto& i: fileIndex) {
-#ifndef _MSC_VER
 			decltype(fileIndex)::mapped_type newFileList;
-#else
-			/// @todo remove this workaround when VS has a proper decltype...
-			decltype(fileIndex.begin()->second) newFileList;
-#endif
 
 			for (auto& j: i.second) {
 				if (newTreeIndex.find(j.getRoot()) != newTreeIndex.end()) {

=== modified file 'dcpp/HttpConnectionListener.h'
--- dcpp/HttpConnectionListener.h	2013-04-14 22:01:23 +0000
+++ dcpp/HttpConnectionListener.h	2013-12-06 00:08:00 +0000
@@ -22,7 +22,6 @@
 #include <string>
 
 #include "forward.h"
-#include "noexcept.h"
 
 namespace dcpp {
 

=== modified file 'dcpp/HttpManagerListener.h'
--- dcpp/HttpManagerListener.h	2013-04-14 22:01:23 +0000
+++ dcpp/HttpManagerListener.h	2013-12-06 00:08:00 +0000
@@ -22,7 +22,6 @@
 #include <string>
 
 #include "forward.h"
-#include "noexcept.h"
 
 namespace dcpp {
 

=== modified file 'dcpp/LogManagerListener.h'
--- dcpp/LogManagerListener.h	2013-03-30 14:28:28 +0000
+++ dcpp/LogManagerListener.h	2013-12-06 00:08:00 +0000
@@ -21,8 +21,6 @@
 
 #include <string>
 
-#include "noexcept.h"
-
 namespace dcpp {
 
 using std::string;

=== modified file 'dcpp/Pointer.h'
--- dcpp/Pointer.h	2013-01-18 21:28:38 +0000
+++ dcpp/Pointer.h	2013-12-06 00:08:00 +0000
@@ -23,7 +23,6 @@
 
 #include <memory>
 
-#include "noexcept.h"
 #include "atomic.h"
 
 namespace dcpp {

=== modified file 'dcpp/QueueManager.cpp'
--- dcpp/QueueManager.cpp	2013-11-18 22:11:26 +0000
+++ dcpp/QueueManager.cpp	2013-12-06 00:08:00 +0000
@@ -461,7 +461,8 @@
 		auto filelists = File::findFiles(path, "*.xml*");
 		std::sort(filelists.begin(), filelists.end());
 		std::for_each(filelists.begin(), std::set_difference(filelists.begin(), filelists.end(),
-			protectedFileLists.begin(), protectedFileLists.end(), filelists.begin()), &File::deleteFile);
+			protectedFileLists.begin(), protectedFileLists.end(), filelists.begin()),
+			[](const string& file) { File::deleteFile(file); });
 	}
 }
 

=== modified file 'dcpp/QueueManagerListener.h'
--- dcpp/QueueManagerListener.h	2013-08-11 15:02:21 +0000
+++ dcpp/QueueManagerListener.h	2013-12-06 00:08:00 +0000
@@ -23,7 +23,6 @@
 #include <string>
 
 #include "forward.h"
-#include "noexcept.h"
 
 namespace dcpp {
 

=== modified file 'dcpp/SFVReader.h'
--- dcpp/SFVReader.h	2013-08-11 15:02:21 +0000
+++ dcpp/SFVReader.h	2013-12-06 00:08:00 +0000
@@ -22,8 +22,6 @@
 #include <cstdint>
 #include <string>
 
-#include "noexcept.h"
-
 namespace dcpp {
 
 using std::string;

=== modified file 'dcpp/Semaphore.h'
--- dcpp/Semaphore.h	2013-01-18 21:28:38 +0000
+++ dcpp/Semaphore.h	2013-12-06 00:08:00 +0000
@@ -29,8 +29,6 @@
 #include <sys/time.h>
 #endif
 
-#include "noexcept.h"
-
 namespace dcpp {
 
 class Semaphore : boost::noncopyable

=== modified file 'dcpp/SimpleXML.h'
--- dcpp/SimpleXML.h	2013-01-18 21:28:38 +0000
+++ dcpp/SimpleXML.h	2013-12-06 00:08:00 +0000
@@ -22,7 +22,6 @@
 #include <boost/noncopyable.hpp>
 
 #include "forward.h"
-#include "noexcept.h"
 #include "Exception.h"
 #include "Util.h"
 

=== modified file 'dcpp/Speaker.h'
--- dcpp/Speaker.h	2013-01-18 21:28:38 +0000
+++ dcpp/Speaker.h	2013-12-06 00:08:00 +0000
@@ -25,8 +25,6 @@
 
 #include "CriticalSection.h"
 
-#include "noexcept.h"
-
 namespace dcpp {
 
 using std::forward;

=== modified file 'dcpp/StringSearch.h'
--- dcpp/StringSearch.h	2013-01-18 21:28:38 +0000
+++ dcpp/StringSearch.h	2013-12-06 00:08:00 +0000
@@ -23,8 +23,6 @@
 
 #include "Text.h"
 
-#include "noexcept.h"
-
 namespace dcpp {
 
 /**

=== modified file 'dcpp/Text.h'
--- dcpp/Text.h	2013-01-18 21:28:38 +0000
+++ dcpp/Text.h	2013-12-06 00:08:00 +0000
@@ -21,7 +21,6 @@
 
 #include "debug.h"
 #include "typedefs.h"
-#include "noexcept.h"
 
 namespace dcpp {
 

=== modified file 'dcpp/UploadManagerListener.h'
--- dcpp/UploadManagerListener.h	2013-01-18 21:28:38 +0000
+++ dcpp/UploadManagerListener.h	2013-12-06 00:08:00 +0000
@@ -22,8 +22,6 @@
 #include "forward.h"
 #include "typedefs.h"
 
-#include "noexcept.h"
-
 namespace dcpp {
 
 class UploadManagerListener {

=== modified file 'dcpp/UserCommand.h'
--- dcpp/UserCommand.h	2013-01-18 21:28:38 +0000
+++ dcpp/UserCommand.h	2013-12-06 00:08:00 +0000
@@ -24,7 +24,6 @@
 
 #include "Flags.h"
 #include "GetSet.h"
-#include "noexcept.h"
 #include "typedefs.h"
 
 namespace dcpp {

=== modified file 'dcpp/UserConnectionListener.h'
--- dcpp/UserConnectionListener.h	2013-08-19 20:13:24 +0000
+++ dcpp/UserConnectionListener.h	2013-12-06 00:08:00 +0000
@@ -21,7 +21,6 @@
 
 #include "forward.h"
 #include "AdcCommand.h"
-#include "noexcept.h"
 #include "Util.h"
 
 namespace dcpp {

=== modified file 'dcpp/Util.h'
--- dcpp/Util.h	2013-11-29 20:41:48 +0000
+++ dcpp/Util.h	2013-12-06 00:08:00 +0000
@@ -87,17 +87,13 @@
 int compare(const wchar_t* a, const wchar_t* b);
 
 /** Uses SFINAE to determine whether a type provides a function; stores the result in "value".
-Inspired by <http://stackoverflow.com/a/8752988>.
-Note that checkRet & check could be merged into 1 function, but VS 11 doesn't like having a
-decltype inside that enable_if; so the 2 checks are separate. */
+Inspired by <http://stackoverflow.com/a/8752988>. */
 #define HAS_FUNC(name, funcRet, funcTest) \
 	template<typename HAS_FUNC_T> struct name { \
 		typedef char yes[1]; \
 		typedef char no[2]; \
-		template<typename HAS_FUNC_V> static void checkRet( \
-			typename std::enable_if<std::is_same<funcRet, HAS_FUNC_V>::value>::type*); \
 		template<typename HAS_FUNC_U> static yes& check( \
-			decltype(checkRet<decltype(std::declval<HAS_FUNC_U>().funcTest)>(nullptr))*); \
+			typename std::enable_if<std::is_same<funcRet, decltype(std::declval<HAS_FUNC_U>().funcTest)>::value>::type*); \
 		template<typename> static no& check(...); \
 		static const bool value = sizeof(check<HAS_FUNC_T>(nullptr)) == sizeof(yes); \
 	}

=== modified file 'dcpp/compiler.h'
--- dcpp/compiler.h	2013-08-08 18:04:01 +0000
+++ dcpp/compiler.h	2013-12-06 00:08:00 +0000
@@ -41,8 +41,8 @@
 #endif // _WIN32
 
 #elif defined(_MSC_VER)
-#if _MSC_VER < 1700 || _MSC_FULL_VER < 170051025
-#error Visual Studio 2012 with the Nov 2012 CTP is required
+#if _MSC_VER < 1800 || _MSC_FULL_VER < 180021114
+#error Visual Studio 2013 with the Nov 2013 CTP is required
 #endif
 
 //disable the deprecated warnings for the CRT functions.

=== removed file 'dcpp/noexcept.h'
--- dcpp/noexcept.h	2013-01-18 21:28:38 +0000
+++ dcpp/noexcept.h	1970-01-01 00:00:00 +0000
@@ -1,32 +0,0 @@
-/*
- * Copyright (C) 2001-2013 Jacek Sieka, arnetheduck on gmail point com
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- */
-
-#ifndef DCPLUSPLUS_DCPP_NOEXCEPT_H
-#define DCPLUSPLUS_DCPP_NOEXCEPT_H
-
-// for compilers that don't support noexcept, use an exception specifier
-
-#ifdef _MSC_VER
-
-#ifndef noexcept
-#define noexcept throw()
-#endif
-
-#endif
-
-#endif

=== modified file 'dwt/include/dwt/widgets/TableTree.h'
--- dwt/include/dwt/widgets/TableTree.h	2013-07-20 14:27:45 +0000
+++ dwt/include/dwt/widgets/TableTree.h	2013-12-06 00:08:00 +0000
@@ -101,11 +101,7 @@
 	void handleInsert(LVITEM& lv);
 	int handleSort(LPARAM& lhs, LPARAM& rhs);
 
-#ifndef _MSC_VER /// @todo workaround for VS' sucky decltype
 	void eraseChild(decltype(children)::iterator& child, bool deleting);
-#else
-	void eraseChild(std::unordered_map<LPARAM, LPARAM>::iterator& child, bool deleting);
-#endif
 
 	LRESULT sendMsg(UINT msg, WPARAM wParam, LPARAM lParam);
 };

=== modified file 'dwt/src/widgets/TableTree.cpp'
--- dwt/src/widgets/TableTree.cpp	2013-07-20 14:27:45 +0000
+++ dwt/src/widgets/TableTree.cpp	2013-12-06 00:08:00 +0000
@@ -361,11 +361,7 @@
 	return 0;
 }
 
-#ifndef _MSC_VER /// @todo workaround for VS' sucky decltype
 void TableTree::eraseChild(decltype(children)::iterator& child, bool deleting) {
-#else
-void TableTree::eraseChild(std::unordered_map<LPARAM, LPARAM>::iterator& child, bool deleting) {
-#endif
 	auto& item = items[child->second];
 	auto& cont = item.children;
 	if(!deleting && item.expanded) {

=== modified file 'dwt/test/SConscript'
--- dwt/test/SConscript	2013-08-08 18:48:28 +0000
+++ dwt/test/SConscript	2013-12-06 00:08:00 +0000
@@ -7,7 +7,7 @@
 dev.add_boost(env)
 
 if dev.is_win32():
-	env.Append(LIBS = ['comctl32', 'comdlg32', 'ole32', 'oleaut32', 'shlwapi', 'uuid', 'uxtheme', 'winmm'])
+	env.Append(LIBS = ['comctl32', 'comdlg32', 'gdi32', 'ole32', 'oleaut32', 'shlwapi', 'uuid', 'uxtheme', 'winmm'])
 
 env.Append(CPPPATH = ['#/dwt/include'])
 

=== removed file 'msvc/nov2012ctp.patch'
--- msvc/nov2012ctp.patch	2012-11-14 19:53:25 +0000
+++ msvc/nov2012ctp.patch	1970-01-01 00:00:00 +0000
@@ -1,37 +0,0 @@
-This patch is to be applied to MSVC 2012's VC/vcvarsall.bat file so that it uses the Nov 2012 CTP
-toolset by default when compiling from the command line.
-
---- vcvarsall - original.bat	2011-12-12 12:52:48.000000000 +0100
-+++ vcvarsall.bat	2012-11-05 19:00:44.875000000 +0100
-@@ -13,11 +13,15 @@
- :x86
- if not exist "%~dp0bin\vcvars32.bat" goto missing
- call "%~dp0bin\vcvars32.bat"
-+set PATH=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2012 CTP\bin;%PATH%
-+set INCLUDE=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2012 CTP\include;%INCLUDE%
- goto :SetVisualStudioVersion
- 
- :amd64
- if not exist "%~dp0bin\amd64\vcvars64.bat" goto missing
- call "%~dp0bin\amd64\vcvars64.bat"
-+set PATH=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2012 CTP\bin\amd64;%PATH%
-+set INCLUDE=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2012 CTP\include;%INCLUDE%
- goto :SetVisualStudioVersion
- 
- :arm
-@@ -28,11 +32,15 @@
- :x86_amd64
- if not exist "%~dp0bin\x86_amd64\vcvarsx86_amd64.bat" goto missing
- call "%~dp0bin\x86_amd64\vcvarsx86_amd64.bat"
-+set PATH=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2012 CTP\bin\x86_amd64;%PATH%
-+set INCLUDE=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2012 CTP\include;%INCLUDE%
- goto :SetVisualStudioVersion
- 
- :x86_arm
- if not exist "%~dp0bin\x86_arm\vcvarsx86_arm.bat" goto missing
- call "%~dp0bin\x86_arm\vcvarsx86_arm.bat"
-+set PATH=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2012 CTP\bin\x86_arm;%PATH%
-+set INCLUDE=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2012 CTP\include;%INCLUDE%
- goto :SetVisualStudioVersion
- 
- :SetVisualStudioVersion

=== added file 'msvc/nov2013ctp.patch'
--- msvc/nov2013ctp.patch	1970-01-01 00:00:00 +0000
+++ msvc/nov2013ctp.patch	2013-12-06 00:08:00 +0000
@@ -0,0 +1,57 @@
+This patch is to be applied to MSVC 2013's VC/vcvarsall.bat file so that it uses the Nov 2013 CTP
+toolset by default when compiling from the command line.
+
+--- vcvarsall - original.bat	2013-12-06 00:25:34.043435400 +0100
++++ vcvarsall.bat	2013-12-06 00:27:17.393617000 +0100
+@@ -15,11 +15,17 @@
+ :x86
+ if not exist "%~dp0bin\vcvars32.bat" goto missing
+ call "%~dp0bin\vcvars32.bat"
++set PATH=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\bin;%PATH%
++set INCLUDE=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\include;%INCLUDE%
++set LIB=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\lib;%LIB%
+ goto :SetVisualStudioVersion
+ 
+ :amd64
+ if not exist "%~dp0bin\amd64\vcvars64.bat" goto missing
+ call "%~dp0bin\amd64\vcvars64.bat"
++set PATH=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\bin\amd64;%PATH%
++set INCLUDE=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\include;%INCLUDE%
++set LIB=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\lib\amd64;%LIB%
+ goto :SetVisualStudioVersion
+ 
+ :arm
+@@ -30,21 +36,33 @@
+ :x86_amd64
+ if not exist "%~dp0bin\x86_amd64\vcvarsx86_amd64.bat" goto missing
+ call "%~dp0bin\x86_amd64\vcvarsx86_amd64.bat"
++set PATH=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\bin\x86_amd64;%PATH%
++set INCLUDE=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\include;%INCLUDE%
++set LIB=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\lib\amd64;%LIB%
+ goto :SetVisualStudioVersion
+ 
+ :x86_arm
+ if not exist "%~dp0bin\x86_arm\vcvarsx86_arm.bat" goto missing
+ call "%~dp0bin\x86_arm\vcvarsx86_arm.bat"
++set PATH=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\bin\x86_arm;%PATH%
++set INCLUDE=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\include;%INCLUDE%
++set LIB=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\lib\arm;%LIB%
+ goto :SetVisualStudioVersion
+ 
+ :amd64_x86
+ if not exist "%~dp0bin\amd64_x86\vcvarsamd64_x86.bat" goto missing
+ call "%~dp0bin\amd64_x86\vcvarsamd64_x86.bat"
++set PATH=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\bin\amd64_x86;%PATH%
++set INCLUDE=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\include;%INCLUDE%
++set LIB=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\lib;%LIB%
+ goto :SetVisualStudioVersion
+ 
+ :amd64_arm
+ if not exist "%~dp0bin\amd64_arm\vcvarsamd64_arm.bat" goto missing
+ call "%~dp0bin\amd64_arm\vcvarsamd64_arm.bat"
++set PATH=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\bin\amd64_arm;%PATH%
++set INCLUDE=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\include;%INCLUDE%
++set LIB=C:\Program Files (x86)\Microsoft Visual C++ Compiler Nov 2013 CTP\lib\arm;%LIB%
+ goto :SetVisualStudioVersion
+ 
+ :SetVisualStudioVersion

=== modified file 'openssl/build/build.bat'
--- openssl/build/build.bat	2013-03-03 21:14:12 +0000
+++ openssl/build/build.bat	2013-12-06 00:08:00 +0000
@@ -3,7 +3,7 @@
 echo on
 if errorlevel 2 goto end
 
-set VCDIR=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC
+set VCDIR=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
 
 mv ../include/openssl/opensslconf.h .
 rm -rf ../include ../lib

=== modified file 'win32/compiler.h'
--- win32/compiler.h	2013-04-23 17:57:04 +0000
+++ win32/compiler.h	2013-12-06 00:08:00 +0000
@@ -27,8 +27,8 @@
 #endif
 
 #elif defined(_MSC_VER)
-#if _MSC_VER < 1700 || _MSC_FULL_VER < 170051025
-#error Visual Studio 2012 with the Nov 2012 CTP is required
+#if _MSC_VER < 1800 || _MSC_FULL_VER < 180021114
+#error Visual Studio 2013 with the Nov 2013 CTP is required
 #endif
 
 #else