Details
Description
This patch is based on Alex's Boost threads patch (THRIFT-1361) and adds support in the MSVC project to build with Boost threads instead of Pthreads. The option is configurable using "#define HAVE_PTHREAD_H" in thrift/lib/cpp/src/windows/config.h (default is to build using Boost threads). In order to support building either way, I wrapped #if(n)def USE_BOOST_THREAD around Monitor.cpp, Mutex.cpp, PosixThreadFactory.cpp and their analogous Boost versions (BoostMonitor.cpp, BoostMutex.cpp, BoostThreadFactory.cpp).
Remember that any code calling errno should add force_inc.h to the project's Force Include list. This tripped me up in TNonblockingServer.cpp when errno would always return 0. Using the project properties is more opaque but we can't add force_inc.h to config.h because any project using the thrift library will get the forced redefinitions (not good if the app expects the MS SDK definitions).
I also adjusted the thrift library projects to generate appropriately named pdb files. They were defaulting to vc100.pdb, causing one project's build to stomp over the other's pdb.
The patch was created using TortoiseHg workbench. Please notify me if the format isn't compatible with the Thrift team's patch tool and I will modify the patch accordingly.