locale-print-LANGUAGE
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Fri, 20 Sep 2019 19:39:03 +0000 (20:39 +0100)
committerAurelien Jarno <aurel32@debian.org>
Fri, 20 Sep 2019 19:39:03 +0000 (20:39 +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

index 8af0d78a778c6e31a367e117bf3c6edefda0bc62..de325c7c5d33d4cb3bdd97ed308c16a091f20429 100644 (file)
@@ -795,11 +795,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)