Update of /cvsroot/boost/boost/libs/thread/src
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv26395/libs/thread/src

Modified Files:
        exceptions.cpp 
Log Message:
Applying long outstanding patch. 
See:http://thread.gmane.org/gmane.comp.lib.boost.devel/118863/focus=118912 


Index: exceptions.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/thread/src/exceptions.cpp,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- exceptions.cpp      22 Dec 2006 09:40:17 -0000      1.12
+++ exceptions.cpp      11 Feb 2007 12:00:38 -0000      1.13
@@ -10,76 +10,6 @@
 #include <cstring>
 #include <string>
 
-# ifdef BOOST_NO_STDC_NAMESPACE
-namespace std { using ::strerror; }
-# endif
-
-// BOOST_POSIX or BOOST_WINDOWS specify which API to use.
-# if !defined( BOOST_WINDOWS ) && !defined( BOOST_POSIX )
-#   if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || 
defined(__CYGWIN__)
-#     define BOOST_WINDOWS
-#   else
-#     define BOOST_POSIX
-#   endif
-# endif
-
-# if defined( BOOST_WINDOWS )
-#   ifdef BOOST_NO_ANSI_APIS
-#       include <atlbase.h>
-#       include <atlconv.h>  // for USES_CONVERSION and A2CW
-#   endif
-#   include "windows.h"
-# else
-#   include <errno.h> // for POSIX error codes
-# endif
-
-namespace
-{
-
-std::string system_message(int sys_err_code)
-{
-    std::string str;
-# ifdef BOOST_WINDOWS
-    LPVOID lpMsgBuf;
-#       ifndef BOOST_NO_ANSI_APIS    
-        ::FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
-            FORMAT_MESSAGE_FROM_SYSTEM |
-            FORMAT_MESSAGE_IGNORE_INSERTS,
-            NULL,
-            sys_err_code,
-            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
-            (LPSTR)&lpMsgBuf,
-            0,
-            NULL);
-        str += static_cast<LPCSTR>(lpMsgBuf);
-        ::LocalFree(lpMsgBuf); // free the buffer
-#       else
-        ::FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER |
-            FORMAT_MESSAGE_FROM_SYSTEM |
-            FORMAT_MESSAGE_IGNORE_INSERTS,
-            NULL,
-            sys_err_code,
-            MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
-            (LPWSTR)&lpMsgBuf,
-            0,
-            NULL);
-        USES_CONVERSION;
-        str += static_cast<LPCWSTR>(lpMsgBuf);
-    :   :LocalFree(lpMsgBuf); // free the buffer
-#       endif    
-    while (str.size() && (str[str.size()-1] == '\n' ||
-               str[str.size()-1] == '\r'))
-    {
-        str.erase(str.size()-1);
-    }
-# else
-    str += std::strerror(errno);
-# endif
-    return str;
-}
-
-} // unnamed namespace
-
 namespace boost {
 
 thread_exception::thread_exception()
@@ -101,13 +31,6 @@
     return m_sys_err; 
 }
 
-const char* thread_exception::message() const
-{
-    if (m_sys_err != 0)
-        return system_message(m_sys_err).c_str();
-    return what();
-}
-
 lock_error::lock_error()
 {
 }


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs

Reply via email to