1// Specific definitions for generic platforms -*- C++ -*- 2 3// Copyright (C) 2007, 2008, 2009, 2010 Free Software Foundation, Inc. 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 8// Free Software Foundation; either version 3, or (at your option) 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 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/>. 24 25/** @file bits/error_constants.h 26 * This is an internal header file, included by other library headers. 27 * Do not attempt to use it directly. @headername{system_error} 28 */ 29 30#ifndef _GLIBCXX_ERROR_CONSTANTS 31#define _GLIBCXX_ERROR_CONSTANTS 1 32 33#include <bits/c++config.h> 34#include <cerrno> 35 36namespace std _GLIBCXX_VISIBILITY(default) 37{ 38_GLIBCXX_BEGIN_NAMESPACE_VERSION 39 40 enum class errc 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 51#ifdef _GLIBCXX_HAVE_EBADMSG 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, 70 71#ifdef _GLIBCXX_HAVE_EIDRM 72 identifier_removed = EIDRM, 73#endif 74 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 89#ifdef _GLIBCXX_HAVE_ENOLINK 90 no_link = ENOLINK, 91#endif 92 93 no_lock_available = ENOLCK, 94 95#ifdef _GLIBCXX_HAVE_ENODATA 96 no_message_available = ENODATA, 97#endif 98 99 no_message = ENOMSG, 100 no_protocol_option = ENOPROTOOPT, 101 no_space_on_device = ENOSPC, 102 103#ifdef _GLIBCXX_HAVE_ENOSR 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 114#ifdef _GLIBCXX_HAVE_ENOSTR 115 not_a_stream = ENOSTR, 116#endif 117 118 not_connected = ENOTCONN, 119 not_enough_memory = ENOMEM, 120 121#ifdef _GLIBCXX_HAVE_ENOTSUP 122 not_supported = ENOTSUP, 123#endif 124 125#ifdef _GLIBCXX_HAVE_ECANCELED 126 operation_canceled = ECANCELED, 127#endif 128 129 operation_in_progress = EINPROGRESS, 130 operation_not_permitted = EPERM, 131 operation_not_supported = EOPNOTSUPP, 132 operation_would_block = EWOULDBLOCK, 133 134#ifdef _GLIBCXX_HAVE_EOWNERDEAD 135 owner_dead = EOWNERDEAD, 136#endif 137 138 permission_denied = EACCES, 139 140#ifdef _GLIBCXX_HAVE_EPROTO 141 protocol_error = EPROTO, 142#endif 143 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, 149 150#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE 151 state_not_recoverable = ENOTRECOVERABLE, 152#endif 153 154#ifdef _GLIBCXX_HAVE_ETIME 155 stream_timeout = ETIME, 156#endif 157 158#ifdef _GLIBCXX_HAVE_ETXTBSY 159 text_file_busy = ETXTBSY, 160#endif 161 162 timed_out = ETIMEDOUT, 163 too_many_files_open_in_system = ENFILE, 164 too_many_files_open = EMFILE, 165 too_many_links = EMLINK, 166 too_many_symbolic_link_levels = ELOOP, 167 168#ifdef _GLIBCXX_HAVE_EOVERFLOW 169 value_too_large = EOVERFLOW, 170#endif 171 172 wrong_protocol_type = EPROTOTYPE 173 }; 174 175_GLIBCXX_END_NAMESPACE_VERSION 176} // namespace 177 178#endif 179