HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/src/glibc/debian/patches/locale/LC_IDENTIFICATION-optional-fields.diff
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

---
 locale/programs/ld-identification.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/locale/programs/ld-identification.c
+++ b/locale/programs/ld-identification.c
@@ -145,6 +145,9 @@
 			#cat);						      \
       identification->cat = "";						      \
     }
+#define TEST_ELEM_OPT(cat)						      \
+  if (identification->cat == NULL)					      \
+    identification->cat = "";						      \
 
   TEST_ELEM (title);
   TEST_ELEM (source);
@@ -155,9 +158,9 @@
   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);