public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: cygwin@cygwin.com
Subject: Re: locale bug?
Date: Mon, 17 May 2021 19:07:38 +0200	[thread overview]
Message-ID: <87cztpxp9h.fsf@Rainer.invalid> (raw)
In-Reply-To: <062101d74b26$85d13600$9173a200$@pdinc.us> (Jason Pyeron's message of "Mon, 17 May 2021 10:11:25 -0400")

Jason Pyeron writes:
> While working an updated build of pdfgrep, I ran in to a crash when
> the environment local was something other than LC_ALL=C.
>
> Looking at http://www.cplusplus.com/reference/locale/locale/locale/
> the empty string passed to the constructor should use the
> environment's default locale and if the “argument” does not represent
> a valid C-locale in the implementation, runtime_error is thrown.

It looks like the C++ standard library goes through all the right
motions, but then fails to construct an actual locale object as it's
supposed to do and thus errors out.  Cygwin is not glibc based, so this
seems to be essentially the same bug as described here:

https://stackoverflow.com/questions/58245286/why-does-stdlocale-name-give-different-results-on-clang-and-gcc

and elsewhere.  This bug is at least 17 years old by now, so if anybody
comes up with a patch that would be helpful.  It's entirely possible
that the configury failed to detect (if it even tried) that Cygwin has
(or should have) thread-safe locale API by now, but it might have a
different API than glibc.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

      reply	other threads:[~2021-05-17 17:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 14:11 Jason Pyeron
2021-05-17 17:07 ` Achim Gratz [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87cztpxp9h.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).