Ticket #1470: BTL-calling-conv.diff

File BTL-calling-conv.diff, 3.3 KB (added by Francois Barel, 15 years ago)
  • boost/thread/detail/tss_hooks.hpp

     
    3030
    3131#if defined(BOOST_HAS_WINTHREADS)
    3232
    33     extern "C" BOOST_THREAD_DECL void on_process_enter(void);
     33    extern "C" BOOST_THREAD_DECL void __cdecl on_process_enter(void);
    3434        //Function to be called when the exe or dll
    3535            //that uses Boost.Threads first starts
    3636            //or is first loaded.
     
    4040            //a method for doing so has been discovered.
    4141        //May be omitted; may be called multiple times.
    4242
    43     extern "C" BOOST_THREAD_DECL void on_process_exit(void);
     43    extern "C" BOOST_THREAD_DECL void __cdecl on_process_exit(void);
    4444        //Function to be called when the exe or dll
    4545            //that uses Boost.Threads first starts
    4646            //or is first loaded.
     
    5050            //a method for doing so has been discovered.
    5151        //Must not be omitted; may be called multiple times.
    5252
    53     extern "C" BOOST_THREAD_DECL void on_thread_enter(void);
     53    extern "C" BOOST_THREAD_DECL void __cdecl on_thread_enter(void);
    5454        //Function to be called just after a thread starts
    5555            //in an exe or dll that uses Boost.Threads.
    5656        //Must be called in the context of the thread
     
    5959            //a method for doing so has been discovered.
    6060        //May be omitted; may be called multiple times.
    6161
    62     extern "C" BOOST_THREAD_DECL void on_thread_exit(void);
     62    extern "C" BOOST_THREAD_DECL void __cdecl on_thread_exit(void);
    6363        //Function to be called just be fore a thread ends
    6464            //in an exe or dll that uses Boost.Threads.
    6565        //Must be called in the context of the thread
  • libs/thread/src/win32/thread.cpp

     
    533533}
    534534
    535535
    536 extern "C" BOOST_THREAD_DECL void on_process_enter()
     536extern "C" BOOST_THREAD_DECL void __cdecl on_process_enter()
    537537{}
    538538
    539 extern "C" BOOST_THREAD_DECL void on_thread_enter()
     539extern "C" BOOST_THREAD_DECL void __cdecl on_thread_enter()
    540540{}
    541541
    542 extern "C" BOOST_THREAD_DECL void on_process_exit()
     542extern "C" BOOST_THREAD_DECL void __cdecl on_process_exit()
    543543{}
    544544
    545 extern "C" BOOST_THREAD_DECL void on_thread_exit()
     545extern "C" BOOST_THREAD_DECL void __cdecl on_thread_exit()
    546546{
    547547    boost::run_thread_exit_callbacks();
    548548}
  • libs/thread/src/win32/tss_pe.cpp

     
    9191    #if (_MSC_VER < 1300) // 1300 == VC++ 7.0
    9292        typedef void (__cdecl *_PVFV)(void);
    9393        #define INIRETSUCCESS
    94         #define PVAPI void
     94        #define PVAPI void __cdecl
    9595    #else
    9696        typedef int (__cdecl *_PVFV)(void);
    9797        #define INIRETSUCCESS 0
    98         #define PVAPI int
     98        #define PVAPI int __cdecl
    9999    #endif
    100100
    101101    typedef void (NTAPI* _TLSCB)(HINSTANCE, DWORD, PVOID);