OSDN Git Service

2008-10-23 Chris Fairles <cfairles@gcc.gnu.org>
[pf3gnuchains/gcc-fork.git] / libstdc++-v3 / config / os / generic / error_constants.h
1 // Specific definitions for generic platforms  -*- C++ -*-
2
3 // Copyright (C) 2007, 2008 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 2, 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 // You should have received a copy of the GNU General Public License along
17 // with this library; see the file COPYING.  If not, write to the Free
18 // Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
19 // USA.
20
21 // As a special exception, you may use this file as part of a free software
22 // library without restriction.  Specifically, if other files instantiate
23 // templates or use macros or inline functions from this file, or you compile
24 // this file and link it with other files to produce an executable, this
25 // file does not by itself cause the resulting executable to be covered by
26 // the GNU General Public License.  This exception does not however
27 // invalidate any other reasons why the executable file might be covered by
28 // the GNU General Public License.
29
30 /** @file error_constants.h
31  *  This is an internal header file, included by other library headers.
32  *  You should not attempt to use it directly.
33  */
34
35 #ifndef _GLIBCXX_ERROR_CONSTANTS
36 #define _GLIBCXX_ERROR_CONSTANTS 1
37
38 #include <bits/c++config.h>
39 #include <cerrno>
40
41 _GLIBCXX_BEGIN_NAMESPACE(std)
42
43   enum class errc : long
44     {
45       address_family_not_supported =            EAFNOSUPPORT,
46       address_in_use =                          EADDRINUSE,
47       address_not_available =                   EADDRNOTAVAIL,
48       already_connected =                       EISCONN,
49       argument_list_too_long =                  E2BIG,
50       argument_out_of_domain =                  EDOM,
51       bad_address =                             EFAULT,
52       bad_file_descriptor =                     EBADF,
53
54 #ifdef _GLIBCXX_HAVE_EBADMSG
55       bad_message =                             EBADMSG,
56 #endif
57
58       broken_pipe =                             EPIPE,
59       connection_aborted =                      ECONNABORTED,
60       connection_already_in_progress =          EALREADY,
61       connection_refused =                      ECONNREFUSED,
62       connection_reset =                        ECONNRESET,
63       cross_device_link =                       EXDEV,
64       destination_address_required =            EDESTADDRREQ,
65       device_or_resource_busy =                 EBUSY,
66       directory_not_empty =                     ENOTEMPTY,
67       executable_format_error =                 ENOEXEC,
68       file_exists =                             EEXIST,
69       file_too_large =                          EFBIG,
70       filename_too_long =                       ENAMETOOLONG,
71       function_not_supported =                  ENOSYS,
72       host_unreachable =                        EHOSTUNREACH,
73
74 #ifdef _GLIBCXX_HAVE_EIDRM
75       identifier_removed =                      EIDRM,
76 #endif
77
78       illegal_byte_sequence =                   EILSEQ,
79       inappropriate_io_control_operation =      ENOTTY,
80       interrupted =                             EINTR,
81       invalid_argument =                        EINVAL,
82       invalid_seek =                            ESPIPE,
83       io_error =                                EIO,
84       is_a_directory =                          EISDIR,
85       message_size =                            EMSGSIZE,
86       network_down =                            ENETDOWN,
87       network_reset =                           ENETRESET,
88       network_unreachable =                     ENETUNREACH,
89       no_buffer_space =                         ENOBUFS,
90       no_child_process =                        ECHILD,
91
92 #ifdef _GLIBCXX_HAVE_ENOLINK
93       no_link =                                 ENOLINK,
94 #endif
95
96       no_lock_available =                       ENOLCK,
97
98 #ifdef _GLIBCXX_HAVE_ENODATA
99       no_message_available =                    ENODATA, 
100 #endif
101
102       no_message =                              ENOMSG, 
103       no_protocol_option =                      ENOPROTOOPT,
104       no_space_on_device =                      ENOSPC,
105
106 #ifdef _GLIBCXX_HAVE_ENOSR
107       no_stream_resources =                     ENOSR,
108 #endif
109
110       no_such_device_or_address =               ENXIO,
111       no_such_device =                          ENODEV,
112       no_such_file_or_directory =               ENOENT,
113       no_such_process =                         ESRCH,
114       not_a_directory =                         ENOTDIR,
115       not_a_socket =                            ENOTSOCK,
116
117 #ifdef _GLIBCXX_HAVE_ENOSTR
118       not_a_stream =                            ENOSTR,
119 #endif
120
121       not_connected =                           ENOTCONN,
122       not_enough_memory =                       ENOMEM,
123
124 #ifdef _GLIBCXX_HAVE_ENOTSUP
125       not_supported =                           ENOTSUP,
126 #endif
127
128 #ifdef _GLIBCXX_HAVE_ECANCELED
129       operation_canceled =                      ECANCELED,
130 #endif
131
132       operation_in_progress =                   EINPROGRESS,
133       operation_not_permitted =                 EPERM,
134       operation_not_supported =                 EOPNOTSUPP,
135       operation_would_block =                   EWOULDBLOCK,
136
137 #ifdef _GLIBCXX_HAVE_EOWNERDEAD
138       owner_dead =                              EOWNERDEAD,
139 #endif
140
141       permission_denied =                       EACCES,
142
143 #ifdef _GLIBCXX_HAVE_EPROTO
144       protocol_error =                          EPROTO,
145 #endif
146
147       protocol_not_supported =                  EPROTONOSUPPORT,
148       read_only_file_system =                   EROFS,
149       resource_deadlock_would_occur =           EDEADLK,
150       resource_unavailable_try_again =          EAGAIN,
151       result_out_of_range =                     ERANGE,
152
153 #ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
154       state_not_recoverable =                   ENOTRECOVERABLE,
155 #endif
156
157 #ifdef _GLIBCXX_HAVE_ETIME
158       stream_timeout =                          ETIME,
159 #endif
160
161 #ifdef _GLIBCXX_HAVE_ETXTBSY
162       text_file_busy =                          ETXTBSY,
163 #endif
164
165       timed_out =                               ETIMEDOUT,
166       too_many_files_open_in_system =           ENFILE,
167       too_many_files_open =                     EMFILE,
168       too_many_links =                          EMLINK,
169       too_many_symbolic_link_levels =           ELOOP,
170
171 #ifdef _GLIBCXX_HAVE_EOVERFLOW
172       value_too_large =                         EOVERFLOW,
173 #endif
174
175       wrong_protocol_type =                     EPROTOTYPE,
176       no_posix_equivalent = 1L << 16
177     };
178
179 _GLIBCXX_END_NAMESPACE
180
181 #endif