From: Jim Meyering Date: Tue, 15 Jun 2004 18:00:20 +0000 (+0000) Subject: Include "hard-locale.h". X-Git-Tag: v5.3.0~1336 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db2fa4fdcdc0a6ccb1087b62a48c2e0a6e91fdec;p=thirdparty%2Fcoreutils.git Include "hard-locale.h". (main): When in a non-POSIX locale, ignore POSIXLY_CORRECT, since POSIX specifies the behavior only in the POSIX locale. --- diff --git a/src/pr.c b/src/pr.c index 4492698c74..733ef62d8c 100644 --- a/src/pr.c +++ b/src/pr.c @@ -316,6 +316,7 @@ #include #include "system.h" #include "error.h" +#include "hard-locale.h" #include "mbswidth.h" #include "posixver.h" #include "xstrtol.h" @@ -1074,8 +1075,8 @@ main (int argc, char **argv) } if (! date_format) - date_format = (getenv ("POSIXLY_CORRECT") - ? dcgettext (NULL, "%b %e %H:%M %Y", LC_TIME) + date_format = (getenv ("POSIXLY_CORRECT") && !hard_locale (LC_TIME) + ? "%b %e %H:%M %Y" : "%Y-%m-%d %H:%M"); /* Now we can set a reasonable initial value: */