summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-11-24 20:33:19 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-11-24 20:35:17 (GMT)
commit332d60c56dfaa11fdd135088279d15cd5983b3d4 (patch)
treedd77717a4e1732da929d5ff8a0471fa3f005e201 /3rdParty/Boost/src/boost/system
parent90c44a10fec26d2a0935b2d62e82b6a5be028373 (diff)
downloadswift-332d60c56dfaa11fdd135088279d15cd5983b3d4.zip
swift-332d60c56dfaa11fdd135088279d15cd5983b3d4.tar.bz2
Upgraded Boost to 1.45.0.
Diffstat (limited to '3rdParty/Boost/src/boost/system')
-rw-r--r--3rdParty/Boost/src/boost/system/api_config.hpp42
-rw-r--r--3rdParty/Boost/src/boost/system/config.hpp47
-rw-r--r--3rdParty/Boost/src/boost/system/error_code.hpp32
-rw-r--r--3rdParty/Boost/src/boost/system/system_error.hpp13
4 files changed, 76 insertions, 58 deletions
diff --git a/3rdParty/Boost/src/boost/system/api_config.hpp b/3rdParty/Boost/src/boost/system/api_config.hpp
new file mode 100644
index 0000000..28b8bec
--- /dev/null
+++ b/3rdParty/Boost/src/boost/system/api_config.hpp
@@ -0,0 +1,42 @@
+// boost/system/api_config.hpp -------------------------------------------------------//
+
+// Copyright Beman Dawes 2003, 2006, 2010
+
+// Distributed under the Boost Software License, Version 1.0.
+// See http://www.boost.org/LICENSE_1_0.txt
+
+// See http://www.boost.org/libs/system for documentation.
+
+//--------------------------------------------------------------------------------------//
+
+// Boost.System calls operating system API functions to implement system error category
+// functions. Usually there is no question as to which API is to be used.
+//
+// In the case of MinGW or Cygwin/MinGW, however, both POSIX and Windows API's are
+// available. Chaos ensues if other code thinks one is in use when Boost.System was
+// actually built with the other. This header centralizes the API choice and prevents
+// user definition of API macros, thus elminating the possibility of mismatches and the
+// need to test configurations with little or no practical value.
+//
+
+//--------------------------------------------------------------------------------------//
+
+#ifndef BOOST_SYSTEM_API_CONFIG_HPP
+#define BOOST_SYSTEM_API_CONFIG_HPP
+
+# if defined(BOOST_POSIX_API) || defined(BOOST_WINDOWS_API)
+# error user defined BOOST_POSIX_API or BOOST_WINDOWS_API not supported
+# endif
+
+// BOOST_POSIX_API or BOOST_WINDOWS_API specify which API to use
+// Cygwin/MinGW does not predefine _WIN32.
+// Standalone MinGW and all other known Windows compilers do predefine _WIN32
+// Compilers that predefine _WIN32 or __MINGW32__ do so for Windows 64-bit builds too.
+
+# if defined(_WIN32) || defined(__CYGWIN__) // Windows default, including MinGW and Cygwin
+# define BOOST_WINDOWS_API
+# else
+# define BOOST_POSIX_API
+# endif
+
+#endif // BOOST_SYSTEM_API_CONFIG_HPP
diff --git a/3rdParty/Boost/src/boost/system/config.hpp b/3rdParty/Boost/src/boost/system/config.hpp
index fa09099..bf78051 100644
--- a/3rdParty/Boost/src/boost/system/config.hpp
+++ b/3rdParty/Boost/src/boost/system/config.hpp
@@ -1,4 +1,4 @@
-// boost/system/config.hpp -------------------------------------------------//
+// boost/system/config.hpp -----------------------------------------------------------//
// Copyright Beman Dawes 2003, 2006
@@ -11,47 +11,24 @@
#define BOOST_SYSTEM_CONFIG_HPP
#include <boost/config.hpp>
+#include <boost/system/api_config.hpp> // for BOOST_POSIX_API or BOOST_WINDOWS_API
-// BOOST_POSIX_API or BOOST_WINDOWS_API specify which API to use.
-// If not specified, a sensible default will be applied.
+// This header implements separate compilation features as described in
+// http://www.boost.org/more/separate_compilation.html
-# if defined( BOOST_WINDOWS_API ) && defined( BOOST_POSIX_API )
-# error both BOOST_WINDOWS_API and BOOST_POSIX_API are defined
-# elif !defined( BOOST_WINDOWS_API ) && !defined( BOOST_POSIX_API )
-# if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) || defined(__CYGWIN__)
-# define BOOST_WINDOWS_API
-# else
-# define BOOST_POSIX_API
-# endif
-# endif
-
-// enable dynamic linking on Windows ---------------------------------------//
-
-//# if (defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)) && defined(__BORLANDC__) && defined(__WIN32__)
-//# error Dynamic linking Boost.System does not work for Borland; use static linking instead
-//# endif
+// enable dynamic or static linking as requested --------------------------------------//
-#ifdef BOOST_HAS_DECLSPEC // defined in config system
-// we need to import/export our code only if the user has specifically
-// asked for it by defining either BOOST_ALL_DYN_LINK if they want all boost
-// libraries to be dynamically linked, or BOOST_SYSTEM_DYN_LINK
-// if they want just this one to be dynamically liked:
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
-// export if this is our own source, otherwise import:
-#ifdef BOOST_SYSTEM_SOURCE
-# define BOOST_SYSTEM_DECL __declspec(dllexport)
+# if defined(BOOST_SYSTEM_SOURCE)
+# define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT
+# else
+# define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT
+# endif
#else
-# define BOOST_SYSTEM_DECL __declspec(dllimport)
-#endif // BOOST_SYSTEM_SOURCE
-#endif // DYN_LINK
-#endif // BOOST_HAS_DECLSPEC
-//
-// if BOOST_SYSTEM_DECL isn't defined yet define it now:
-#ifndef BOOST_SYSTEM_DECL
-#define BOOST_SYSTEM_DECL
+# define BOOST_SYSTEM_DECL
#endif
-// enable automatic library variant selection ------------------------------//
+// enable automatic library variant selection ----------------------------------------//
#if !defined(BOOST_SYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SYSTEM_NO_LIB)
//
diff --git a/3rdParty/Boost/src/boost/system/error_code.hpp b/3rdParty/Boost/src/boost/system/error_code.hpp
index d0eb6c5..b22775f 100644
--- a/3rdParty/Boost/src/boost/system/error_code.hpp
+++ b/3rdParty/Boost/src/boost/system/error_code.hpp
@@ -202,18 +202,18 @@ namespace boost
// predefined error categories -----------------------------------------//
- BOOST_SYSTEM_DECL const error_category & get_system_category();
- BOOST_SYSTEM_DECL const error_category & get_generic_category();
+ BOOST_SYSTEM_DECL const error_category & system_category();
+ BOOST_SYSTEM_DECL const error_category & generic_category();
+
+ // deprecated synonyms --------------------------------------------------//
- static const error_category & system_category = get_system_category();
- static const error_category & generic_category = get_generic_category();
-
# ifndef BOOST_SYSTEM_NO_DEPRECATED
- // deprecated synonyms
- inline const error_category & get_posix_category() { return get_generic_category(); }
- static const error_category & posix_category = get_generic_category();
- static const error_category & errno_ecat = get_generic_category();
- static const error_category & native_ecat = get_system_category();
+ inline const error_category & get_system_category() { return system_category(); }
+ inline const error_category & get_generic_category() { return generic_category(); }
+ inline const error_category & get_posix_category() { return generic_category(); }
+ static const error_category & posix_category = generic_category();
+ static const error_category & errno_ecat = generic_category();
+ static const error_category & native_ecat = system_category();
# endif
// class error_condition -----------------------------------------------//
@@ -225,7 +225,7 @@ namespace boost
public:
// constructors:
- error_condition() : m_val(0), m_cat(&get_generic_category()) {}
+ error_condition() : m_val(0), m_cat(&generic_category()) {}
error_condition( int val, const error_category & cat ) : m_val(val), m_cat(&cat) {}
template <class ErrorConditionEnum>
@@ -254,7 +254,7 @@ namespace boost
void clear()
{
m_val = 0;
- m_cat = &get_generic_category();
+ m_cat = &generic_category();
}
// observers:
@@ -312,7 +312,7 @@ namespace boost
public:
// constructors:
- error_code() : m_val(0), m_cat(&get_system_category()) {}
+ error_code() : m_val(0), m_cat(&system_category()) {}
error_code( int val, const error_category & cat ) : m_val(val), m_cat(&cat) {}
template <class ErrorCodeEnum>
@@ -340,7 +340,7 @@ namespace boost
void clear()
{
m_val = 0;
- m_cat = &get_system_category();
+ m_cat = &system_category();
}
// observers:
@@ -473,11 +473,11 @@ namespace boost
{
// explicit conversion:
inline error_code make_error_code( errc_t e )
- { return error_code( e, get_generic_category() ); }
+ { return error_code( e, generic_category() ); }
// implicit conversion:
inline error_condition make_error_condition( errc_t e )
- { return error_condition( e, get_generic_category() ); }
+ { return error_condition( e, generic_category() ); }
}
// error_category default implementation -------------------------------//
diff --git a/3rdParty/Boost/src/boost/system/system_error.hpp b/3rdParty/Boost/src/boost/system/system_error.hpp
index 4091647..065d365 100644
--- a/3rdParty/Boost/src/boost/system/system_error.hpp
+++ b/3rdParty/Boost/src/boost/system/system_error.hpp
@@ -17,9 +17,11 @@ namespace boost
{
namespace system
{
- // class system_error --------------------------------------------------//
+ // class system_error ------------------------------------------------------------//
- class system_error : public std::runtime_error
+ class BOOST_SYMBOL_VISIBLE system_error : public std::runtime_error
+ // BOOST_SYMBOL_VISIBLE is needed by GCC to ensure system_error thrown from a shared
+ // library can be caught. See svn.boost.org/trac/boost/ticket/3697
{
public:
system_error( error_code ec )
@@ -62,11 +64,8 @@ namespace boost
try
{
m_what = this->std::runtime_error::what();
- if ( m_error_code )
- {
- if ( !m_what.empty() ) m_what += ": ";
- m_what += m_error_code.message();
- }
+ if ( !m_what.empty() ) m_what += ": ";
+ m_what += m_error_code.message();
}
catch (...) { return std::runtime_error::what(); }
}