diff options
-rw-r--r-- | extra/locale/gen_wc8bit.c | 5 | ||||
-rw-r--r-- | extra/locale/gen_wctype.c | 5 | ||||
-rw-r--r-- | libc/sysdeps/linux/common/bits/uClibc_locale.h | 11 |
3 files changed, 13 insertions, 8 deletions
diff --git a/extra/locale/gen_wc8bit.c b/extra/locale/gen_wc8bit.c index 75054667a..8a6d47a11 100644 --- a/extra/locale/gen_wc8bit.c +++ b/extra/locale/gen_wc8bit.c @@ -7,12 +7,13 @@ #include <wctype.h> #include <limits.h> -#ifndef __UCLIBC__ +#ifndef _CTYPE_H +#define _CTYPE_H +#endif #ifndef _WCTYPE_H #define _WCTYPE_H #endif #include "../../libc/sysdeps/linux/common/bits/uClibc_ctype.h" -#endif /* #define CTYPE_PACKED */ diff --git a/extra/locale/gen_wctype.c b/extra/locale/gen_wctype.c index a9bcf614b..6a90b92c7 100644 --- a/extra/locale/gen_wctype.c +++ b/extra/locale/gen_wctype.c @@ -10,12 +10,13 @@ #include <wchar.h> #include <ctype.h> -#ifndef __UCLIBC__ +#ifndef _CTYPE_H +#define _CTYPE_H +#endif #ifndef _WCTYPE_H #define _WCTYPE_H #endif #include "../../libc/sysdeps/linux/common/bits/uClibc_ctype.h" -#endif /* 0x9 : space blank */ /* 0xa : space */ diff --git a/libc/sysdeps/linux/common/bits/uClibc_locale.h b/libc/sysdeps/linux/common/bits/uClibc_locale.h index 88226c638..0b8699e32 100644 --- a/libc/sysdeps/linux/common/bits/uClibc_locale.h +++ b/libc/sysdeps/linux/common/bits/uClibc_locale.h @@ -71,7 +71,9 @@ #include <stdint.h> #include <bits/uClibc_touplow.h> +#if defined(_LIBC) && !defined(__UCLIBC_GEN_LOCALE) #include <bits/uClibc_locale_data.h> +#endif extern void _locale_set(const unsigned char *p); extern void _locale_init(void); @@ -96,6 +98,7 @@ enum { * In particular, C/POSIX locale is '#' + "\x80\x01"}*LC_ALL + nul. */ +#if defined(_LIBC) && !defined(__UCLIBC_GEN_LOCALE) typedef struct { uint16_t num_weights; uint16_t num_starters; @@ -139,7 +142,7 @@ typedef struct { /* static unsigned char cur_locale[LOCALE_STRING_SIZE]; */ -typedef struct { +typedef struct __uclibc_locale_struct { #ifdef __UCLIBC_HAS_XLOCALE__ const __ctype_mask_t *__ctype_b; const __ctype_touplow_t *__ctype_tolower; @@ -311,10 +314,10 @@ typedef struct { } __uclibc_locale_t; -typedef __uclibc_locale_t *__locale_t; - -extern __locale_t __global_locale; +extern struct __uclibc_locale_struct * __global_locale; +#endif +typedef struct __uclibc_locale_struct *__locale_t; extern int __locale_mbrtowc_l(wchar_t *__restrict dst, const char *__restrict src, |