This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix Perl_langinfo currency symbol for non-nl_langinfo systems
authorKarl Williamson <khw@cpan.org>
Mon, 26 Feb 2018 04:28:42 +0000 (21:28 -0700)
committerKarl Williamson <khw@cpan.org>
Mon, 26 Feb 2018 04:51:20 +0000 (21:51 -0700)
Commit 628ff75a4a7ac013dad43df7a53fcb55bf758ed7 broke this.

locale.c

index 4d3b248..d7fe766 100644 (file)
--- a/locale.c
+++ b/locale.c
@@ -2581,13 +2581,13 @@ S_my_nl_langinfo(const int item, bool toggle)
                 { /*  khw couldn't figure out how the localedef specifications
                       would show that the $ should replace the radix; this is
                       just a guess as to how it might work.*/
                 { /*  khw couldn't figure out how the localedef specifications
                       would show that the $ should replace the radix; this is
                       just a guess as to how it might work.*/
-                    retval = ".";
+                    PL_langinfo_buf[0] = '.';
                 }
                 else if (lc->p_cs_precedes) {
                 }
                 else if (lc->p_cs_precedes) {
-                    retval = "-";
+                    PL_langinfo_buf[0] = '-';
                 }
                 else {
                 }
                 else {
-                    retval = "+";
+                    PL_langinfo_buf[0] = '+';
                 }
 
                 LOCALE_UNLOCK;
                 }
 
                 LOCALE_UNLOCK;