Przeglądaj źródła

Allow to build gcc/libstdc++ w/ LOCALE enabled, XLOCALE probably won't work though

Peter S. Mazinger 19 lat temu
rodzic
commit
2a31a70ef1
1 zmienionych plików z 3 dodań i 2 usunięć
  1. 3 2
      libc/sysdeps/linux/common/bits/uClibc_locale.h

+ 3 - 2
libc/sysdeps/linux/common/bits/uClibc_locale.h

@@ -67,7 +67,7 @@
 /**********************************************************************/
 #ifndef __LOCALE_C_ONLY
 
-#if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc)
+#if defined _LIBC /* && (defined IS_IN_libc || defined NOT_IN_libc) */
 #include <stddef.h>
 #include <stdint.h>
 #include <bits/uClibc_touplow.h>
@@ -100,7 +100,7 @@ enum {
   * In particular, C/POSIX locale is '#' + "\x80\x01"}*LC_ALL + nul.
   */
 
-#if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc) && !defined __UCLIBC_GEN_LOCALE
+#if defined _LIBC && !defined __UCLIBC_GEN_LOCALE /* && (defined IS_IN_libc || defined NOT_IN_libc) */
 typedef struct {
 	uint16_t num_weights;
 	uint16_t num_starters;
@@ -322,6 +322,7 @@ extern struct __uclibc_locale_struct * __global_locale;
 
 typedef struct __uclibc_locale_struct *__locale_t;
 
+/* if we need to leave only _LIBC, then attribute_hidden is not usable */
 #if defined _LIBC && (defined IS_IN_libc || defined NOT_IN_libc)
 extern int __locale_mbrtowc_l(wchar_t *__restrict dst,
 							  const char *__restrict src,