PR 71444 define more error constants for mingw-w64

PR libstdc++/71444
	* config/os/mingw32-w64/error_constants.h
	(address_family_not_supported, address_in_use, address_not_available)
	(already_connected, connection_aborted, connection_already_in_progress)
	connection_refused, connection_reset, cross_device_link)
	(destination_address_required, host_unreachable, message_size)
	(network_down, network_reset, network_unreachable, no_buffer_space)
	(no_protocol_option, not_a_socket, not_connected, operation_canceled)
	(operation_in_progress, operation_not_supported, protocol_error)
	(protocol_not_supported, too_many_links, too_many_symbolic_link_levels)
	(value_too_large, wrong_protocol_type): Define.
	(bad_message, identifier_removed, no_link, no_message_available)
	(no_message, no_stream_resources, not_a_stream, owner_dead)
	(state_not_recoverable, stream_timeout, text_file_busy): Define
	conditionally.
	* testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc:
	Guard test for no_message with _GLIBCXX_HAVE_ENOMSG.

From-SVN: r243853
This commit is contained in:
Jonathan Wakely 2016-12-21 13:09:13 +00:00 committed by Jonathan Wakely
parent c21fdaa1a7
commit e76d309851
3 changed files with 83 additions and 40 deletions

View File

@ -1,3 +1,23 @@
2016-12-21 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/71444
* config/os/mingw32-w64/error_constants.h
(address_family_not_supported, address_in_use, address_not_available)
(already_connected, connection_aborted, connection_already_in_progress)
connection_refused, connection_reset, cross_device_link)
(destination_address_required, host_unreachable, message_size)
(network_down, network_reset, network_unreachable, no_buffer_space)
(no_protocol_option, not_a_socket, not_connected, operation_canceled)
(operation_in_progress, operation_not_supported, protocol_error)
(protocol_not_supported, too_many_links, too_many_symbolic_link_levels)
(value_too_large, wrong_protocol_type): Define.
(bad_message, identifier_removed, no_link, no_message_available)
(no_message, no_stream_resources, not_a_stream, owner_dead)
(state_not_recoverable, stream_timeout, text_file_busy): Define
conditionally.
* testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc:
Guard test for no_message with _GLIBCXX_HAVE_ENOMSG.
2016-12-19 Ville Voutilainen <ville.voutilainen@gmail.com> 2016-12-19 Ville Voutilainen <ville.voutilainen@gmail.com>
Make the perfect-forwarding constructor of a two-element tuple Make the perfect-forwarding constructor of a two-element tuple

View File

@ -41,22 +41,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// replaced by Winsock WSA-prefixed equivalents. // replaced by Winsock WSA-prefixed equivalents.
enum class errc enum class errc
{ {
// address_family_not_supported = EAFNOSUPPORT, address_family_not_supported = EAFNOSUPPORT,
// address_in_use = EADDRINUSE, address_in_use = EADDRINUSE,
// address_not_available = EADDRNOTAVAIL, address_not_available = EADDRNOTAVAIL,
// already_connected = EISCONN, already_connected = EISCONN,
argument_list_too_long = E2BIG, argument_list_too_long = E2BIG,
argument_out_of_domain = EDOM, argument_out_of_domain = EDOM,
bad_address = EFAULT, bad_address = EFAULT,
bad_file_descriptor = EBADF, bad_file_descriptor = EBADF,
// bad_message = EBADMSG, #ifdef _GLIBCXX_HAVE_EBADMSG
bad_message = EBADMSG,
#endif
broken_pipe = EPIPE, broken_pipe = EPIPE,
// connection_aborted = ECONNABORTED, connection_aborted = ECONNABORTED,
// connection_already_in_progress = EALREADY, connection_already_in_progress = EALREADY,
// connection_refused = ECONNREFUSED, connection_refused = ECONNREFUSED,
// connection_reset = ECONNRESET, connection_reset = ECONNRESET,
// cross_device_link = EXDEV, cross_device_link = EXDEV,
// destination_address_required = EDESTADDRREQ, destination_address_required = EDESTADDRREQ,
device_or_resource_busy = EBUSY, device_or_resource_busy = EBUSY,
directory_not_empty = ENOTEMPTY, directory_not_empty = ENOTEMPTY,
executable_format_error = ENOEXEC, executable_format_error = ENOEXEC,
@ -64,8 +66,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
file_too_large = EFBIG, file_too_large = EFBIG,
filename_too_long = ENAMETOOLONG, filename_too_long = ENAMETOOLONG,
function_not_supported = ENOSYS, function_not_supported = ENOSYS,
// host_unreachable = EHOSTUNREACH, host_unreachable = EHOSTUNREACH,
// identifier_removed = EIDRM, #ifdef _GLIBCXX_HAVE_EIDRM
identifier_removed = EIDRM,
#endif
illegal_byte_sequence = EILSEQ, illegal_byte_sequence = EILSEQ,
inappropriate_io_control_operation = ENOTTY, inappropriate_io_control_operation = ENOTTY,
interrupted = EINTR, interrupted = EINTR,
@ -73,67 +77,84 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
invalid_seek = ESPIPE, invalid_seek = ESPIPE,
io_error = EIO, io_error = EIO,
is_a_directory = EISDIR, is_a_directory = EISDIR,
// message_size = EMSGSIZE, message_size = EMSGSIZE,
// network_down = ENETDOWN, network_down = ENETDOWN,
// network_reset = ENETRESET, network_reset = ENETRESET,
// network_unreachable = ENETUNREACH, network_unreachable = ENETUNREACH,
// no_buffer_space = ENOBUFS, no_buffer_space = ENOBUFS,
#ifdef _GLIBCXX_HAVE_ECHILD #ifdef _GLIBCXX_HAVE_ECHILD
no_child_process = ECHILD, no_child_process = ECHILD,
#endif #endif
// no_link = ENOLINK, #ifdef _GLIBCXX_HAVE_ENOLINK
no_link = ENOLINK,
#endif
no_lock_available = ENOLCK, no_lock_available = ENOLCK,
// no_message_available = ENODATA, #ifdef _GLIBCXX_HAVE_ENODATA
// no_message = ENOMSG, no_message_available = ENODATA,
// no_protocol_option = ENOPROTOOPT, #endif
#ifdef _GLIBCXX_HAVE_ENOMSG
no_message = ENOMSG,
#endif
no_protocol_option = ENOPROTOOPT,
#ifdef _GLIBCXX_HAVE_ENOSPC #ifdef _GLIBCXX_HAVE_ENOSPC
no_space_on_device = ENOSPC, no_space_on_device = ENOSPC,
#endif #endif
// no_stream_resources = ENOSR, #ifdef _GLIBCXX_HAVE_ENOSR
no_stream_resources = ENOSR,
#endif
no_such_device_or_address = ENXIO, no_such_device_or_address = ENXIO,
no_such_device = ENODEV, no_such_device = ENODEV,
no_such_file_or_directory = ENOENT, no_such_file_or_directory = ENOENT,
no_such_process = ESRCH, no_such_process = ESRCH,
not_a_directory = ENOTDIR, not_a_directory = ENOTDIR,
// not_a_socket = ENOTSOCK, not_a_socket = ENOTSOCK,
// not_a_stream = ENOSTR, #ifdef _GLIBCXX_HAVE_ENOSTR
// not_connected = ENOTCONN, not_a_stream = ENOSTR,
#endif
not_connected = ENOTCONN,
not_enough_memory = ENOMEM, not_enough_memory = ENOMEM,
#ifdef _GLIBCXX_HAVE_ENOTSUP #ifdef _GLIBCXX_HAVE_ENOTSUP
not_supported = ENOTSUP, not_supported = ENOTSUP,
#endif #endif
// operation_canceled = ECANCELED, operation_canceled = ECANCELED,
// operation_in_progress = EINPROGRESS, operation_in_progress = EINPROGRESS,
#ifdef _GLIBCXX_HAVE_EPERM #ifdef _GLIBCXX_HAVE_EPERM
operation_not_permitted = EPERM, operation_not_permitted = EPERM,
#endif #endif
// operation_not_supported = EOPNOTSUPP, operation_not_supported = EOPNOTSUPP,
#ifdef _GLIBCXX_HAVE_EWOULDBLOCK #ifdef _GLIBCXX_HAVE_EWOULDBLOCK
operation_would_block = EWOULDBLOCK, operation_would_block = EWOULDBLOCK,
#endif #endif
// owner_dead = EOWNERDEAD, #ifdef _GLIBCXX_HAVE_EOWNERDEAD
owner_dead = EOWNERDEAD,
#endif
permission_denied = EACCES, permission_denied = EACCES,
// protocol_error = EPROTO, protocol_error = EPROTO,
// protocol_not_supported = EPROTONOSUPPORT, protocol_not_supported = EPROTONOSUPPORT,
read_only_file_system = EROFS, read_only_file_system = EROFS,
resource_deadlock_would_occur = EDEADLK, resource_deadlock_would_occur = EDEADLK,
resource_unavailable_try_again = EAGAIN, resource_unavailable_try_again = EAGAIN,
result_out_of_range = ERANGE, result_out_of_range = ERANGE,
// state_not_recoverable = ENOTRECOVERABLE, #ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE
// stream_timeout = ETIME, state_not_recoverable = ENOTRECOVERABLE,
// text_file_busy = ETXTBSY, #endif
#ifdef _GLIBCXX_HAVE_ETIME
stream_timeout = ETIME,
#endif
#ifdef _GLIBCXX_HAVE_ETXTBSY
text_file_busy = ETXTBSY,
#endif
#ifdef _GLIBCXX_HAVE_ETIMEDOUT #ifdef _GLIBCXX_HAVE_ETIMEDOUT
timed_out = ETIMEDOUT, timed_out = ETIMEDOUT,
#endif #endif
too_many_files_open_in_system = ENFILE, too_many_files_open_in_system = ENFILE,
too_many_files_open = EMFILE, too_many_files_open = EMFILE,
too_many_links = EMLINK too_many_links = EMLINK,
// too_many_symbolic_link_levels = ELOOP, too_many_symbolic_link_levels = ELOOP,
#ifdef _GLIBCXX_HAVE_EOVERFLOW #ifdef _GLIBCXX_HAVE_EOVERFLOW
, value_too_large = EOVERFLOW,
value_too_large = EOVERFLOW
#endif #endif
// wrong_protocol_type = EPROTOTYPE wrong_protocol_type = EPROTOTYPE
}; };
_GLIBCXX_END_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION

View File

@ -82,7 +82,9 @@ void test01()
TEST_ERRC(no_message_available); TEST_ERRC(no_message_available);
#endif #endif
#ifdef _GLIBCXX_HAVE_ENOMSG
TEST_ERRC(no_message); TEST_ERRC(no_message);
#endif
TEST_ERRC(no_protocol_option); TEST_ERRC(no_protocol_option);
TEST_ERRC(no_space_on_device); TEST_ERRC(no_space_on_device);