LC_IDENTIFICATION-optional-fields
authorGNU Libc Maintainers <debian-glibc@lists.debian.org>
Thu, 17 Jul 2025 11:21:32 +0000 (13:21 +0200)
committerAurelien Jarno <aurel32@debian.org>
Thu, 17 Jul 2025 11:21:32 +0000 (13:21 +0200)
In LC_IDENTIFICATION, audience, application and abbreviation keywords
are optional, thus do not report an error if they are not defined.

# 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 LC_IDENTIFICATION-optional-fields.diff

locale/programs/ld-identification.c

index 6f590f09ae38de6f7348c358c80bd9b83e9a2ddc..cf15cfc96b11d1aefe30912ce5a28003f8a2e960 100644 (file)
@@ -144,6 +144,9 @@ No definition for %s category found"), "LC_IDENTIFICATION");
                        #cat);                                                \
       identification->cat = "";                                                      \
     }
+#define TEST_ELEM_OPT(cat)                                                   \
+  if (identification->cat == NULL)                                           \
+    identification->cat = "";                                                \
 
   TEST_ELEM (title);
   TEST_ELEM (source);
@@ -154,9 +157,9 @@ No definition for %s category found"), "LC_IDENTIFICATION");
   TEST_ELEM (fax);
   TEST_ELEM (language);
   TEST_ELEM (territory);
-  TEST_ELEM (audience);
-  TEST_ELEM (application);
-  TEST_ELEM (abbreviation);
+  TEST_ELEM_OPT (audience);
+  TEST_ELEM_OPT (application);
+  TEST_ELEM_OPT (abbreviation);
   TEST_ELEM (revision);
   TEST_ELEM (date);