From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by sourceware.org (Postfix) with ESMTP id 7DA233858012 for ; Thu, 1 Apr 2021 14:26:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7DA233858012 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-520-vpIDetYDMHeArFRkesfAMQ-1; Thu, 01 Apr 2021 10:25:59 -0400 X-MC-Unique: vpIDetYDMHeArFRkesfAMQ-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 45E4A190D340; Thu, 1 Apr 2021 14:25:58 +0000 (UTC) Received: from localhost (unknown [10.33.36.164]) by smtp.corp.redhat.com (Postfix) with ESMTP id CEC7D6B8F8; Thu, 1 Apr 2021 14:25:57 +0000 (UTC) Date: Thu, 1 Apr 2021 15:25:56 +0100 From: Jonathan Wakely To: Eric Botcazou Cc: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [committed] libstdc++: Test errno macros directly, not via autoconf [PR 93151] Message-ID: <20210401142556.GT3008@redhat.com> References: <20201216133809.GA1029023@redhat.com> <20201217140531.GY2309743@redhat.com> <20201217162142.GE2309743@redhat.com> <2069095.Icojqenx9y@fomalhaut> MIME-Version: 1.0 In-Reply-To: <2069095.Icojqenx9y@fomalhaut> X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="fryGc0vzirnrYIcd" Content-Disposition: inline X-Spam-Status: No, score=-14.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Apr 2021 14:26:03 -0000 --fryGc0vzirnrYIcd Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline On 01/04/21 16:04 +0200, Eric Botcazou wrote: >> Oops, and I also forgot to update the other headers that were using >> those autoconf-generated macros! >> >> Fixed by this patch. Tested on mingw-w64, pushed to trunk. > >The original patch was apparently backported onto the gcc-10 branch, but not >this follow-up fix, so Windows builds are now broken on the branch. Sorry. I did try to test a mingw-w64 cross, but I think I probably tested it against trunk not the branch. So didn't test it at all. It should be fixed by the attached patch for gcc-10. I'm testing it now on linux and mingw. I'll wait for RM approval before pushing. --fryGc0vzirnrYIcd Content-Type: text/x-patch; charset=us-ascii Content-Disposition: attachment; filename="patch.txt" commit 03a430a55093d2ea5b80db3273c3a7134367272a Author: Jonathan Wakely Date: Thu Dec 17 13:27:04 2020 +0000 libstdc++: Test errno macros directly for all targets [PR 93151] This applies the same changes to the djgpp and mingw versions of error_constants.h as r11-6137 did for the generic version. All of these constants are defined as macros by on these targets, so we can just test the macro directly instead of checking for it at configure time. libstdc++-v3/ChangeLog: * config.h.in: Regenerate. * config/os/djgpp/error_constants.h: Test POSIX errno macros directly, instead of corresponding _GLIBCXX_HAVE_EXXX macros. * config/os/mingw32-w64/error_constants.h: Likewise. * config/os/mingw32/error_constants.h: Likewise. * configure: Regenerate. (cherry picked from commit 217d5beaff9987a9845155fc796322b5f8bb876d) diff --git a/libstdc++-v3/config/os/djgpp/error_constants.h b/libstdc++-v3/config/os/djgpp/error_constants.h index e0a67bc8d6d..8f947e69e37 100644 --- a/libstdc++-v3/config/os/djgpp/error_constants.h +++ b/libstdc++-v3/config/os/djgpp/error_constants.h @@ -48,7 +48,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION bad_address = EFAULT, bad_file_descriptor = EBADF, -#ifdef _GLIBCXX_HAVE_EBADMSG +#ifdef EBADMSG bad_message = EBADMSG, #endif @@ -68,7 +68,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION function_not_supported = ENOSYS, // host_unreachable = EHOSTUNREACH, -#ifdef _GLIBCXX_HAVE_EIDRM +#ifdef EIDRM identifier_removed = EIDRM, #endif @@ -86,13 +86,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // no_buffer_space = ENOBUFS, no_child_process = ECHILD, -#ifdef _GLIBCXX_HAVE_ENOLINK +#ifdef ENOLINK no_link = ENOLINK, #endif no_lock_available = ENOLCK, -#ifdef _GLIBCXX_HAVE_ENODATA +#ifdef ENODATA no_message_available = ENODATA, #endif @@ -100,7 +100,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // no_protocol_option = ENOPROTOOPT, no_space_on_device = ENOSPC, -#ifdef _GLIBCXX_HAVE_ENOSR +#ifdef ENOSR no_stream_resources = ENOSR, #endif @@ -111,18 +111,18 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION not_a_directory = ENOTDIR, // not_a_socket = ENOTSOCK, -#ifdef _GLIBCXX_HAVE_ENOSTR +#ifdef ENOSTR not_a_stream = ENOSTR, #endif // not_connected = ENOTCONN, not_enough_memory = ENOMEM, -#ifdef _GLIBCXX_HAVE_ENOTSUP +#ifdef ENOTSUP not_supported = ENOTSUP, #endif -#ifdef _GLIBCXX_HAVE_ECANCELED +#ifdef ECANCELED operation_canceled = ECANCELED, #endif @@ -131,13 +131,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // operation_not_supported = EOPNOTSUPP, // operation_would_block = EWOULDBLOCK, -#ifdef _GLIBCXX_HAVE_EOWNERDEAD +#ifdef EOWNERDEAD owner_dead = EOWNERDEAD, #endif permission_denied = EACCES, -#ifdef _GLIBCXX_HAVE_EPROTO +#ifdef EPROTO protocol_error = EPROTO, #endif @@ -147,15 +147,15 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION resource_unavailable_try_again = EAGAIN, result_out_of_range = ERANGE, -#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE +#ifdef ENOTRECOVERABLE state_not_recoverable = ENOTRECOVERABLE, #endif -#ifdef _GLIBCXX_HAVE_ETIME +#ifdef ETIME stream_timeout = ETIME, #endif -#ifdef _GLIBCXX_HAVE_ETXTBSY +#ifdef ETXTBSY text_file_busy = ETXTBSY, #endif @@ -165,7 +165,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION too_many_links = EMLINK, too_many_symbolic_link_levels = ELOOP, -#ifdef _GLIBCXX_HAVE_EOVERFLOW +#ifdef EOVERFLOW value_too_large = EOVERFLOW, #endif diff --git a/libstdc++-v3/config/os/mingw32-w64/error_constants.h b/libstdc++-v3/config/os/mingw32-w64/error_constants.h index 72422299def..3534c3e11b7 100644 --- a/libstdc++-v3/config/os/mingw32-w64/error_constants.h +++ b/libstdc++-v3/config/os/mingw32-w64/error_constants.h @@ -49,7 +49,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION argument_out_of_domain = EDOM, bad_address = EFAULT, bad_file_descriptor = EBADF, -#ifdef _GLIBCXX_HAVE_EBADMSG +#ifdef EBADMSG bad_message = EBADMSG, #endif broken_pipe = EPIPE, @@ -67,7 +67,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION filename_too_long = ENAMETOOLONG, function_not_supported = ENOSYS, host_unreachable = EHOSTUNREACH, -#ifdef _GLIBCXX_HAVE_EIDRM +#ifdef EIDRM identifier_removed = EIDRM, #endif illegal_byte_sequence = EILSEQ, @@ -82,24 +82,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION network_reset = ENETRESET, network_unreachable = ENETUNREACH, no_buffer_space = ENOBUFS, -#ifdef _GLIBCXX_HAVE_ECHILD +#ifdef ECHILD no_child_process = ECHILD, #endif -#ifdef _GLIBCXX_HAVE_ENOLINK +#ifdef ENOLINK no_link = ENOLINK, #endif no_lock_available = ENOLCK, -#ifdef _GLIBCXX_HAVE_ENODATA +#ifdef ENODATA no_message_available = ENODATA, #endif -#ifdef _GLIBCXX_HAVE_ENOMSG +#ifdef ENOMSG no_message = ENOMSG, #endif no_protocol_option = ENOPROTOOPT, -#ifdef _GLIBCXX_HAVE_ENOSPC +#ifdef ENOSPC no_space_on_device = ENOSPC, #endif -#ifdef _GLIBCXX_HAVE_ENOSR +#ifdef ENOSR no_stream_resources = ENOSR, #endif no_such_device_or_address = ENXIO, @@ -108,24 +108,24 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION no_such_process = ESRCH, not_a_directory = ENOTDIR, not_a_socket = ENOTSOCK, -#ifdef _GLIBCXX_HAVE_ENOSTR +#ifdef ENOSTR not_a_stream = ENOSTR, #endif not_connected = ENOTCONN, not_enough_memory = ENOMEM, -#ifdef _GLIBCXX_HAVE_ENOTSUP +#ifdef ENOTSUP not_supported = ENOTSUP, #endif operation_canceled = ECANCELED, operation_in_progress = EINPROGRESS, -#ifdef _GLIBCXX_HAVE_EPERM +#ifdef EPERM operation_not_permitted = EPERM, #endif operation_not_supported = EOPNOTSUPP, -#ifdef _GLIBCXX_HAVE_EWOULDBLOCK +#ifdef EWOULDBLOCK operation_would_block = EWOULDBLOCK, #endif -#ifdef _GLIBCXX_HAVE_EOWNERDEAD +#ifdef EOWNERDEAD owner_dead = EOWNERDEAD, #endif permission_denied = EACCES, @@ -135,23 +135,23 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION resource_deadlock_would_occur = EDEADLK, resource_unavailable_try_again = EAGAIN, result_out_of_range = ERANGE, -#ifdef _GLIBCXX_HAVE_ENOTRECOVERABLE +#ifdef ENOTRECOVERABLE state_not_recoverable = ENOTRECOVERABLE, #endif -#ifdef _GLIBCXX_HAVE_ETIME +#ifdef ETIME stream_timeout = ETIME, #endif -#ifdef _GLIBCXX_HAVE_ETXTBSY +#ifdef ETXTBSY text_file_busy = ETXTBSY, #endif -#ifdef _GLIBCXX_HAVE_ETIMEDOUT +#ifdef 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, -#ifdef _GLIBCXX_HAVE_EOVERFLOW +#ifdef EOVERFLOW value_too_large = EOVERFLOW, #endif wrong_protocol_type = EPROTOTYPE diff --git a/libstdc++-v3/config/os/mingw32/error_constants.h b/libstdc++-v3/config/os/mingw32/error_constants.h index 68ac72a78fb..2222c5227c4 100644 --- a/libstdc++-v3/config/os/mingw32/error_constants.h +++ b/libstdc++-v3/config/os/mingw32/error_constants.h @@ -78,7 +78,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // network_reset = ENETRESET, // network_unreachable = ENETUNREACH, // no_buffer_space = ENOBUFS, -#ifdef _GLIBCXX_HAVE_ECHILD +#ifdef ECHILD no_child_process = ECHILD, #endif // no_link = ENOLINK, @@ -86,7 +86,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // no_message_available = ENODATA, // no_message = ENOMSG, // no_protocol_option = ENOPROTOOPT, -#ifdef _GLIBCXX_HAVE_ENOSPC +#ifdef ENOSPC no_space_on_device = ENOSPC, #endif // no_stream_resources = ENOSR, @@ -99,16 +99,16 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // not_a_stream = ENOSTR, // not_connected = ENOTCONN, not_enough_memory = ENOMEM, -#ifdef _GLIBCXX_HAVE_ENOTSUP +#ifdef ENOTSUP not_supported = ENOTSUP, #endif // operation_canceled = ECANCELED, // operation_in_progress = EINPROGRESS, -#ifdef _GLIBCXX_HAVE_EPERM +#ifdef EPERM operation_not_permitted = EPERM, #endif // operation_not_supported = EOPNOTSUPP, -#ifdef _GLIBCXX_HAVE_EWOULDBLOCK +#ifdef EWOULDBLOCK operation_would_block = EWOULDBLOCK, #endif // owner_dead = EOWNERDEAD, @@ -122,14 +122,14 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // state_not_recoverable = ENOTRECOVERABLE, // stream_timeout = ETIME, // text_file_busy = ETXTBSY, -#ifdef _GLIBCXX_HAVE_ETIMEDOUT +#ifdef 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, -#ifdef _GLIBCXX_HAVE_EOVERFLOW +#ifdef EOVERFLOW , value_too_large = EOVERFLOW #endif --fryGc0vzirnrYIcd--