summaryrefslogtreecommitdiff
path: root/boost/interprocess/errors.hpp
diff options
context:
space:
mode:
authorChanho Park <chanho61.park@samsung.com>2014-12-11 09:55:56 (GMT)
committerChanho Park <chanho61.park@samsung.com>2014-12-11 09:55:56 (GMT)
commit08c1e93fa36a49f49325a07fe91ff92c964c2b6c (patch)
tree7a7053ceb8874b28ec4b868d4c49b500008a102e /boost/interprocess/errors.hpp
parentbb4dd8289b351fae6b55e303f189127a394a1edd (diff)
downloadboost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.zip
boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.gz
boost-08c1e93fa36a49f49325a07fe91ff92c964c2b6c.tar.bz2
Imported Upstream version 1.57.0upstream/1.57.0
Diffstat (limited to 'boost/interprocess/errors.hpp')
-rw-r--r--boost/interprocess/errors.hpp29
1 files changed, 15 insertions, 14 deletions
diff --git a/boost/interprocess/errors.hpp b/boost/interprocess/errors.hpp
index 9eed55a..6d4572f 100644
--- a/boost/interprocess/errors.hpp
+++ b/boost/interprocess/errors.hpp
@@ -1,6 +1,6 @@
//////////////////////////////////////////////////////////////////////////////
//
-// (C) Copyright Ion Gaztanaga 2005-2011. Distributed under the Boost
+// (C) Copyright Ion Gaztanaga 2005-2012. 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)
//
@@ -24,7 +24,7 @@
#ifndef BOOST_INTERPROCESS_ERRORS_HPP
#define BOOST_INTERPROCESS_ERRORS_HPP
-#if (defined _MSC_VER) && (_MSC_VER >= 1200)
+#if defined(_MSC_VER)
# pragma once
#endif
@@ -33,7 +33,7 @@
#include <stdarg.h>
#include <string>
-#if (defined BOOST_INTERPROCESS_WINDOWS)
+#if defined (BOOST_INTERPROCESS_WINDOWS)
# include <boost/interprocess/detail/win32_api.hpp>
#else
# ifdef BOOST_HAS_UNISTD_H
@@ -42,17 +42,17 @@
# else //ifdef BOOST_HAS_UNISTD_H
# error Unknown platform
# endif //ifdef BOOST_HAS_UNISTD_H
-#endif //#if (defined BOOST_INTERPROCESS_WINDOWS)
+#endif //#if defined (BOOST_INTERPROCESS_WINDOWS)
//!\file
//!Describes the error numbering of interprocess classes
namespace boost {
namespace interprocess {
-/// @cond
+#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
inline int system_error_code() // artifact of POSIX and WINDOWS error reporting
{
- #if (defined BOOST_INTERPROCESS_WINDOWS)
+ #if defined (BOOST_INTERPROCESS_WINDOWS)
return winapi::get_last_error();
#else
return errno; // GCC 3.1 won't accept ::errno
@@ -60,7 +60,7 @@ inline int system_error_code() // artifact of POSIX and WINDOWS error reporting
}
-#if (defined BOOST_INTERPROCESS_WINDOWS)
+#if defined (BOOST_INTERPROCESS_WINDOWS)
inline void fill_system_message(int sys_err_code, std::string &str)
{
void *lpMsgBuf;
@@ -85,7 +85,7 @@ inline void fill_system_message(int sys_err_code, std::string &str)
inline void fill_system_message( int system_error, std::string &str)
{ str = std::strerror(system_error); }
# endif
-/// @endcond
+#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
enum error_code_t
{
@@ -115,11 +115,12 @@ enum error_code_t
invalid_argument,
timeout_when_locking_error,
timeout_when_waiting_error,
+ owner_dead_error
};
typedef int native_error_t;
-/// @cond
+#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
struct ec_xlate
{
native_error_t sys_ec;
@@ -128,7 +129,7 @@ struct ec_xlate
static const ec_xlate ec_table[] =
{
- #if (defined BOOST_INTERPROCESS_WINDOWS)
+ #if defined (BOOST_INTERPROCESS_WINDOWS)
{ /*ERROR_ACCESS_DENIED*/5L, security_error },
{ /*ERROR_INVALID_ACCESS*/12L, security_error },
{ /*ERROR_SHARING_VIOLATION*/32L, security_error },
@@ -161,7 +162,7 @@ static const ec_xlate ec_table[] =
{ /*ERROR_NOT_ENOUGH_MEMORY*/8L, out_of_memory_error },
{ /*ERROR_TOO_MANY_OPEN_FILES*/4L, out_of_resource_error },
{ /*ERROR_INVALID_ADDRESS*/487L, busy_error }
- #else //#if (defined BOOST_INTERPROCESS_WINDOWS)
+ #else //#if defined (BOOST_INTERPROCESS_WINDOWS)
{ EACCES, security_error },
{ EROFS, read_only_error },
{ EIO, io_error },
@@ -179,11 +180,11 @@ static const ec_xlate ec_table[] =
{ EMFILE, out_of_resource_error },
{ ENOENT, not_such_file_or_directory },
{ EINVAL, invalid_argument }
- #endif //#if (defined BOOST_INTERPROCESS_WINDOWS)
+ #endif //#if defined (BOOST_INTERPROCESS_WINDOWS)
};
inline error_code_t lookup_error(native_error_t err)
-{
+{
const ec_xlate *cur = &ec_table[0],
*end = cur + sizeof(ec_table)/sizeof(ec_xlate);
for (;cur != end; ++cur ){
@@ -226,7 +227,7 @@ struct error_info
native_error_t m_nat;
error_code_t m_ec;
};
-/// @endcond
+#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
} // namespace interprocess {
} // namespace boost