[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] Error when compiling with OPTION_EGLIBC_LOCALE_CODE disabled



I was seeing errors about redefined type building xlocale.c and
wcsmbsload.c with OPTION_EGLIBC_LOCALE_CODE disabled.  I believe this is
due to a typo in the last definition of DEFINE_CATEGORY, as in the
attached patch.  It does build with this patch applied.

Does this seem right?

diff -urpN eglibc-2_12.orig/locale/xlocale.c eglibc-2_12/locale/xlocale.c
--- eglibc-2_12.orig/locale/xlocale.c	2010-09-26 11:29:08.341490994 -0600
+++ eglibc-2_12/locale/xlocale.c	2010-09-26 11:01:13.659156508 -0600
@@ -84,7 +84,7 @@ const struct __locale_struct _nl_C_locob
    pointers here.  */
 #if defined (NL_CURRENT_INDIRECT)
 #define DEFINE_CATEGORY(category, category_name, items, a)      \
-  __thread struct locale_data * const *_nl_current_##category   \
+  __thread struct __locale_data * const *_nl_current_##category   \
   attribute_hidden = &_nl_C_locobj.__locales[category];
 #include "categories.def"
 #undef DEFINE_CATEGORY
diff -urpN eglibc-2_12.orig/wcsmbs/wcsmbsload.c eglibc-2_12/wcsmbs/wcsmbsload.c
--- eglibc-2_12.orig/wcsmbs/wcsmbsload.c	2010-01-26 04:27:38.000000000 -0700
+++ eglibc-2_12/wcsmbs/wcsmbsload.c	2010-09-26 11:28:27.361522031 -0600
@@ -218,7 +218,7 @@ __wcsmbs_load_conv (struct __locale_data
 #else
 void
 internal_function
-__wcsmbs_load_conv (struct locale_data *new_category)
+__wcsmbs_load_conv (struct __locale_data *new_category)
 {
   /* When OPTION_EGLIBC_LOCALE_CODE is disabled, we should never reach
      this point: there is no way to change locales, so every locale