locale-print-LANGUAGE
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Wed, 7 Feb 2024 18:25:17 +0000 (18:25 +0000)
committerRaspbian forward porter <root@raspbian.org>
Wed, 7 Feb 2024 18:25:17 +0000 (18:25 +0000)
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

locale/programs/locale.c
locale/tst-locale-locpath.sh

index 1d1a9b2f0081fcd15d2e25f748c7336a6e4ad3e9..3d7c6c11c9e4a7f6fad73f0e2ed3103227b10ed2 100644 (file)
@@ -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)
index 398cd7195b3386cee8710cf43c77289c8707e850..71b0a0faccd9a3bdf566cc2cf42dc76a8576f09c 100644 (file)
@@ -54,6 +54,7 @@ EOF
 
 cat > "$testroot/stdout-expected" <<EOF
 LANG=
+LANGUAGE=
 LC_CTYPE="invalid-locale"
 LC_NUMERIC="invalid-locale"
 LC_TIME="invalid-locale"