Index: boost/thread/detail/tss_hooks.hpp =================================================================== --- boost/thread/detail/tss_hooks.hpp (revision 41287) +++ boost/thread/detail/tss_hooks.hpp (working copy) @@ -30,7 +30,7 @@ #if defined(BOOST_HAS_WINTHREADS) - extern "C" BOOST_THREAD_DECL void on_process_enter(void); + extern "C" BOOST_THREAD_DECL void __cdecl on_process_enter(void); //Function to be called when the exe or dll //that uses Boost.Threads first starts //or is first loaded. @@ -40,7 +40,7 @@ //a method for doing so has been discovered. //May be omitted; may be called multiple times. - extern "C" BOOST_THREAD_DECL void on_process_exit(void); + extern "C" BOOST_THREAD_DECL void __cdecl on_process_exit(void); //Function to be called when the exe or dll //that uses Boost.Threads first starts //or is first loaded. @@ -50,7 +50,7 @@ //a method for doing so has been discovered. //Must not be omitted; may be called multiple times. - extern "C" BOOST_THREAD_DECL void on_thread_enter(void); + extern "C" BOOST_THREAD_DECL void __cdecl on_thread_enter(void); //Function to be called just after a thread starts //in an exe or dll that uses Boost.Threads. //Must be called in the context of the thread @@ -59,7 +59,7 @@ //a method for doing so has been discovered. //May be omitted; may be called multiple times. - extern "C" BOOST_THREAD_DECL void on_thread_exit(void); + extern "C" BOOST_THREAD_DECL void __cdecl on_thread_exit(void); //Function to be called just be fore a thread ends //in an exe or dll that uses Boost.Threads. //Must be called in the context of the thread Index: libs/thread/src/win32/thread.cpp =================================================================== --- libs/thread/src/win32/thread.cpp (revision 41287) +++ libs/thread/src/win32/thread.cpp (working copy) @@ -533,16 +533,16 @@ } -extern "C" BOOST_THREAD_DECL void on_process_enter() +extern "C" BOOST_THREAD_DECL void __cdecl on_process_enter() {} -extern "C" BOOST_THREAD_DECL void on_thread_enter() +extern "C" BOOST_THREAD_DECL void __cdecl on_thread_enter() {} -extern "C" BOOST_THREAD_DECL void on_process_exit() +extern "C" BOOST_THREAD_DECL void __cdecl on_process_exit() {} -extern "C" BOOST_THREAD_DECL void on_thread_exit() +extern "C" BOOST_THREAD_DECL void __cdecl on_thread_exit() { boost::run_thread_exit_callbacks(); } Index: libs/thread/src/win32/tss_pe.cpp =================================================================== --- libs/thread/src/win32/tss_pe.cpp (revision 41287) +++ libs/thread/src/win32/tss_pe.cpp (working copy) @@ -91,11 +91,11 @@ #if (_MSC_VER < 1300) // 1300 == VC++ 7.0 typedef void (__cdecl *_PVFV)(void); #define INIRETSUCCESS - #define PVAPI void + #define PVAPI void __cdecl #else typedef int (__cdecl *_PVFV)(void); #define INIRETSUCCESS 0 - #define PVAPI int + #define PVAPI int __cdecl #endif typedef void (NTAPI* _TLSCB)(HINSTANCE, DWORD, PVOID);