]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use proper extern declaration for _nl_C_LC_CTYPE_{class,toupper,tolower}
authorFlorian Weimer <fweimer@redhat.com>
Fri, 16 May 2025 17:53:09 +0000 (19:53 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 14 Aug 2025 09:49:23 +0000 (11:49 +0200)
The existing initializers already contain explicit casts.  Keep them
due to int/uint32_t mismatch.

Reviewed-by: Frédéric Bérat <fberat@redhat.com>
(cherry picked from commit e0c0f856f58ceb68800a964c36c15c606e7a8c4c)

ctype/ctype-info.c
include/ctype.h
locale/xlocale.c

index 71d1c8e3b4660d54c7b5bff0e245b8661390515a..94e312d91ff7632364f1a36636bc5a2e9d3b8e10 100644 (file)
@@ -41,10 +41,7 @@ libc_hidden_def (__ctype_init)
 #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
 
 /* Defined in locale/C-ctype.c.  */
-extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
 extern const char _nl_C_LC_CTYPE_class32[] attribute_hidden;
-extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden;
-extern const char _nl_C_LC_CTYPE_tolower[] attribute_hidden;
 extern const char _nl_C_LC_CTYPE_class_upper[] attribute_hidden;
 extern const char _nl_C_LC_CTYPE_class_lower[] attribute_hidden;
 extern const char _nl_C_LC_CTYPE_class_alpha[] attribute_hidden;
index e993adc86da43b7c3047834c6aa1e051fed532ac..ae078a63d355af618e5f3e3d4294d0c67b6beb53 100644 (file)
@@ -63,6 +63,11 @@ __ctype_tolower_loc (void)
 #   define __isdigit_l(c, l) ({ int __c = (c); __c >= '0' && __c <= '9'; })
 #  endif  /* Not __NO_CTYPE.  */
 
+/* For use in initializers.  */
+extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
+extern const uint32_t _nl_C_LC_CTYPE_toupper[] attribute_hidden;
+extern const uint32_t _nl_C_LC_CTYPE_tolower[] attribute_hidden;
+
 # endif        /* IS_IN (libc).  */
 #endif  /* Not _ISOMAC.  */
 
index f2b9d03303e6653d5ee32f0055443c7c3fb46459..d11c1cbf8c65ad54add8d16532f478e36d2a5a50 100644 (file)
 
 #include <locale.h>
 #include "localeinfo.h"
+#include <ctype.h>
 
 #define DEFINE_CATEGORY(category, category_name, items, a) \
 extern struct __locale_data _nl_C_##category;
 #include "categories.def"
 #undef DEFINE_CATEGORY
 
-/* Defined in locale/C-ctype.c.  */
-extern const char _nl_C_LC_CTYPE_class[] attribute_hidden;
-extern const char _nl_C_LC_CTYPE_toupper[] attribute_hidden;
-extern const char _nl_C_LC_CTYPE_tolower[] attribute_hidden;
-
-
 const struct __locale_struct _nl_C_locobj attribute_hidden =
   {
     .__locales =