This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix Perl_langinfo() non-threaded bug
authorKarl Williamson <khw@cpan.org>
Sat, 21 Oct 2017 17:12:20 +0000 (11:12 -0600)
committerKarl Williamson <khw@cpan.org>
Sat, 21 Oct 2017 17:23:08 +0000 (11:23 -0600)
commitae74815b40d870ef11ef5fb15500082a204b2961
treee3ad9e6ba855ad672f02d244340ab8d97da27006
parent3d10fa085102a79a96d9e335384c3f56f3b6b9cc
Fix Perl_langinfo() non-threaded bug

Perl_langinfo() is supposed to return a pointer to internal storage that
is supposed to remain valid until the next call to it.  That should come
automatically on single-threaded perls.  The previous version took
advantage of this to avoid copying the result to a buffer, and just
called plain nl_langinfo().  However, it turns out that some systems
destroy the internal space also when a setlocale() is done.  That means
the result must be copied in all instances.
locale.c