1 // boost/system/cygwin_error.hpp -------------------------------------------//
3 // Copyright Beman Dawes 2007
5 // Distributed under the Boost Software License, Version 1.0. (See accompanying
6 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 // See library home page at http://www.boost.org/libs/system
10 #ifndef BOOST_SYSTEM_CYGWIN_ERROR_HPP
11 #define BOOST_SYSTEM_CYGWIN_ERROR_HPP
13 #include <boost/config/pragma_message.hpp>
15 #if !defined(BOOST_ALLOW_DEPRECATED_HEADERS)
16 BOOST_PRAGMA_MESSAGE("This header is deprecated and is slated for removal."
17 " If you want it retained, please open an issue in github.com/boostorg/system.")
20 // This header is effectively empty for compiles on operating systems where
21 // it is not applicable.
25 #include <boost/system/error_code.hpp>
31 // To construct an error_code after a API error:
33 // error_code( errno, system_category() )
35 // User code should use the portable "posix" enums for POSIX errors; this
36 // allows such code to be portable to non-POSIX systems. For the non-POSIX
37 // errno values that POSIX-based systems typically provide in addition to
38 // POSIX values, use the system specific enums below.
40 namespace cygwin_error
48 } // namespace cygwin_error
50 template<> struct is_error_code_enum<cygwin_error::cygwin_errno>
51 { static const bool value = true; };
53 namespace cygwin_error
55 inline error_code make_error_code( cygwin_errno e )
56 { return error_code( e, system_category() ); }
63 #endif // BOOST_SYSTEM_CYGWIN_ERROR_HPP