From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id B9EDB398A862 for ; Wed, 9 Jun 2021 14:50:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B9EDB398A862 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=cebitec.uni-bielefeld.de Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 725E4F0FB; Wed, 9 Jun 2021 16:50:39 +0200 (CEST) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WaiyfHVnGPT4; Wed, 9 Jun 2021 16:50:36 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (p50854661.dip0.t-ipconnect.de [80.133.70.97]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPSA id 51272F0FA; Wed, 9 Jun 2021 16:50:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=CeBiTec.Uni-Bielefeld.DE; s=20200306; t=1623250236; bh=wF3poiPcdWBBezFCMIPABluXOC4052exCpvHbtM/b3s=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=X7dTX65nrWMZLf6SFES0OTw3wSp/JbF1tk3n15UMQeHldpPS1ZyL+dEV6GjoUeUNM UrRNAyTZfPtVv03bUDfRfZGXhLp62CRJNKxDhUxjda2V0AL9z2Ip/gWe8mXdkKTCrC iC+rr+Q3MFbXprLG8m6En14QlalwLRCRmTQ5s0AGo0KB37+VJtGJSxhs6jQdZLLzjg /DUDaS5Q2UM2ZYaqkUu/4U/Z8NZ3x7tNcZ+V3fib2YlcV5sJgWQO2lAvBcFgx5PS4R UIwz0WI+N4B0Vz6tqjMSxNlZGKK1Y/M7EVA69BPOrXiERhs63q1L25ICnzbaePSzxl Jj1nj4VMXwVDw== From: Rainer Orth To: "CHIGOT, CLEMENT" Cc: libstdc++ , Jonathan Wakely , David Edelsohn Subject: Re: [PATCH] libstdc++: implement locale support for AIX References: <20210122112910.GI541588@redhat.com> Date: Wed, 09 Jun 2021 16:50:35 +0200 In-Reply-To: (CLEMENT CHIGOT's message of "Tue, 8 Jun 2021 06:59:14 +0000") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1.90 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Status: No, score=-3793.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_NONE, SPF_NONE, TXREP, URIBL_SBL, URIBL_SBL_A 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: Wed, 09 Jun 2021 14:50:43 -0000 --=-=-= Content-Type: text/plain Hi Clement, > Did anyone have time to take a look at this patch ? I've finally manged to give it a try on sparc-sun-solaris2.11 (Solaris 11.4). I had to apply the following additional patch, matching what you did in config/os/aix/ctype_configure_char.cc: --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=sccc.patch diff --git a/libstdc++-v3/config/os/solaris/ctype_configure_char.cc b/libstdc++-v3/config/os/solaris/ctype_configure_char.cc --- a/libstdc++-v3/config/os/solaris/ctype_configure_char.cc +++ b/libstdc++-v3/config/os/solaris/ctype_configure_char.cc @@ -42,27 +42,27 @@ namespace std _GLIBCXX_VISIBILITY(defaul ctype::classic_table() throw() { return __ctype_mask; } - ctype::ctype(__c_locale, const mask* __table, bool __del, + ctype::ctype(__c_locale __cloc, const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), + : facet(__refs), _M_c_locale_ctype(_S_clone_c_locale(__cloc)), + _M_del(__table != 0 && __del), _M_toupper(__trans_upper), _M_tolower(__trans_lower), - _M_table(__table ? __table : classic_table()) + _M_table(__table ? __table : classic_table()), + _M_widen_ok(0), _M_narrow_ok(0) { memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; } ctype::ctype(const mask* __table, bool __del, size_t __refs) - : facet(__refs), _M_del(__table != 0 && __del), + : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()), + _M_del(__table != 0 && __del), _M_toupper(__trans_upper), _M_tolower(__trans_lower), - _M_table(__table ? __table : classic_table()) + _M_table(__table ? __table : classic_table()), + _M_widen_ok(0), _M_narrow_ok(0) { memset(_M_widen, 0, sizeof(_M_widen)); - _M_widen_ok = 0; memset(_M_narrow, 0, sizeof(_M_narrow)); - _M_narrow_ok = 0; } char --=-=-= Content-Type: text/plain For now, I'm passing --enable-clocale=xpg7 at configure time rather than changing the default. Results are mixed: with the previous patch, I had 29 FAILs (both 32 and 64-bit). The number has remained the same, but the exact set of failing patches changed: FAIL: libstdc++-abi/abi_check FAIL: 22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc execution test FAIL: 22_locale/codecvt/in/wchar_t/3.cc execution test FAIL: 22_locale/codecvt/max_length/wchar_t/4.cc execution test FAIL: 22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc execution test FAIL: 22_locale/codecvt/out/wchar_t/3.cc execution test FAIL: 22_locale/collate/compare/wchar_t/2.cc execution test FAIL: 22_locale/collate/compare/wchar_t/3.cc execution test FAIL: 22_locale/collate/compare/wchar_t/wrapped_env.cc execution test FAIL: 22_locale/collate/compare/wchar_t/wrapped_locale.cc execution test FAIL: 22_locale/collate/transform/wchar_t/2.cc execution test FAIL: 22_locale/collate/transform/wchar_t/3.cc execution test FAIL: 22_locale/collate/transform/wchar_t/wrapped_env.cc execution test FAIL: 22_locale/collate/transform/wchar_t/wrapped_locale.cc execution test FAIL: 22_locale/ctype/widen/wchar_t/2.cc execution test FAIL: 22_locale/money_get/get/wchar_t/1.cc execution test FAIL: 22_locale/money_put/put/char/9780-3.cc execution test FAIL: 22_locale/money_put/put/wchar_t/1.cc execution test FAIL: 22_locale/money_put/put/wchar_t/3.cc execution test FAIL: 22_locale/time_get/get_date/wchar_t/4.cc execution test FAIL: 22_locale/time_put/put/char/2.cc execution test FAIL: 22_locale/time_put/put/char/4.cc execution test FAIL: 22_locale/time_put/put/wchar_t/2.cc execution test FAIL: 22_locale/time_put/put/wchar_t/4.cc execution test FAIL: 27_io/basic_filebuf/overflow/wchar_t/11305-1.cc execution test FAIL: 27_io/basic_filebuf/overflow/wchar_t/11305-2.cc execution test FAIL: 27_io/basic_filebuf/overflow/wchar_t/11305-3.cc execution test FAIL: 27_io/basic_filebuf/overflow/wchar_t/11305-4.cc execution test FAIL: 27_io/manipulators/extended/get_time/char/2.cc execution test -FAIL: 22_locale/codecvt/encoding/wchar_t/wrapped_locale.cc execution test -FAIL: 22_locale/codecvt/max_length/wchar_t/wrapped_locale.cc execution test -FAIL: 22_locale/collate/compare/wchar_t/2.cc execution test -FAIL: 22_locale/collate/compare/wchar_t/wrapped_env.cc execution test -FAIL: 22_locale/collate/compare/wchar_t/wrapped_locale.cc execution test -FAIL: 22_locale/collate/transform/wchar_t/2.cc execution test -FAIL: 22_locale/collate/transform/wchar_t/wrapped_env.cc execution test -FAIL: 22_locale/collate/transform/wchar_t/wrapped_locale.cc execution test +FAIL: 22_locale/ctype/is/wchar_t/1.cc execution test +FAIL: 22_locale/ctype/is/wchar_t/wrapped_env.cc execution test +FAIL: 22_locale/ctype/scan/wchar_t/1.cc execution test +FAIL: 22_locale/ctype/scan/wchar_t/wrapped_env.cc execution test +FAIL: 22_locale/locale/cons/29217.cc execution test +FAIL: 22_locale/locale/cons/38368.cc execution test +FAIL: 22_locale/messages/members/char/1.cc execution test +FAIL: 22_locale/messages_byname/named_equivalence.cc execution test -FAIL: 22_locale/money_put/put/char/9780-3.cc execution test -FAIL: 22_locale/time_get/get_date/wchar_t/4.cc execution test -FAIL: 22_locale/time_put/put/char/4.cc execution test +FAIL: 28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc execution test +FAIL: 28_regex/algorithms/regex_match/extended/wstring_locale.cc execution test +FAIL: 28_regex/iterators/regex_token_iterator/wchar_t/wstring_02.cc execution test +FAIL: 28_regex/traits/wchar_t/isctype.cc execution test Just a number of comments on the patch itself: * In a couple of places, you use uselocale, e.g. in config/locale/xpg7/c_locale.h. E.g. on Solaris 11.3, this is missing, which is no wonder given that the OS only conforms to XPG6. We will either have to hardcode the clocale based on the minor/micro version or check for a couple of necessary XPG7 functions before enabling the xpg7 clocale. However, we can cross that bridge once the code works on actual XPG7 systems. * Your patch changes indentation in a couple of places (e.g. config/locale/xpg7/ctype_members.cc, config/os/aix/ctype_configure_char.cc) for no reason I can see. This seems to violate the coding style. * When I tried GCC master on FreeBSD (for the previous version of your patch), libstdc++ locale test results were pretty horrible, both without and with your patch. If the dragonfly/xpg7 locale code has considerable problems even on the native system it originates from, I wonder if it's the best basis for the new xpg7 clocale. Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University --=-=-=--