annotate DEPENDENCIES/generic/include/boost/system/linux_error.hpp @ 133:4acb5d8d80b6 tip

Don't fail environmental check if README.md exists (but .txt and no-suffix don't)
author Chris Cannam
date Tue, 30 Jul 2019 12:25:44 +0100
parents 2665513ce2d3
children
rev   line source
Chris@16 1 // boost/system/linux_error.hpp -------------------------------------------//
Chris@16 2
Chris@16 3 // Copyright Beman Dawes 2007
Chris@16 4
Chris@16 5 // Distributed under the Boost Software License, Version 1.0. (See accompanying
Chris@16 6 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
Chris@16 7
Chris@16 8 // See library home page at http://www.boost.org/libs/system
Chris@16 9
Chris@16 10 #ifndef BOOST_LINUX_ERROR_HPP
Chris@16 11 #define BOOST_LINUX_ERROR_HPP
Chris@16 12
Chris@16 13 // This header is effectively empty for compiles on operating systems where
Chris@16 14 // it is not applicable.
Chris@16 15
Chris@16 16 #if defined(linux) || defined(__linux) || defined(__linux__)
Chris@16 17
Chris@16 18 #include <boost/system/error_code.hpp>
Chris@16 19
Chris@16 20 namespace boost
Chris@16 21 {
Chris@16 22 namespace system
Chris@16 23 {
Chris@16 24 // To construct an error_code after a API error:
Chris@16 25 //
Chris@16 26 // error_code( errno, system_category() )
Chris@16 27
Chris@16 28 // User code should use the portable "posix" enums for POSIX errors; this
Chris@16 29 // allows such code to be portable to non-POSIX systems. For the non-POSIX
Chris@16 30 // errno values that POSIX-based systems typically provide in addition to
Chris@16 31 // POSIX values, use the system specific enums below.
Chris@16 32
Chris@16 33 namespace linux_error
Chris@16 34 {
Chris@16 35 enum linux_errno
Chris@16 36 {
Chris@16 37 advertise_error = EADV,
Chris@16 38 bad_exchange = EBADE,
Chris@16 39 bad_file_number = EBADFD,
Chris@16 40 bad_font_format = EBFONT,
Chris@16 41 bad_request_code = EBADRQC,
Chris@16 42 bad_request_descriptor = EBADR,
Chris@16 43 bad_slot = EBADSLT,
Chris@16 44 channel_range = ECHRNG,
Chris@16 45 communication_error = ECOMM,
Chris@16 46 dot_dot_error = EDOTDOT,
Chris@16 47 exchange_full = EXFULL,
Chris@16 48 host_down = EHOSTDOWN,
Chris@16 49 is_named_file_type= EISNAM,
Chris@16 50 key_expired = EKEYEXPIRED,
Chris@16 51 key_rejected = EKEYREJECTED,
Chris@16 52 key_revoked = EKEYREVOKED,
Chris@16 53 level2_halt= EL2HLT,
Chris@16 54 level2_no_syncronized= EL2NSYNC,
Chris@16 55 level3_halt = EL3HLT,
Chris@16 56 level3_reset = EL3RST,
Chris@16 57 link_range = ELNRNG,
Chris@16 58 medium_type = EMEDIUMTYPE,
Chris@16 59 no_anode= ENOANO,
Chris@16 60 no_block_device = ENOTBLK,
Chris@16 61 no_csi = ENOCSI,
Chris@16 62 no_key = ENOKEY,
Chris@16 63 no_medium = ENOMEDIUM,
Chris@16 64 no_network = ENONET,
Chris@16 65 no_package = ENOPKG,
Chris@16 66 not_avail = ENAVAIL,
Chris@16 67 not_named_file_type= ENOTNAM,
Chris@16 68 not_recoverable = ENOTRECOVERABLE,
Chris@16 69 not_unique = ENOTUNIQ,
Chris@16 70 owner_dead = EOWNERDEAD,
Chris@16 71 protocol_no_supported = EPFNOSUPPORT,
Chris@16 72 remote_address_changed = EREMCHG,
Chris@16 73 remote_io_error = EREMOTEIO,
Chris@16 74 remote_object = EREMOTE,
Chris@16 75 restart_needed = ERESTART,
Chris@16 76 shared_library_access = ELIBACC,
Chris@16 77 shared_library_bad = ELIBBAD,
Chris@16 78 shared_library_execute = ELIBEXEC,
Chris@16 79 shared_library_max_ = ELIBMAX,
Chris@16 80 shared_library_section= ELIBSCN,
Chris@16 81 shutdown = ESHUTDOWN,
Chris@16 82 socket_type_not_supported = ESOCKTNOSUPPORT,
Chris@16 83 srmount_error = ESRMNT,
Chris@16 84 stream_pipe_error = ESTRPIPE,
Chris@16 85 too_many_references = ETOOMANYREFS,
Chris@16 86 too_many_users = EUSERS,
Chris@16 87 unattached = EUNATCH,
Chris@16 88 unclean = EUCLEAN
Chris@16 89 };
Chris@16 90 } // namespace linux_error
Chris@16 91
Chris@16 92 # ifndef BOOST_SYSTEM_NO_DEPRECATED
Chris@16 93 namespace Linux = linux_error;
Chris@16 94 # endif
Chris@16 95
Chris@16 96 template<> struct is_error_code_enum<linux_error::linux_errno>
Chris@16 97 { static const bool value = true; };
Chris@16 98
Chris@16 99 namespace linux_error
Chris@16 100 {
Chris@16 101 inline error_code make_error_code( linux_errno e )
Chris@16 102 { return error_code( e, system_category() ); }
Chris@16 103 }
Chris@16 104
Chris@16 105 } // namespace system
Chris@16 106 } // namespace boost
Chris@16 107
Chris@16 108 #endif // Linux
Chris@16 109
Chris@16 110 #endif // BOOST_LINUX_ERROR_HPP