locale-print-LANGUAGE
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Mon, 11 May 2020 00:04:03 +0000 (01:04 +0100)
committerSamuel Thibault <sthibault@debian.org>
Mon, 11 May 2020 00:04:03 +0000 (01:04 +0100)
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 6eae3175bb3cad9a7d89c859cb095c3fd4b0cfcf..b37785dbd4c534288c33ab048e9e9322185f5162 100644 (file)
@@ -796,11 +796,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 b83de90a39121af6dbfab12f928f7eb0e2ab588d..caa3fddf084acce392f733847dc991e467f665b7 100644 (file)
@@ -56,6 +56,7 @@ EOF
 
 cat > "$testroot/stdout-expected" <<EOF
 LANG=
+LANGUAGE=
 LC_CTYPE="invalid-locale"
 LC_NUMERIC="invalid-locale"
 LC_TIME="invalid-locale"