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_CYGWIN_ERROR_HPP
11 #define BOOST_CYGWIN_ERROR_HPP
13 // This header is effectively empty for compiles on operating systems where
14 // it is not applicable.
18 #include <boost/system/error_code.hpp>
24 // To construct an error_code after a API error:
26 // error_code( errno, system_category() )
28 // User code should use the portable "posix" enums for POSIX errors; this
29 // allows such code to be portable to non-POSIX systems. For the non-POSIX
30 // errno values that POSIX-based systems typically provide in addition to
31 // POSIX values, use the system specific enums below.
33 namespace cygwin_error
41 } // namespace cygwin_error
43 template<> struct is_error_code_enum<cygwin_error::cygwin_errno>
44 { static const bool value = true; };
46 namespace cygwin_error
48 inline error_code make_error_code( cygwin_errno e )
49 { return error_code( e, system_category() ); }
56 #endif // BOOST_CYGWIN_ERROR_HPP