summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/asio/error.hpp')
-rw-r--r--3rdParty/Boost/src/boost/asio/error.hpp21
1 files changed, 15 insertions, 6 deletions
diff --git a/3rdParty/Boost/src/boost/asio/error.hpp b/3rdParty/Boost/src/boost/asio/error.hpp
index 331297b..7bcc00f 100644
--- a/3rdParty/Boost/src/boost/asio/error.hpp
+++ b/3rdParty/Boost/src/boost/asio/error.hpp
@@ -1,74 +1,83 @@
//
// error.hpp
// ~~~~~~~~~
//
-// Copyright (c) 2003-2012 Christopher M. Kohlhoff (chris at kohlhoff dot com)
+// Copyright (c) 2003-2014 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_ASIO_ERROR_HPP
#define BOOST_ASIO_ERROR_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
#include <boost/cerrno.hpp>
#include <boost/system/error_code.hpp>
-#if defined(BOOST_WINDOWS) || defined(__CYGWIN__)
+#include <boost/system/system_error.hpp>
+#if defined(BOOST_ASIO_WINDOWS) \
+ || defined(__CYGWIN__) \
+ || defined(BOOST_ASIO_WINDOWS_RUNTIME)
# include <winerror.h>
#else
# include <cerrno>
# include <netdb.h>
#endif
#if defined(GENERATING_DOCUMENTATION)
/// INTERNAL ONLY.
# define BOOST_ASIO_NATIVE_ERROR(e) implementation_defined
/// INTERNAL ONLY.
# define BOOST_ASIO_SOCKET_ERROR(e) implementation_defined
/// INTERNAL ONLY.
# define BOOST_ASIO_NETDB_ERROR(e) implementation_defined
/// INTERNAL ONLY.
# define BOOST_ASIO_GETADDRINFO_ERROR(e) implementation_defined
/// INTERNAL ONLY.
# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) implementation_defined
-#elif defined(BOOST_WINDOWS) || defined(__CYGWIN__)
+#elif defined(BOOST_ASIO_WINDOWS_RUNTIME)
+# define BOOST_ASIO_NATIVE_ERROR(e) __HRESULT_FROM_WIN32(e)
+# define BOOST_ASIO_SOCKET_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e)
+# define BOOST_ASIO_NETDB_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e)
+# define BOOST_ASIO_GETADDRINFO_ERROR(e) __HRESULT_FROM_WIN32(WSA ## e)
+# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_win
+#elif defined(BOOST_ASIO_WINDOWS) || defined(__CYGWIN__)
# define BOOST_ASIO_NATIVE_ERROR(e) e
# define BOOST_ASIO_SOCKET_ERROR(e) WSA ## e
# define BOOST_ASIO_NETDB_ERROR(e) WSA ## e
# define BOOST_ASIO_GETADDRINFO_ERROR(e) WSA ## e
# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_win
#else
# define BOOST_ASIO_NATIVE_ERROR(e) e
# define BOOST_ASIO_SOCKET_ERROR(e) e
# define BOOST_ASIO_NETDB_ERROR(e) e
# define BOOST_ASIO_GETADDRINFO_ERROR(e) e
# define BOOST_ASIO_WIN_OR_POSIX(e_win, e_posix) e_posix
#endif
#include <boost/asio/detail/push_options.hpp>
namespace boost {
namespace asio {
namespace error {
enum basic_errors
{
/// Permission denied.
access_denied = BOOST_ASIO_SOCKET_ERROR(EACCES),
/// Address family not supported by protocol.
address_family_not_supported = BOOST_ASIO_SOCKET_ERROR(EAFNOSUPPORT),
/// Address already in use.
address_in_use = BOOST_ASIO_SOCKET_ERROR(EADDRINUSE),
/// Transport endpoint is already connected.
already_connected = BOOST_ASIO_SOCKET_ERROR(EISCONN),
/// Operation already in progress.
already_started = BOOST_ASIO_SOCKET_ERROR(EALREADY),
@@ -184,91 +193,91 @@ enum netdb_errors
};
enum addrinfo_errors
{
/// The service is not supported for the given socket type.
service_not_found = BOOST_ASIO_WIN_OR_POSIX(
BOOST_ASIO_NATIVE_ERROR(WSATYPE_NOT_FOUND),
BOOST_ASIO_GETADDRINFO_ERROR(EAI_SERVICE)),
/// The socket type is not supported.
socket_type_not_supported = BOOST_ASIO_WIN_OR_POSIX(
BOOST_ASIO_NATIVE_ERROR(WSAESOCKTNOSUPPORT),
BOOST_ASIO_GETADDRINFO_ERROR(EAI_SOCKTYPE))
};
enum misc_errors
{
/// Already open.
already_open = 1,
/// End of file or stream.
eof,
/// Element not found.
not_found,
/// The descriptor cannot fit into the select system call's fd_set.
fd_set_failure
};
inline const boost::system::error_category& get_system_category()
{
return boost::system::system_category();
}
-#if !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
+#if !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
extern BOOST_ASIO_DECL
const boost::system::error_category& get_netdb_category();
extern BOOST_ASIO_DECL
const boost::system::error_category& get_addrinfo_category();
-#else // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
+#else // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
inline const boost::system::error_category& get_netdb_category()
{
return get_system_category();
}
inline const boost::system::error_category& get_addrinfo_category()
{
return get_system_category();
}
-#endif // !defined(BOOST_WINDOWS) && !defined(__CYGWIN__)
+#endif // !defined(BOOST_ASIO_WINDOWS) && !defined(__CYGWIN__)
extern BOOST_ASIO_DECL
const boost::system::error_category& get_misc_category();
static const boost::system::error_category& system_category
= boost::asio::error::get_system_category();
static const boost::system::error_category& netdb_category
= boost::asio::error::get_netdb_category();
static const boost::system::error_category& addrinfo_category
= boost::asio::error::get_addrinfo_category();
static const boost::system::error_category& misc_category
= boost::asio::error::get_misc_category();
} // namespace error
} // namespace asio
} // namespace boost
namespace boost {
namespace system {
template<> struct is_error_code_enum<boost::asio::error::basic_errors>
{
static const bool value = true;
};
template<> struct is_error_code_enum<boost::asio::error::netdb_errors>
{
static const bool value = true;
};
template<> struct is_error_code_enum<boost::asio::error::addrinfo_errors>
{
static const bool value = true;
};