]>
Commit | Line | Data |
---|---|---|
e4bf5dfc DS |
1 | // Specific definitions for generic platforms -*- C++ -*- |
2 | ||
a945c346 | 3 | // Copyright (C) 2007-2024 Free Software Foundation, Inc. |
e4bf5dfc DS |
4 | // |
5 | // This file is part of the GNU ISO C++ Library. This library is free | |
6 | // software; you can redistribute it and/or modify it under the | |
7 | // terms of the GNU General Public License as published by the | |
748086b7 | 8 | // Free Software Foundation; either version 3, or (at your option) |
e4bf5dfc DS |
9 | // any later version. |
10 | ||
11 | // This library is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | ||
748086b7 JJ |
16 | // Under Section 7 of GPL version 3, you are granted additional |
17 | // permissions described in the GCC Runtime Library Exception, version | |
18 | // 3.1, as published by the Free Software Foundation. | |
19 | ||
20 | // You should have received a copy of the GNU General Public License and | |
21 | // a copy of the GCC Runtime Library Exception along with this program; | |
22 | // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see | |
23 | // <http://www.gnu.org/licenses/>. | |
e4bf5dfc | 24 | |
f910786b | 25 | /** @file bits/error_constants.h |
e4bf5dfc | 26 | * This is an internal header file, included by other library headers. |
f910786b | 27 | * Do not attempt to use it directly. @headername{system_error} |
e4bf5dfc DS |
28 | */ |
29 | ||
30 | #ifndef _GLIBCXX_ERROR_CONSTANTS | |
4bcf935d | 31 | #define _GLIBCXX_ERROR_CONSTANTS 1 |
e4bf5dfc DS |
32 | |
33 | #include <bits/c++config.h> | |
34 | #include <cerrno> | |
35 | ||
12ffa228 BK |
36 | namespace std _GLIBCXX_VISIBILITY(default) |
37 | { | |
38 | _GLIBCXX_BEGIN_NAMESPACE_VERSION | |
e4bf5dfc | 39 | |
918bf5c1 | 40 | enum class errc |
e4bf5dfc DS |
41 | { |
42 | address_family_not_supported = EAFNOSUPPORT, | |
43 | address_in_use = EADDRINUSE, | |
44 | address_not_available = EADDRNOTAVAIL, | |
45 | already_connected = EISCONN, | |
46 | argument_list_too_long = E2BIG, | |
47 | argument_out_of_domain = EDOM, | |
48 | bad_address = EFAULT, | |
49 | bad_file_descriptor = EBADF, | |
50 | ||
a2c2eec1 | 51 | #ifdef EBADMSG |
e4bf5dfc DS |
52 | bad_message = EBADMSG, |
53 | #endif | |
54 | ||
55 | broken_pipe = EPIPE, | |
56 | connection_aborted = ECONNABORTED, | |
57 | connection_already_in_progress = EALREADY, | |
58 | connection_refused = ECONNREFUSED, | |
59 | connection_reset = ECONNRESET, | |
60 | cross_device_link = EXDEV, | |
61 | destination_address_required = EDESTADDRREQ, | |
62 | device_or_resource_busy = EBUSY, | |
63 | directory_not_empty = ENOTEMPTY, | |
64 | executable_format_error = ENOEXEC, | |
65 | file_exists = EEXIST, | |
66 | file_too_large = EFBIG, | |
67 | filename_too_long = ENAMETOOLONG, | |
68 | function_not_supported = ENOSYS, | |
69 | host_unreachable = EHOSTUNREACH, | |
2b854e70 | 70 | |
a2c2eec1 | 71 | #ifdef EIDRM |
e4bf5dfc | 72 | identifier_removed = EIDRM, |
2b854e70 JB |
73 | #endif |
74 | ||
e4bf5dfc DS |
75 | illegal_byte_sequence = EILSEQ, |
76 | inappropriate_io_control_operation = ENOTTY, | |
77 | interrupted = EINTR, | |
78 | invalid_argument = EINVAL, | |
79 | invalid_seek = ESPIPE, | |
80 | io_error = EIO, | |
81 | is_a_directory = EISDIR, | |
82 | message_size = EMSGSIZE, | |
83 | network_down = ENETDOWN, | |
84 | network_reset = ENETRESET, | |
85 | network_unreachable = ENETUNREACH, | |
86 | no_buffer_space = ENOBUFS, | |
87 | no_child_process = ECHILD, | |
88 | ||
a2c2eec1 | 89 | #ifdef ENOLINK |
e4bf5dfc DS |
90 | no_link = ENOLINK, |
91 | #endif | |
4bcf935d | 92 | |
e4bf5dfc DS |
93 | no_lock_available = ENOLCK, |
94 | ||
a2c2eec1 | 95 | #ifdef ENODATA |
f92ab29f | 96 | no_message_available = ENODATA, |
e4bf5dfc DS |
97 | #endif |
98 | ||
f92ab29f | 99 | no_message = ENOMSG, |
e4bf5dfc DS |
100 | no_protocol_option = ENOPROTOOPT, |
101 | no_space_on_device = ENOSPC, | |
102 | ||
a2c2eec1 | 103 | #ifdef ENOSR |
e4bf5dfc DS |
104 | no_stream_resources = ENOSR, |
105 | #endif | |
106 | ||
107 | no_such_device_or_address = ENXIO, | |
108 | no_such_device = ENODEV, | |
109 | no_such_file_or_directory = ENOENT, | |
110 | no_such_process = ESRCH, | |
111 | not_a_directory = ENOTDIR, | |
112 | not_a_socket = ENOTSOCK, | |
113 | ||
a2c2eec1 | 114 | #ifdef ENOSTR |
e4bf5dfc DS |
115 | not_a_stream = ENOSTR, |
116 | #endif | |
117 | ||
118 | not_connected = ENOTCONN, | |
119 | not_enough_memory = ENOMEM, | |
4bcf935d | 120 | |
a2c2eec1 | 121 | #ifdef ENOTSUP |
e4bf5dfc | 122 | not_supported = ENOTSUP, |
4bcf935d | 123 | #endif |
3110357b | 124 | |
a2c2eec1 | 125 | #ifdef ECANCELED |
e4bf5dfc | 126 | operation_canceled = ECANCELED, |
3110357b RS |
127 | #endif |
128 | ||
e4bf5dfc DS |
129 | operation_in_progress = EINPROGRESS, |
130 | operation_not_permitted = EPERM, | |
131 | operation_not_supported = EOPNOTSUPP, | |
132 | operation_would_block = EWOULDBLOCK, | |
4bcf935d | 133 | |
a2c2eec1 | 134 | #ifdef EOWNERDEAD |
e4bf5dfc DS |
135 | owner_dead = EOWNERDEAD, |
136 | #endif | |
4bcf935d | 137 | |
e4bf5dfc | 138 | permission_denied = EACCES, |
4bcf935d | 139 | |
a2c2eec1 | 140 | #ifdef EPROTO |
e4bf5dfc DS |
141 | protocol_error = EPROTO, |
142 | #endif | |
4bcf935d | 143 | |
e4bf5dfc DS |
144 | protocol_not_supported = EPROTONOSUPPORT, |
145 | read_only_file_system = EROFS, | |
146 | resource_deadlock_would_occur = EDEADLK, | |
147 | resource_unavailable_try_again = EAGAIN, | |
148 | result_out_of_range = ERANGE, | |
4bcf935d | 149 | |
a2c2eec1 | 150 | #ifdef ENOTRECOVERABLE |
e4bf5dfc DS |
151 | state_not_recoverable = ENOTRECOVERABLE, |
152 | #endif | |
153 | ||
a2c2eec1 | 154 | #ifdef ETIME |
e4bf5dfc DS |
155 | stream_timeout = ETIME, |
156 | #endif | |
157 | ||
a2c2eec1 | 158 | #ifdef ETXTBSY |
e4bf5dfc | 159 | text_file_busy = ETXTBSY, |
2b854e70 JB |
160 | #endif |
161 | ||
e4bf5dfc DS |
162 | timed_out = ETIMEDOUT, |
163 | too_many_files_open_in_system = ENFILE, | |
164 | too_many_files_open = EMFILE, | |
165 | too_many_links = EMLINK, | |
92010a79 | 166 | too_many_symbolic_link_levels = ELOOP, |
88857512 | 167 | |
a2c2eec1 | 168 | #ifdef EOVERFLOW |
e4bf5dfc | 169 | value_too_large = EOVERFLOW, |
2d2e163d JW |
170 | #elif defined __AVR__ |
171 | value_too_large = 999, | |
88857512 RS |
172 | #endif |
173 | ||
918bf5c1 | 174 | wrong_protocol_type = EPROTOTYPE |
e4bf5dfc DS |
175 | }; |
176 | ||
12ffa228 BK |
177 | _GLIBCXX_END_NAMESPACE_VERSION |
178 | } // namespace | |
e4bf5dfc DS |
179 | |
180 | #endif |