From: GNU Libc Maintainers Date: Wed, 18 Jun 2025 04:49:31 +0000 (+0200) Subject: locale-print-LANGUAGE X-Git-Tag: archive/raspbian/2.41-9+rpi1^2~78 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=d2bd380186691ce5c24e54e434b97a4d87567439;p=glibc.git locale-print-LANGUAGE Comments tell that LANG has to be the first value, and LC_ALL the last one. Thus LANGUAGE is printed between them. # DP: Dpatch author: Denis Barbier # DP: Patch author: Denis Barbier # DP: Upstream status: not submitted # DP: Date: 2006-01-08 Gbp-Pq: Topic locale Gbp-Pq: Name locale-print-LANGUAGE.diff --- diff --git a/locale/programs/locale.c b/locale/programs/locale.c index 7e8832dc3..0feef25f9 100644 --- a/locale/programs/locale.c +++ b/locale/programs/locale.c @@ -797,11 +797,15 @@ static void show_locale_vars (void) { const char *lcall = getenv ("LC_ALL") ?: ""; + const char *language = getenv ("LANGUAGE") ?: ""; const char *lang = getenv ("LANG") ?: ""; /* LANG has to be the first value. */ print_assignment ("LANG", lang, false); + if (getenv ("POSIXLY_CORRECT") == NULL) + printf ("LANGUAGE=%s\n", language); + /* Now all categories in an unspecified order. */ for (size_t cat_no = 0; cat_no < NCATEGORIES; ++cat_no) if (cat_no != LC_ALL) diff --git a/locale/tst-locale-locpath.sh b/locale/tst-locale-locpath.sh index 5c5b7610a..e57440dcf 100644 --- a/locale/tst-locale-locpath.sh +++ b/locale/tst-locale-locpath.sh @@ -54,6 +54,7 @@ EOF cat > "$testroot/stdout-expected" <