[procps] Re: w and "make check"

  • From: Alfredo Esteban <aedelatorre@xxxxxxxxx>
  • To: procps@xxxxxxxxxxxxx
  • Date: Sat, 30 Jun 2012 11:59:50 +0200

2012/6/30 Mike Frysinger <vapier@xxxxxxxxxx>
>
> why not just run the tests in LC_ALL=C ?
> -mike

This change fix the problem when running dejagnu test but
inconsistency in Spanish speaker systems persists. All the text is
English and it makes no sense to have two different decimal marks. It
is confusing for us also because comma is used as value separator:

load average: 0,53, 0,66, 0,55

Since this output is not translated and is entirely in English, what
do you think about setting numeric locale to "C"?:

> git diff w.c
diff --git a/w.c b/w.c
index 2e79980..f61b7f0 100644
--- a/w.c
+++ b/w.c
@@ -483,6 +483,7 @@ int main(int argc, char **argv)

        program_invocation_name = program_invocation_short_name;
        setlocale (LC_ALL, "");
+       setlocale (LC_NUMERIC, "C"); // avoid using other decimal mark than dot
        bindtextdomain(PACKAGE, LOCALEDIR);
        textdomain(PACKAGE);
        atexit(close_stdout);

Alfredo

Other related posts: