1 // boost/system/cygwin_error.hpp -------------------------------------------//
\r
3 // Copyright Beman Dawes 2007
\r
5 // Distributed under the Boost Software License, Version 1.0. (See accompanying
\r
6 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
\r
8 // See library home page at http://www.boost.org/libs/system
\r
10 #ifndef BOOST_CYGWIN_ERROR_HPP
\r
11 #define BOOST_CYGWIN_ERROR_HPP
\r
13 // This header is effectively empty for compiles on operating systems where
\r
14 // it is not applicable.
\r
18 #include <boost/system/error_code.hpp>
\r
24 // To construct an error_code after a API error:
\r
26 // error_code( errno, system_category )
\r
28 // User code should use the portable "posix" enums for POSIX errors; this
\r
29 // allows such code to be portable to non-POSIX systems. For the non-POSIX
\r
30 // errno values that POSIX-based systems typically provide in addition to
\r
31 // POSIX values, use the system specific enums below.
\r
33 namespace cygwin_error
\r
38 no_package = ENOPKG,
\r
41 } // namespace cygwin_error
\r
43 template<> struct is_error_code_enum<cygwin_error::cygwin_errno>
\r
44 { static const bool value = true; };
\r
46 namespace cygwin_error
\r
48 inline error_code make_error_code( cygwin_errno e )
\r
49 { return error_code( e, get_system_category() ); }
\r
54 #endif // __CYGWIN__
\r
56 #endif // BOOST_CYGWIN_ERROR_HPP
\r