std::runtime_error on std::locale("")
Takashi Yano
takashi.yano@nifty.ne.jp
Sat Sep 23 08:23:59 GMT 2023
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?
--
Takashi Yano <takashi.yano@nifty.ne.jp>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Cygwin-libstdc++-locale.patch
URL: <https://cygwin.com/pipermail/cygwin/attachments/20230923/fd292e6a/attachment-0002.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gcc.cygport
URL: <https://cygwin.com/pipermail/cygwin/attachments/20230923/fd292e6a/attachment-0003.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gcc-11.4.0.src.patch
Type: text/poain
Size: 659 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin/attachments/20230923/fd292e6a/attachment-0001.bin>
More information about the Cygwin
mailing list