Adding tools and scripts to download and build with Visual C++ BerkeleyDB, OpenSSL and Boost libraries
Adding Visual Studio 2012 solution and projects files
Using stdint.h header instead of POSIX-only unistd.h
Adding db.h include to use ssize_t and pid_t types from BerkeleyDB
Using SOCKET typedef only for non-Windows platforms
Adding compat.h include to use winsock2 functions
Fixing macro invocation IMPLEMENT_SERIALIZE for Visual C++

Adding typedefs for info map and buckets to use them in address manager IMPLEMENT_SERIALIZE
Fixing CTxDestination compilation with Visual C++
Using template CScript constructor for range-based inserts instead of overloads
Using template member function CDataStream::insert() for range-based inserts instead of 3 identical overloads
Adding FUNCTION_NAME macro, using it with Visual C++ instead of GCC-only
__PRETTY_FUNCTION__ macro
Moving CBlockIndexWorkComparator declaration before its usage in declaration of setBlockIndexValid
Removing undefined behavior in a global LockedPageManager instance initialization

Since creation order of global objects is undefined, LockedPageManager::instance has been used before construction. Replaced the object LockedPageManager::instance to the static function LockedPageManager::instance() to create the LockedPageManager instance on demand.
Removing undefined behavior for accessing vector elements with invalid indexes

Behavior is undefined for accessing vector[n] if n >= vector.size()