OSDN Git Service

644d111b70b1ba8ca4adab7f5a2c61f4b824d886
[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 namespace posix_error
44 {
45  enum posix_errno
46     {
47       address_family_not_supported =            EAFNOSUPPORT,
48       address_in_use =                          EADDRINUSE,
49       address_not_available =                   EADDRNOTAVAIL,
50       already_connected =                       EISCONN,
51       argument_list_too_long =                  E2BIG,
52       argument_out_of_domain =                  EDOM,
53       bad_address =                             EFAULT,
54       bad_file_descriptor =                     EBADF,
55
56 #ifdef _GLIBCXX_HAVE_EBADMSG
57       bad_message =                             EBADMSG,
58 #endif
59
60       broken_pipe =                             EPIPE,
61       connection_aborted =                      ECONNABORTED,
62       connection_already_in_progress =          EALREADY,
63       connection_refused =                      ECONNREFUSED,
64       connection_reset =                        ECONNRESET,
65       cross_device_link =                       EXDEV,
66       destination_address_required =            EDESTADDRREQ,
67       device_or_resource_busy =                 EBUSY,
68       directory_not_empty =                     ENOTEMPTY,
69       executable_format_error =                 ENOEXEC,
70       file_exists =                             EEXIST,
71       file_too_large =                          EFBIG,
72       filename_too_long =                       ENAMETOOLONG,
73       function_not_supported =                  ENOSYS,
74       host_unreachable =                        EHOSTUNREACH,
75
76 #ifdef _GLIBCXX_HAVE_EIDRM
77       identifier_removed =                      EIDRM,
78 #endif
79
80       illegal_byte_sequence =                   EILSEQ,
81       inappropriate_io_control_operation =      ENOTTY,
82       interrupted =                             EINTR,
83       invalid_argument =                        EINVAL,
84       invalid_seek =                            ESPIPE,
85       io_error =                                EIO,
86       is_a_directory =                          EISDIR,
87       message_size =                            EMSGSIZE,
88       network_down =                            ENETDOWN,
89       network_reset =                           ENETRESET,
90       network_unreachable =                     ENETUNREACH,
91       no_buffer_space =                         ENOBUFS,
92       no_child_process =                        ECHILD,
93
94 #ifdef _GLIBCXX_HAVE_ENOLINK
95       no_link =                                 ENOLINK,
96 #endif
97
98       no_lock_available =                       ENOLCK,
99
100 #ifdef _GLIBCXX_HAVE_ENODATA
101       no_message_available =                    ENODATA, 
102 #endif
103
104       no_message =                              ENOMSG, 
105       no_protocol_option =                      ENOPROTOOPT,
106       no_space_on_device =                      ENOSPC,
107
108 #ifdef _GLIBCXX_HAVE_ENOSR
109       no_stream_resources =                     ENOSR,
110 #endif
111
112       no_such_device_or_address =               ENXIO,
113       no_such_device =                          ENODEV,
114       no_such_file_or_directory =               ENOENT,
115       no_such_process =                         ESRCH,
116       not_a_directory =                         ENOTDIR,
117       not_a_socket =                            ENOTSOCK,
118
119 #ifdef _GLIBCXX_HAVE_ENOSTR
120       not_a_stream =                            ENOSTR,
121 #endif
122
123       not_connected =                           ENOTCONN,
124       not_enough_memory =                       ENOMEM,
125
126 #ifdef _GLIBCXX_HAVE_ENOTSUP
127       not_supported =                           ENOTSUP,
128 #endif
129
130 #ifdef _GLIBCXX_HAVE_ECANCELED
131       operation_canceled =                      ECANCELED,
132 #endif
133
134       operation_in_progress =                   EINPROGRESS,
135       operation_not_permitted =                 EPERM,
136       operation_not_supported =                 EOPNOTSUPP,
137       operation_would_block =                   EWOULDBLOCK,
138
139 #ifdef _GLIBCXX_HAVE_EOWNERDEAD
140       owner_dead =                              EOWNERDEAD,
141 #endif
142
143       permission_denied =                       EACCES,
144
145 #ifdef _GLIBCXX_HAVE_EPROTO
146       protocol_error =                          EPROTO,
147 #endif
148
149       protocol_not_supported =                  EPROTONOSUPPORT,
150       read_only_file_system =                   EROFS,
151       resource_deadlock_would_occur =           EDEADLK,
152       resource_unavailable_try_again =          EAGAIN,
153       result_out_of_range =                     ERANGE,
154
155 #ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
156       state_not_recoverable =                   ENOTRECOVERABLE,
157 #endif
158
159 #ifdef _GLIBCXX_HAVE_ETIME
160       stream_timeout =                          ETIME,
161 #endif
162
163 #ifdef _GLIBCXX_HAVE_ETXTBSY
164       text_file_busy =                          ETXTBSY,
165 #endif
166
167       timed_out =                               ETIMEDOUT,
168       too_many_files_open_in_system =           ENFILE,
169       too_many_files_open =                     EMFILE,
170       too_many_links =                          EMLINK,
171       too_many_synbolic_link_levels =           ELOOP,
172
173 #ifdef _GLIBCXX_HAVE_EOVERFLOW
174       value_too_large =                         EOVERFLOW,
175 #endif
176
177       wrong_protocol_type =                     EPROTOTYPE,
178       no_posix_equivalent = 1L << 16
179     };
180 }
181
182 _GLIBCXX_END_NAMESPACE
183
184 #endif