This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
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.