This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, libstdc++-v3, DJGPP] Update error constants for DJGPP


Included patch updates error constants for DJGPP.

Andris

2015-11-15 Andris Pavenis <andris.pavenis@delorie.com>

* libstdc++-v3/config/os/djgpp/error_constants.h (std::errc): Update error constants for DJGPP

>From fd43935415eee35aaa2ece3d07b0814de4da70f7 Mon Sep 17 00:00:00 2001
From: Andris Pavenis <andris.pavenis@iki.fi>
Date: Sun, 15 Nov 2015 20:22:33 +0200
Subject: [PATCH] [DJGPP} libstdc++-v3/config/os/djgpp/error_constants.h:
 Update according to errno codes available for DJGPP

---
 libstdc++-v3/config/os/djgpp/error_constants.h | 99 +++++++++++++++++++-------
 1 file changed, 75 insertions(+), 24 deletions(-)

diff --git a/libstdc++-v3/config/os/djgpp/error_constants.h b/libstdc++-v3/config/os/djgpp/error_constants.h
index 8e25aa0..21e4906 100644
--- a/libstdc++-v3/config/os/djgpp/error_constants.h
+++ b/libstdc++-v3/config/os/djgpp/error_constants.h
@@ -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
-- 
2.4.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]