From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 617F21F5A0 for ; Mon, 6 Feb 2023 17:37:45 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=clisp.org header.i=@clisp.org header.a=rsa-sha256 header.s=strato-dkim-0002 header.b=Vz7j+wZv; dkim-atps=neutral Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pP5Qn-000698-Gr; Mon, 06 Feb 2023 12:37:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pP5Ql-000668-Nf for bug-gnulib@gnu.org; Mon, 06 Feb 2023 12:37:28 -0500 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.218]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pP5QV-0006xR-1q for bug-gnulib@gnu.org; Mon, 06 Feb 2023 12:37:26 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1675705025; cv=none; d=strato.com; s=strato-dkim-0002; b=maymRsgN84li7yrCUxPFBpy4TdKz8tlcyDXliw0cuC7uwr/Fu9TdS7I0L21RrfUVhB rKJ53TvWtbBze1rFeGANgBz+TcgE9EVFUdyn5UZoEK+gx+dpQPg1WeU1ImDmY4Zd4/AB YWOR528z5Bjv1Gg77e4KGkxNTOUoaki4zkcMCfVI3sjgNKluYs+R5RrJITFDtYjNVD2O 2XH93nxGs0iL/Ahzcqd/Eiv8p9Okb59vfNN5Xq72kJnHAtu3G/bHIvgt7Trr8DrsWRzd D6nynMoAbq4NLNm451KvzB4SlPNkbE4ho+cQUXUJ3pyXSpFwySvGfZkRE6JyV6nWGC1x rdHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1675705025; s=strato-dkim-0002; d=strato.com; h=References:In-Reply-To:Message-ID:Date:Subject:To:From:Cc:Date:From: Subject:Sender; bh=RfuLfNwk3S7SrCek2F71xBQgRfLNydKhbZ0qxLuj1DA=; b=Up2maLddXfau4DZQWfpByX90PcHyzfo54BLJJNZ4DR21iTp36tmsDik0H+vj3OzIZR MM/JRDsHMFHecBKCQdpjoSx/zrW4OIsKOkh9LW7Oq0RioPJDAX3RQgZQJ24hfLHPY58n xxnCfwPo6FstgKasQV47zEnJ+znqx6as/OunuOj8P5kXeEndnfQKs6NqtsSF2yobC+sq NTmz0EUwXhXHPQQkvaRu13k1eCczirG6nE6SMgFTSvn/1GPAf+6eipYEEpKyA5Ms/Zsv v6j1sHM5Yb/MyjtU0md34Xqy35c0ro15hoUMREK2lW574RXRKavcbjE/eIV3zqdmrY6Q EfCw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo00 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1675705025; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:To:From:Cc:Date:From: Subject:Sender; bh=RfuLfNwk3S7SrCek2F71xBQgRfLNydKhbZ0qxLuj1DA=; b=Vz7j+wZvDYqp3PQFme6AaY+TGVyBp+wIyraiTx5X9CeDmRnsLB8Hddn4gQDsdnSbM0 xrJDNsflTTCw/5SbqE1zHIvOoNnqZvCFjxO5ghvhZv1JQ5SpRxq614nRIzEkgJ9b0uNY n6oobU/FRzxJXhl2oLwAWEgtlRaLHevZaEzL5WU80/vVB0im3UIMr7lvGdCXNSm6nENY ghAUrSVfaYZJyB52wv6MxhciVoEBGXg4mwO1ipZ436pCOgM+Y0RVt3U5gT69kO3PsaqF 8aPNv6klPKXrW8l1dtFINb2kSjjlrmMfm4gcb9mlX7GDlDo9XotKH0mVZLfhS4RrrZ3m bFDg== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH0WWb0LN8XZoH94zq68+3cfpPF1PD+ezUIF+ECAUv0KY3UBImwtw==" Received: from nimes.localnet by smtp.strato.de (RZmta 49.2.2 AUTH) with ESMTPSA id 098542z16Hb4CyE (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 6 Feb 2023 18:37:04 +0100 (CET) From: Bruno Haible To: bug-gnulib@gnu.org, Corinna Vinschen Subject: Re: [PATCH] Do not decorate symbols as dllexport on Cygwin Date: Mon, 06 Feb 2023 18:37:04 +0100 Message-ID: <3384697.1Xququ8Bcc@nimes> In-Reply-To: References: <20230205194344.269174-1-vinschen@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Received-SPF: none client-ip=81.169.146.218; envelope-from=bruno@clisp.org; helo=mo4-p00-ob.smtp.rzone.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_PASS=-0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Corinna Vinschen wrote: > This patch will be in the next Cygwin release 3.4.6. Thanks! > I'm just a bit fuzzy what patches will be required for gnulib now... With this patch, the setlocale_null lock should be gone in Cygwin >= 3.4.6. I can't really test it, but I hope the patch is correct. 2023-02-06 Bruno Haible setlocale-null: Don't use a lock in Cygwin >= 3.4.6. Road paved by Corinna Vinschen . * m4/setlocale_null.m4 (gl_FUNC_SETLOCALE_NULL): Assume that setlocale (LC_ALL, NULL) is multithread-safe in Cygwin >= 3.4.6. * lib/setlocale_null.c: Update comments. * tests/test-setlocale_null-mt-all.c: Likewise. diff --git a/lib/setlocale_null.c b/lib/setlocale_null.c index 6ac563db14..89c8a06598 100644 --- a/lib/setlocale_null.c +++ b/lib/setlocale_null.c @@ -173,7 +173,7 @@ setlocale_null_unlocked (int category, char *buf, size_t bufsize) #endif } -#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE) /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin */ +#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE) /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin < 3.4.6 */ /* Use a lock, so that no two threads can invoke setlocale_null_unlocked at the same time. */ @@ -198,7 +198,7 @@ setlocale_null_with_lock (int category, char *buf, size_t bufsize) return ret; } -# elif HAVE_PTHREAD_API /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin */ +# elif HAVE_PTHREAD_API /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin < 3.4.6 */ extern # if defined _WIN32 || defined __CYGWIN__ diff --git a/m4/setlocale_null.m4 b/m4/setlocale_null.m4 index dd6a5ef538..b41df499a8 100644 --- a/m4/setlocale_null.m4 +++ b/m4/setlocale_null.m4 @@ -1,4 +1,4 @@ -# setlocale_null.m4 serial 6 +# setlocale_null.m4 serial 7 dnl Copyright (C) 2019-2023 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -13,9 +13,23 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL], AC_CACHE_CHECK([whether setlocale (LC_ALL, NULL) is multithread-safe], [gl_cv_func_setlocale_null_all_mtsafe], [case "$host_os" in - # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin. - *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*) + # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku. + *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku*) gl_cv_func_setlocale_null_all_mtsafe=no ;; + # Guess no on Cygwin < 3.4.6. + cygwin*) + AC_EGREP_CPP([Lucky user], + [ +#if defined __CYGWIN__ + #include + #if CYGWIN_VERSION_DLL_COMBINED >= CYGWIN_VERSION_DLL_MAKE_COMBINED (3004, 6) + Lucky user + #endif +#endif + ], + [gl_cv_func_setlocale_null_all_mtsafe=yes], + [gl_cv_func_setlocale_null_all_mtsafe=no]) + ;; # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows. *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*) gl_cv_func_setlocale_null_all_mtsafe=yes ;; diff --git a/tests/test-setlocale_null-mt-all.c b/tests/test-setlocale_null-mt-all.c index 6036c260cd..7480406639 100644 --- a/tests/test-setlocale_null-mt-all.c +++ b/tests/test-setlocale_null-mt-all.c @@ -166,7 +166,7 @@ Solaris 11.0 OK Solaris 11.4 OK Solaris OpenIndiana OK Haiku crash < 1 sec -Cygwin crash < 1 sec +Cygwin < 3.4.6 crash < 1 sec mingw OK MSVC OK (assuming compiler option /MD !) */