| 1 | #ifndef BOOST_SYSTEM_DETAIL_ERRC_HPP_INCLUDED |
| 2 | #define BOOST_SYSTEM_DETAIL_ERRC_HPP_INCLUDED |
| 3 | |
| 4 | // Copyright Beman Dawes 2006, 2007 |
| 5 | // Copyright Christoper Kohlhoff 2007 |
| 6 | // Copyright Peter Dimov 2017, 2018, 2020 |
| 7 | // |
| 8 | // Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 9 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
| 10 | // |
| 11 | // See library home page at http://www.boost.org/libs/system |
| 12 | |
| 13 | #include <boost/system/is_error_condition_enum.hpp> |
| 14 | #include <boost/system/detail/cerrno.hpp> |
| 15 | |
| 16 | namespace boost |
| 17 | { |
| 18 | |
| 19 | namespace system |
| 20 | { |
| 21 | |
| 22 | namespace errc |
| 23 | { |
| 24 | |
| 25 | enum errc_t |
| 26 | { |
| 27 | success = 0, |
| 28 | address_family_not_supported = EAFNOSUPPORT, |
| 29 | address_in_use = EADDRINUSE, |
| 30 | address_not_available = EADDRNOTAVAIL, |
| 31 | already_connected = EISCONN, |
| 32 | argument_list_too_long = E2BIG, |
| 33 | argument_out_of_domain = EDOM, |
| 34 | bad_address = EFAULT, |
| 35 | bad_file_descriptor = EBADF, |
| 36 | bad_message = EBADMSG, |
| 37 | broken_pipe = EPIPE, |
| 38 | connection_aborted = ECONNABORTED, |
| 39 | connection_already_in_progress = EALREADY, |
| 40 | connection_refused = ECONNREFUSED, |
| 41 | connection_reset = ECONNRESET, |
| 42 | cross_device_link = EXDEV, |
| 43 | destination_address_required = EDESTADDRREQ, |
| 44 | device_or_resource_busy = EBUSY, |
| 45 | directory_not_empty = ENOTEMPTY, |
| 46 | executable_format_error = ENOEXEC, |
| 47 | file_exists = EEXIST, |
| 48 | file_too_large = EFBIG, |
| 49 | filename_too_long = ENAMETOOLONG, |
| 50 | function_not_supported = ENOSYS, |
| 51 | host_unreachable = EHOSTUNREACH, |
| 52 | identifier_removed = EIDRM, |
| 53 | illegal_byte_sequence = EILSEQ, |
| 54 | inappropriate_io_control_operation = ENOTTY, |
| 55 | interrupted = EINTR, |
| 56 | invalid_argument = EINVAL, |
| 57 | invalid_seek = ESPIPE, |
| 58 | io_error = EIO, |
| 59 | is_a_directory = EISDIR, |
| 60 | message_size = EMSGSIZE, |
| 61 | network_down = ENETDOWN, |
| 62 | network_reset = ENETRESET, |
| 63 | network_unreachable = ENETUNREACH, |
| 64 | no_buffer_space = ENOBUFS, |
| 65 | no_child_process = ECHILD, |
| 66 | no_link = ENOLINK, |
| 67 | no_lock_available = ENOLCK, |
| 68 | no_message_available = ENODATA, |
| 69 | no_message = ENOMSG, |
| 70 | no_protocol_option = ENOPROTOOPT, |
| 71 | no_space_on_device = ENOSPC, |
| 72 | no_stream_resources = ENOSR, |
| 73 | no_such_device_or_address = ENXIO, |
| 74 | no_such_device = ENODEV, |
| 75 | no_such_file_or_directory = ENOENT, |
| 76 | no_such_process = ESRCH, |
| 77 | not_a_directory = ENOTDIR, |
| 78 | not_a_socket = ENOTSOCK, |
| 79 | not_a_stream = ENOSTR, |
| 80 | not_connected = ENOTCONN, |
| 81 | not_enough_memory = ENOMEM, |
| 82 | not_supported = ENOTSUP, |
| 83 | operation_canceled = ECANCELED, |
| 84 | operation_in_progress = EINPROGRESS, |
| 85 | operation_not_permitted = EPERM, |
| 86 | operation_not_supported = EOPNOTSUPP, |
| 87 | operation_would_block = EWOULDBLOCK, |
| 88 | owner_dead = EOWNERDEAD, |
| 89 | permission_denied = EACCES, |
| 90 | protocol_error = EPROTO, |
| 91 | protocol_not_supported = EPROTONOSUPPORT, |
| 92 | read_only_file_system = EROFS, |
| 93 | resource_deadlock_would_occur = EDEADLK, |
| 94 | resource_unavailable_try_again = EAGAIN, |
| 95 | result_out_of_range = ERANGE, |
| 96 | state_not_recoverable = ENOTRECOVERABLE, |
| 97 | stream_timeout = ETIME, |
| 98 | text_file_busy = ETXTBSY, |
| 99 | timed_out = ETIMEDOUT, |
| 100 | too_many_files_open_in_system = ENFILE, |
| 101 | too_many_files_open = EMFILE, |
| 102 | too_many_links = EMLINK, |
| 103 | too_many_symbolic_link_levels = ELOOP, |
| 104 | value_too_large = EOVERFLOW, |
| 105 | wrong_protocol_type = EPROTOTYPE |
| 106 | }; |
| 107 | |
| 108 | } // namespace errc |
| 109 | |
| 110 | #ifdef BOOST_SYSTEM_ENABLE_DEPRECATED |
| 111 | |
| 112 | namespace posix = errc; |
| 113 | namespace posix_error = errc; |
| 114 | |
| 115 | #endif |
| 116 | |
| 117 | template<> struct is_error_condition_enum<errc::errc_t> |
| 118 | { |
| 119 | static const bool value = true; |
| 120 | }; |
| 121 | |
| 122 | } // namespace system |
| 123 | |
| 124 | } // namespace boost |
| 125 | |
| 126 | #endif // #ifndef BOOST_SYSTEM_DETAIL_ERRC_HPP_INCLUDED |
| 127 | |