Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62718 - trunk/libs/thread/src/win32
From: anthony_at_[hidden]
Date: 2010-06-10 03:40:13


Author: anthonyw
Date: 2010-06-10 03:40:12 EDT (Thu, 10 Jun 2010)
New Revision: 62718
URL: http://svn.boost.org/trac/boost/changeset/62718

Log:
Added __cdecl to PVAPI. Fix for issue #1470

Text files modified:
   trunk/libs/thread/src/win32/tss_pe.cpp | 26 +++++++++++++-------------
   1 files changed, 13 insertions(+), 13 deletions(-)

Modified: trunk/libs/thread/src/win32/tss_pe.cpp
==============================================================================
--- trunk/libs/thread/src/win32/tss_pe.cpp (original)
+++ trunk/libs/thread/src/win32/tss_pe.cpp 2010-06-10 03:40:12 EDT (Thu, 10 Jun 2010)
@@ -40,9 +40,9 @@
 
 extern "C" {
 
- void (* after_ctors )(void) __attribute__((section(".ctors"))) = boost::on_process_enter;
- void (* before_dtors)(void) __attribute__((section(".dtors"))) = boost::on_thread_exit;
- void (* after_dtors )(void) __attribute__((section(".dtors.zzz"))) = boost::on_process_exit;
+ void (* after_ctors )() __attribute__((section(".ctors"))) = boost::on_process_enter;
+ void (* before_dtors)() __attribute__((section(".dtors"))) = boost::on_thread_exit;
+ void (* after_dtors )() __attribute__((section(".dtors.zzz"))) = boost::on_process_exit;
 
     ULONG __tls_index__ = 0;
     char __tls_end__ __attribute__((section(".tls$zzz"))) = 0;
@@ -77,13 +77,13 @@
     //Definitions required by implementation
 
     #if (_MSC_VER < 1300) // 1300 == VC++ 7.0
- typedef void (__cdecl *_PVFV)(void);
+ typedef void (__cdecl *_PVFV)();
         #define INIRETSUCCESS
- #define PVAPI void
+ #define PVAPI void __cdecl
     #else
- typedef int (__cdecl *_PVFV)(void);
+ typedef int (__cdecl *_PVFV)();
         #define INIRETSUCCESS 0
- #define PVAPI int
+ #define PVAPI int __cdecl
     #endif
 
     typedef void (NTAPI* _TLSCB)(HINSTANCE, DWORD, PVOID);
@@ -100,9 +100,9 @@
     {
         //Forward declarations
 
- static PVAPI on_tls_prepare(void);
- static PVAPI on_process_init(void);
- static PVAPI on_process_term(void);
+ static PVAPI on_tls_prepare();
+ static PVAPI on_process_init();
+ static PVAPI on_process_term();
         static void NTAPI on_tls_callback(HINSTANCE, DWORD, PVOID);
 
         //The .CRT$Xxx information is taken from Codeguru:
@@ -157,7 +157,7 @@
 #pragma warning(disable:4189)
 #endif
 
- PVAPI on_tls_prepare(void)
+ PVAPI on_tls_prepare()
         {
             //The following line has an important side effect:
             //if the TLS directory is not already there, it will
@@ -198,7 +198,7 @@
 #pragma warning(pop)
 #endif
 
- PVAPI on_process_init(void)
+ PVAPI on_process_init()
         {
             //Schedule on_thread_exit() to be called for the main
             //thread before destructors of global objects have been
@@ -218,7 +218,7 @@
             return INIRETSUCCESS;
         }
 
- PVAPI on_process_term(void)
+ PVAPI on_process_term()
         {
             boost::on_process_exit();
             return INIRETSUCCESS;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk