From patchwork Fri Dec 16 20:23:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 88339 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp2886qgi; Fri, 16 Dec 2016 12:24:06 -0800 (PST) X-Received: by 10.99.139.200 with SMTP id j191mr2241629pge.162.1481919846312; Fri, 16 Dec 2016 12:24:06 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id e22si9244788pli.289.2016.12.16.12.24.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Dec 2016 12:24:06 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-return-444671-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org; spf=pass (google.com: domain of gcc-patches-return-444671-patch=linaro.org@gcc.gnu.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=gcc-patches-return-444671-patch=linaro.org@gcc.gnu.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; q=dns; s=default; b=MsrEs/S8EjoVm0jZJ 7/BGKE9LqmoOhuheiueaxb+uxGIHPtCkhbqh7jA+DW7rMGeZatOgGBjjCnNK749L 1iuKCN4g8LBPY6x8m+HghVBdQHfnGYXRqc/hdP7UPYPCymqN8aU7Hf+OFOSiRtFR JCq2QwQUs61Ok5xD9m5iGd2FzU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=default; bh=cJfwM+Qtp/7YD/6DPMw1plP SCRI=; b=EIxSXB2Gy0zEvRd40lHOsmkSho7CZYPSzudVM39GhJLulT+Nksjptl9 WmUntxowH2njs9HZLfS4z4A5jBktp2omPrQAIzlKzUO3f+OT3/wNrsljch2lIwjB NFIA1FtrTNUn1cJF3iPgNfM7IYv6LNi42f/+mcE9EYRxX+sFFUNM= Received: (qmail 66525 invoked by alias); 16 Dec 2016 20:23:42 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 66168 invoked by uid 89); 16 Dec 2016 20:23:42 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.0 required=5.0 tests=BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*f:sk:6604bda, H*i:sk:6604bda X-Spam-User: qpsmtpd, 2 recipients X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 16 Dec 2016 20:23:40 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2449B8FCED; Fri, 16 Dec 2016 20:23:39 +0000 (UTC) Received: from localhost (ovpn-116-120.ams2.redhat.com [10.36.116.120]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uBGKNbZF024607; Fri, 16 Dec 2016 15:23:38 -0500 Date: Fri, 16 Dec 2016 20:23:37 +0000 From: Jonathan Wakely To: niXman Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: Fix for libstdc++-v3's error_constants.h for MinGW-W64 Message-ID: <20161216202337.GH895@redhat.com> References: <5bad9c6fa54ca7c457a251ed83b639f7@autistici.org> <20161216130413.GD895@redhat.com> <6604bda6257e83aba7c5bfe0a1f86e08@autistici.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <6604bda6257e83aba7c5bfe0a1f86e08@autistici.org> X-Clacks-Overhead: GNU Terry Pratchett User-Agent: Mutt/1.7.1 (2016-10-04) On 16/12/16 16:28 +0300, niXman wrote: >Jonathan Wakely 2016-12-16 16:04: > >>I don't think this is suitable for the branches, but could be applied >>to trunk (as the patch was posted during stage 1, but I missed it). >Ok. > >>Does this require a particular version of MinGW-w64? >Yes, at the moment MinGW-W64 trunk is required. (MinGW-W64-v6) > >>Does it work for older versions? >No. OK, how about this instead then? This unconditionally enables all the error codes supported by mingw-w64 v5, and uses configure checks to detect the ones that are only available on trunk. This means it will still work for v5, but if you use trunk you get them all. Could you test this please? commit 0ed1d7de154ece96733edd693caeb84cfa5f4a78 Author: Jonathan Wakely Date: Fri Dec 16 20:21:40 2016 +0000 PR71444 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. diff --git a/libstdc++-v3/config/os/mingw32-w64/error_constants.h b/libstdc++-v3/config/os/mingw32-w64/error_constants.h index 5cbf63c..950f6e7 100644 --- a/libstdc++-v3/config/os/mingw32-w64/error_constants.h +++ b/libstdc++-v3/config/os/mingw32-w64/error_constants.h @@ -41,22 +41,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // replaced by Winsock WSA-prefixed equivalents. enum class errc { -// address_family_not_supported = EAFNOSUPPORT, -// address_in_use = EADDRINUSE, -// address_not_available = EADDRNOTAVAIL, -// already_connected = EISCONN, + address_family_not_supported = EAFNOSUPPORT, + address_in_use = EADDRINUSE, + address_not_available = EADDRNOTAVAIL, + already_connected = EISCONN, argument_list_too_long = E2BIG, 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, -// destination_address_required = EDESTADDRREQ, + connection_aborted = ECONNABORTED, + connection_already_in_progress = EALREADY, + connection_refused = ECONNREFUSED, + connection_reset = ECONNRESET, + cross_device_link = EXDEV, + destination_address_required = EDESTADDRREQ, device_or_resource_busy = EBUSY, directory_not_empty = ENOTEMPTY, executable_format_error = ENOEXEC, @@ -64,8 +66,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION file_too_large = EFBIG, filename_too_long = ENAMETOOLONG, function_not_supported = ENOSYS, -// host_unreachable = EHOSTUNREACH, -// identifier_removed = EIDRM, + host_unreachable = EHOSTUNREACH, +#ifdef _GLIBCXX_HAVE_EIDRM + identifier_removed = EIDRM, +#endif illegal_byte_sequence = EILSEQ, inappropriate_io_control_operation = ENOTTY, interrupted = EINTR, @@ -73,67 +77,84 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION invalid_seek = ESPIPE, io_error = EIO, is_a_directory = EISDIR, -// message_size = EMSGSIZE, -// network_down = ENETDOWN, -// network_reset = ENETRESET, -// network_unreachable = ENETUNREACH, -// no_buffer_space = ENOBUFS, + message_size = EMSGSIZE, + network_down = ENETDOWN, + network_reset = ENETRESET, + network_unreachable = ENETUNREACH, + no_buffer_space = ENOBUFS, #ifdef _GLIBCXX_HAVE_ECHILD no_child_process = ECHILD, #endif -// no_link = ENOLINK, +#ifdef _GLIBCXX_HAVE_ENOLINK + no_link = ENOLINK, +#endif no_lock_available = ENOLCK, -// no_message_available = ENODATA, -// no_message = ENOMSG, -// no_protocol_option = ENOPROTOOPT, +#ifdef _GLIBCXX_HAVE_ENODATA + no_message_available = ENODATA, +#endif +#ifdef _GLIBCXX_HAVE_ENOMSG + no_message = ENOMSG, +#endif + no_protocol_option = ENOPROTOOPT, #ifdef _GLIBCXX_HAVE_ENOSPC no_space_on_device = ENOSPC, #endif -// no_stream_resources = ENOSR, +#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, -// not_connected = ENOTCONN, + not_a_socket = ENOTSOCK, +#ifdef _GLIBCXX_HAVE_ENOSTR + not_a_stream = ENOSTR, +#endif + not_connected = ENOTCONN, not_enough_memory = ENOMEM, #ifdef _GLIBCXX_HAVE_ENOTSUP not_supported = ENOTSUP, #endif -// operation_canceled = ECANCELED, -// operation_in_progress = EINPROGRESS, + operation_canceled = ECANCELED, + operation_in_progress = EINPROGRESS, #ifdef _GLIBCXX_HAVE_EPERM operation_not_permitted = EPERM, #endif -// operation_not_supported = EOPNOTSUPP, + operation_not_supported = EOPNOTSUPP, #ifdef _GLIBCXX_HAVE_EWOULDBLOCK operation_would_block = EWOULDBLOCK, #endif -// owner_dead = EOWNERDEAD, +#ifdef _GLIBCXX_HAVE_EOWNERDEAD + owner_dead = EOWNERDEAD, +#endif permission_denied = EACCES, -// protocol_error = EPROTO, -// protocol_not_supported = EPROTONOSUPPORT, + protocol_error = EPROTO, + 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_ENOTIME + stream_timeout = ETIME, +#endif +#ifdef _GLIBCXX_HAVE_ETXTBSY + text_file_busy = ETXTBSY, +#endif #ifdef _GLIBCXX_HAVE_ETIMEDOUT timed_out = ETIMEDOUT, #endif too_many_files_open_in_system = ENFILE, too_many_files_open = EMFILE, - too_many_links = EMLINK -// too_many_symbolic_link_levels = ELOOP, + too_many_links = EMLINK, + too_many_symbolic_link_levels = ELOOP, #ifdef _GLIBCXX_HAVE_EOVERFLOW - , - value_too_large = EOVERFLOW + value_too_large = EOVERFLOW, #endif -// wrong_protocol_type = EPROTOTYPE + wrong_protocol_type = EPROTOTYPE }; _GLIBCXX_END_NAMESPACE_VERSION