summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
Diffstat (limited to 'locale')
-rw-r--r--locale/C-ctype.c3
-rw-r--r--locale/programs/ld-ctype.c11
2 files changed, 14 insertions, 0 deletions
diff --git a/locale/C-ctype.c b/locale/C-ctype.c
index 344596d972..e93a585538 100644
--- a/locale/C-ctype.c
+++ b/locale/C-ctype.c
@@ -349,9 +349,12 @@ const struct locale_data _nl_C_LC_CTYPE =
   {
     { string: _nl_C_LC_CTYPE_class },
     { string: (const char *) _nl_C_LC_CTYPE_toupper },
+    { string: NULL },
     { string: (const char *) _nl_C_LC_CTYPE_tolower },
+    { string: NULL },
     { string: _nl_C_LC_CTYPE_class32 },
     { string: (const char *) _nl_C_LC_CTYPE_names },
+    { string: NULL },
     { word: 256 },
     { word: 1 },
     { string: "upper\0" "lower\0" "alpha\0" "digit\0" "xdigit\0" "space\0"
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index ba40f2eb42..e297aeb254 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -864,6 +864,17 @@ ctype_output (struct localedef_t *locale, struct charmap_t *charmap,
       if (elem < _NL_ITEM_INDEX (_NL_NUM_LC_CTYPE))
 	switch (elem)
 	  {
+#define CTYPE_EMPTY(name) \
+	  case name:							      \
+	    iov[2 + elem + offset].iov_base = "";			      \
+	    iov[2 + elem + offset].iov_len = 0;				      \
+	    idx[elem + 1] = idx[elem];					      \
+	    break
+
+	  CTYPE_EMPTY(_NL_CTYPE_GAP1);
+	  CTYPE_EMPTY(_NL_CTYPE_GAP2);
+	  CTYPE_EMPTY(_NL_CTYPE_GAP3);
+
 #define CTYPE_DATA(name, base, len)					      \
 	  case _NL_ITEM_INDEX (name):					      \
 	    iov[2 + elem + offset].iov_base = (base);			      \