From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dmta0003.nifty.com (mta-snd00010.nifty.com [106.153.226.42]) by sourceware.org (Postfix) with ESMTPS id 9851E3858C30 for ; Sat, 23 Sep 2023 08:42:31 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9851E3858C30 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from HP-Z230 by dmta0003.nifty.com with ESMTP id <20230923084229699.SCPJ.94728.HP-Z230@nifty.com> for ; Sat, 23 Sep 2023 17:42:29 +0900 Date: Sat, 23 Sep 2023 17:42:29 +0900 From: Takashi Yano To: cygwin@cygwin.com Subject: Re: std::runtime_error on std::locale("") Message-Id: <20230923174229.c6f002c7c0697458a0273ca1@nifty.ne.jp> In-Reply-To: <20230923172359.d854a5a98afbc44beaf50c78@nifty.ne.jp> References: <20230922011204.bb166498090e6cbe163349f3@nifty.ne.jp> <87o7huzos2.fsf@Otto.invalid> <20230923172359.d854a5a98afbc44beaf50c78@nifty.ne.jp> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,KAM_DMARC_STATUS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Sat, 23 Sep 2023 17:23:59 +0900 Takashi Yano via Cygwin wrote: > On Fri, 22 Sep 2023 08:48:45 +0200 > ASSI wrote: > > Takashi Yano via Cygwin writes: > > > I wonder why the following code throws std::runtime_error > > > even though the LC_ALL is set to valid locale other than "C". > > > This does not occur only when LC_ALL is set to "C". > > > > This functionality is currently only supported for Glibc targets in > > libstdc++. I seem to remember that I've looked into this some time ago, > > but there didn't seem to be an easy way of enabling it for Cygwin at > > that time. > > Thanks for the answer. > > It might not be an easy way, but I tried to enabling the locale > feature for libstdc++. > > Please try: > > 1) Run cygport gcc prep > 2) Remove libstdc++-v3/config/locale/generic > 3) Copy libstdc++-v3/config/locale/gnu to libstdc++-v3/config/locale/generic > 4) Apply patches attached to the working source directory. > 5) Run cygport gcc compile > > I also tried to automate above steps in gcc.cygport. > > Further, I tested and confirmed that a few test cases works as expected. > > What do you think of this idea? Sorry, the patch file name gcc-11.4.0.src.patch should be gcc-11.4.0-1.src.patch. -- Takashi Yano