On Sun, Sep 15, 2019 at 10:14:07AM -0400, Paul Smith wrote: > I see. I wonder why it works for me. i was thinking your system couldn't do anything other than the default, but your german test demonstrates it can. > > > Let me come up with a fix for 'perl run_make_tests.pl'.
if you set use strict; use warnings; perl will tell you that it does not know what POSIX::LC_MESSAGES is. This patch initializes has_posix right here in test_driver.pl and pulls in locale_h. This patch sets LC_ALL because we saw that LANG has an affect. This patch won't help those who don't have POSIX.pm (windows?). I suggest we still set LC_ALL=C in the shell program for systems w/o POSIX.pm. diff --git a/tests/test_driver.pl b/tests/test_driver.pl index 4af84da..fb3f0a5 100644 --- a/tests/test_driver.pl +++ b/tests/test_driver.pl @@ -60,9 +60,11 @@ $perl_name =~ tr,\\,/,; # We want them from the C locale regardless of our current locale. my $loc = undef; -if ($has_POSIX) { - $loc = POSIX::setlocale(POSIX::LC_MESSAGES); - POSIX::setlocale(POSIX::LC_MESSAGES, 'C'); +my $has_posix = eval { require "POSIX.pm" }; +if ($has_posix) { + use POSIX 'locale_h'; + $loc = POSIX::setlocale(POSIX::LC_ALL); + POSIX::setlocale(POSIX::LC_ALL, 'C'); } $ERR_no_such_file = undef; @@ -96,7 +98,7 @@ if (open(my $F, '<', 'file.out')) { unlink('file.out') or die "Failed to delete file.out: $!\n"; -$loc and POSIX::setlocale(POSIX::LC_MESSAGES, $loc); +$loc and POSIX::setlocale(POSIX::LC_ALL, $loc); # %makeENV is the cleaned-out environment. %makeENV = (); > Thanks for helping me debug! Thank you, Paul, for your work on gmake. i'll be glad to help. regards, Dmitry > _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make