]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/config/os/djgpp/error_constants.h
[DJGPP] Update config/os/djgpp/error_constants.h
[thirdparty/gcc.git] / libstdc++-v3 / config / os / djgpp / error_constants.h
index 8e25aa0adbe6ee7a39deb906ccc25451ee7d5748..21e4906afd1fd6ac997717dfdbd3c017ee58dea4 100644 (file)
@@ -37,8 +37,6 @@ namespace std _GLIBCXX_VISIBILITY(default)
 {
 _GLIBCXX_BEGIN_NAMESPACE_VERSION
 
-// Most of the commented-out error codes are socket-related and could be
-// replaced by Winsock WSA-prefixed equivalents.
   enum class errc
     {
 //    address_family_not_supported =           EAFNOSUPPORT,
@@ -49,13 +47,17 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       argument_out_of_domain =                         EDOM,
       bad_address =                            EFAULT,
       bad_file_descriptor =                    EBADF,
-//    bad_message =                            EBADMSG,
+
+#ifdef _GLIBCXX_HAVE_EBADMSG
+      bad_message =                            EBADMSG,
+#endif
+
       broken_pipe =                            EPIPE,
 //    connection_aborted =                     ECONNABORTED,
 //    connection_already_in_progress =                 EALREADY,
 //    connection_refused =                     ECONNREFUSED,
 //    connection_reset =                       ECONNRESET,
-//    cross_device_link =                      EXDEV,
+      cross_device_link =                      EXDEV,
 //    destination_address_required =           EDESTADDRREQ,
       device_or_resource_busy =                EBUSY,
       directory_not_empty =                    ENOTEMPTY,
@@ -65,7 +67,11 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
       filename_too_long =                      ENAMETOOLONG,
       function_not_supported =                         ENOSYS,
 //    host_unreachable =                       EHOSTUNREACH,
-//    identifier_removed =                     EIDRM,
+
+#ifdef _GLIBCXX_HAVE_EIDRM
+      identifier_removed =                     EIDRM,
+#endif
+
       illegal_byte_sequence =                  EILSEQ,
       inappropriate_io_control_operation =     ENOTTY,
       interrupted =                            EINTR,
@@ -78,48 +84,93 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
 //    network_reset =                          ENETRESET,
 //    network_unreachable =                    ENETUNREACH,
 //    no_buffer_space =                        ENOBUFS,
-//    no_child_process =                       ECHILD,
-//    no_link =                                ENOLINK,
+      no_child_process =                       ECHILD,
+
+#ifdef _GLIBCXX_HAVE_ENOLINK
+      no_link =                                ENOLINK,
+#endif
+
       no_lock_available =                      ENOLCK,
-//    no_message_available =                   ENODATA, 
+
+#ifdef _GLIBCXX_HAVE_ENODATA
+      no_message_available =                   ENODATA, 
+#endif
+
 //    no_message =                             ENOMSG, 
 //    no_protocol_option =                     ENOPROTOOPT,
-//    no_space_on_device =                     ENOSPC,
-//    no_stream_resources =                    ENOSR,
+      no_space_on_device =                     ENOSPC,
+
+#ifdef _GLIBCXX_HAVE_ENOSR
+      no_stream_resources =                    ENOSR,
+#endif
+
       no_such_device_or_address =              ENXIO,
       no_such_device =                                 ENODEV,
       no_such_file_or_directory =              ENOENT,
       no_such_process =                        ESRCH,
       not_a_directory =                        ENOTDIR,
 //    not_a_socket =                           ENOTSOCK,
-//    not_a_stream =                           ENOSTR,
+
+#ifdef _GLIBCXX_HAVE_ENOSTR
+      not_a_stream =                           ENOSTR,
+#endif
+
 //    not_connected =                          ENOTCONN,
       not_enough_memory =                      ENOMEM,
-//    not_supported =                          ENOTSUP,
-//    operation_canceled =                     ECANCELED,
+
+#ifdef _GLIBCXX_HAVE_ENOTSUP
+      not_supported =                          ENOTSUP,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ECANCELED
+      operation_canceled =                     ECANCELED,
+#endif
+
 //    operation_in_progress =                  EINPROGRESS,
-//    operation_not_permitted =                EPERM,
+      operation_not_permitted =                EPERM,
 //    operation_not_supported =                EOPNOTSUPP,
 //    operation_would_block =                  EWOULDBLOCK,
-//    owner_dead =                             EOWNERDEAD,
+
+#ifdef _GLIBCXX_HAVE_EOWNERDEAD
+      owner_dead =                             EOWNERDEAD,
+#endif
+
       permission_denied =                      EACCES,
-//    protocol_error =                                 EPROTO,
+
+#ifdef _GLIBCXX_HAVE_EPROTO
+      protocol_error =                                 EPROTO,
+#endif
+
 //    protocol_not_supported =                         EPROTONOSUPPORT,
       read_only_file_system =                  EROFS,
       resource_deadlock_would_occur =          EDEADLK,
       resource_unavailable_try_again =                 EAGAIN,
       result_out_of_range =                    ERANGE,
-//    state_not_recoverable =                  ENOTRECOVERABLE,
-//    stream_timeout =                                 ETIME,
-//    text_file_busy =                                 ETXTBSY,
+
+#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
+      state_not_recoverable =                  ENOTRECOVERABLE,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETIME
+      stream_timeout =                                 ETIME,
+#endif
+
+#ifdef _GLIBCXX_HAVE_ETXTBSY
+      text_file_busy =                                 ETXTBSY,
+#endif
+
 //    timed_out =                              ETIMEDOUT,
       too_many_files_open_in_system =          ENFILE,
       too_many_files_open =                    EMFILE,
-      too_many_links =                                 EMLINK
- //   too_many_symbolic_link_levels =          ELOOP,
- //   value_too_large =                        EOVERFLOW,
- //   wrong_protocol_type =                    EPROTOTYPE
-   };
+      too_many_links =                                 EMLINK,
+      too_many_symbolic_link_levels =          ELOOP,
+
+#ifdef _GLIBCXX_HAVE_EOVERFLOW
+      value_too_large =                        EOVERFLOW,
+#endif
+
+//    wrong_protocol_type =                    EPROTOTYPE
+    };
 
 _GLIBCXX_END_NAMESPACE_VERSION
 } // namespace