summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO54
-rw-r--r--extra/Configs/Config.in393
-rw-r--r--extra/locale/Makefile8
-rw-r--r--extra/locale/gen_collate.c34
-rw-r--r--extra/locale/gen_ldc.c78
-rw-r--r--extra/locale/gen_locale.c62
-rw-r--r--extra/locale/gen_wc8bit.c68
-rw-r--r--extra/locale/gen_wctype.c18
-rw-r--r--extra/locale/locale_mmap.h79
-rw-r--r--include/ctype.h443
-rw-r--r--include/langinfo.h9
-rw-r--r--include/libintl.h126
-rw-r--r--include/locale.h97
-rw-r--r--include/signal.h2
-rw-r--r--include/stdio.h16
-rw-r--r--include/stdlib.h313
-rw-r--r--include/string.h75
-rw-r--r--include/sys/cdefs.h48
-rw-r--r--include/time.h90
-rw-r--r--include/wchar.h411
-rw-r--r--include/wctype.h108
-rw-r--r--include/xlocale.h62
-rw-r--r--libc/inet/rpc/rcmd.c13
-rw-r--r--libc/misc/Makefile4
-rw-r--r--libc/misc/assert/__assert.c16
-rw-r--r--libc/misc/ctype/Makefile29
-rw-r--r--libc/misc/ctype/ctype.c1041
-rw-r--r--libc/misc/intl/Makefile50
-rw-r--r--libc/misc/intl/intl.c149
-rw-r--r--libc/misc/locale/Makefile31
-rw-r--r--libc/misc/locale/locale.c1103
-rw-r--r--libc/misc/time/Makefile13
-rw-r--r--libc/misc/time/time.c245
-rw-r--r--libc/misc/wchar/Makefile1
-rw-r--r--libc/misc/wchar/wchar.c111
-rw-r--r--libc/misc/wchar/wstdio.c37
-rw-r--r--libc/misc/wctype/Makefile20
-rw-r--r--libc/misc/wctype/wctype.c661
-rw-r--r--libc/stdio/Makefile12
-rw-r--r--libc/stdio/old_vfprintf.c9
-rw-r--r--libc/stdio/printf.c1151
-rw-r--r--libc/stdio/scanf.c2370
-rw-r--r--libc/stdio/stdio.c200
-rw-r--r--libc/stdlib/Makefile48
-rw-r--r--libc/stdlib/stdlib.c252
-rw-r--r--libc/stdlib/strtod.c711
-rw-r--r--libc/string/Makefile32
-rw-r--r--libc/string/wstring.c262
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_ctype.h2
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_fpmax.h132
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_locale.h129
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_stdio.h123
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_touplow.h44
-rw-r--r--libc/sysdeps/linux/common/bits/uClibc_uwchar.h56
-rw-r--r--libc/sysdeps/linux/common/bits/xopen_lim.h6
-rw-r--r--libc/unistd/getopt.c6
-rw-r--r--libpthread/linuxthreads/Makefile5
-rw-r--r--libpthread/linuxthreads/internals.h6
-rw-r--r--libpthread/linuxthreads/locale.c58
-rw-r--r--libpthread/linuxthreads/manager.c9
-rw-r--r--libpthread/linuxthreads/pthread.c14
61 files changed, 8923 insertions, 2832 deletions
diff --git a/TODO b/TODO
index 8cfac9d7d..0737971c9 100644
--- a/TODO
+++ b/TODO
@@ -25,53 +25,43 @@ I'm currently working on completing the wide char and locale support.
1) Little things that need fixing:
----------------------------------
- *) Fix bug in *printf: outdigit precison bug
- a) Use locale decimal point in *printf() and strto*d() -- slightly
- complicated by the fact that at least one locale uses a wchar
- radix that does not map to a single byte in UTF-8.
- b) Use locale digit grouping in *printf() flosting point.
- c) Deal with mb format string issues in scanf and strftime (at least).
- d) Support gnu/bsd extension members tm_gmtoff and tm_zone in struct tm.
+ a) Fix the ctype support for 8-bit locales.
+ b) Fix bug in *printf: outdigit precison bug
+ c) Check that gnu/bsd extension members tm_gmtoff and tm_zone in struct tm
+ are respected where they should be.
+ d) Implement the obstack printf funcs for glibc compat.
+ e) Implement glibc 'a' flag for scanf string conversions.
+ f) Allow use of the older non-table-based ctype functions when using
+ stub locale support. (smaller)
- 2) Implement wide char floating point conversion functions -- wcsto*().
-
- 3) Reimplement scanf for narrow and wide streams.
- -------------------------------------------------
- The current char version of scanf() needs some cleanup. Also,
- modifying the char version of scanf() to create the wchar versions
- will require reworking the implementation of matching char sets
- (enclosed in []).
-
- 4) Additional str{f|p}time issues.
+ 2) Additional str{f|p}time issues.
----------------------------------
a) Spacing issue wrt strptime.
b) Support locale specific alternate digits. (data is in place)
c) Support locale era in year designations. (data is in place)
+ d) Deal with mb format string issues in strftime.
+ e) Implement wcsftime.
- 5) Other locale issues (my implementation):
+ 3) Other locale issues (my implementation):
-------------------------------------------
- a) Additional clean up of ctype and wctype, primarily to allow for mmap'd
- locales and updateable locale data.
- b) Build a C-only locale object for linking and allow full locale data to
- be mmap'd in later, to allow updating and to make locale support useful
- for staticly linked apps.
- c) Adapt regex lib to use my collation data and add the necessary collating
+ a) Do a little more clean up of ctype and wctype.
+ b) Rework of the locale data organization to make using locales reasonable
+ when staticly linking. (mmap)
+ c) Rewrite the locale data generation tools to process the text specifications
+ rather than relying on glibc.
+ d) Adapt regex lib to use my collation data and add the necessary collating
item tables to support SUSv3 required features.
- d) transliteration of unsupported wchars in 8-bit locales (like glibc).
- e) Support ISO/IEC 14652 draft locale extensions (LC_PAPER, etc).
+ e) transliteration of unsupported wchars in 8-bit locales (like glibc).
+ f) Support ISO/IEC 14652 draft locale extensions (LC_PAPER, etc).
+ g) Implement strfrom.
+ h) Shift-state codeset locale support?
Other stuff:
-Reimplement _dtostr to correct its deficiencies (%A support!) and hopefully
- reduce its size.
-
Move the target-specific sysconf.c generator to extra (as it needs to be
run on the target) and fix libc/unistd/Makefile.
-Make errno and endptr handling the default in the strto* functions and
- document how to turn those off to save space.
-
-----------------------------------------------------------------------------
ds's list:
diff --git a/extra/Configs/Config.in b/extra/Configs/Config.in
index bbfbc854d..9de4a5e6f 100644
--- a/extra/Configs/Config.in
+++ b/extra/Configs/Config.in
@@ -298,12 +298,48 @@ endmenu
menu "String and Stdio Support"
+config UCLIBC_HAS_CTYPE_SIGNED
+ bool "Support Signed Characters In `ctype.h' Functions."
+ default y
+ help
+ Answer Y to enable support for passing signed char values to
+ the `ctype.h' functions. ANSI/ISO C99 and SUSv3 specify that
+ these functions are only defined for unsigned char values and
+ EOF. However, glibc allows negative signed char values as well
+ in order to support 'broken old programs'.
+
+ Most people will answer Y.
+
+choice
+ prompt "`ctype.h' Invalid Arg Behavior."
+ default UCLIBC_HAS_CTYPE_CHECKED
+ help
+ Please select the invalid arg behavior you want for the `ctype' functions.
+
+ The `ctype' functions are now implemented using table lookups, with
+ the arg being the index. This can result in incorrect memory accesses
+ or even segfaults for args outside of the allowed range.
+
+ NOTE: This only affects the `ctype' _functions_. It does not affect
+ the macro implementations.
+
+config UCLIBC_HAS_CTYPE_UNSAFE
+ bool "Do not check. (incorrect array access possible)"
+
+config UCLIBC_HAS_CTYPE_CHECKED
+ bool "Detect and handle appropriately."
+
+config UCLIBC_HAS_CTYPE_ENFORCED
+ bool "Issue a diagnostic and abort()."
+
+endchoice
+
config UCLIBC_HAS_WCHAR
bool "Wide Character Support"
default n
help
Answer Y to enable wide character support. This will make uClibc
- much larger.
+ much larger. It is also currently required for locale support.
Most people will answer N.
@@ -313,11 +349,67 @@ config UCLIBC_HAS_LOCALE
default n
help
Answer Y to enable locale support. This will make uClibc much
- bigger. uClibc's locale support is still under development, and
- should be finished in the next several weeks (November 2002).
+ bigger. uClibc's locale support is still under development.
Most people will wisely answer N.
+config UCLIBC_HAS_XLOCALE
+ bool "Extended Locale Support (experimental/incomplete)"
+ depends on UCLIBC_HAS_LOCALE
+ default n
+ help
+ Answer Y to enable extended locale support similar to that provided
+ by glibc. This is primarily intended to support libstd++ functionality.
+ However, it also allows thread-specific locale selection via uselocale().
+
+ Most people will answer N.
+
+config UCLIBC_HAS_SCANF_GLIBC_A_FLAG
+ bool "Support glibc's `a' flag for scanf string conversions"
+ default n
+ help
+ NOTE!!! Currently Not Implemented!!! Just A Place Holder!! NOTE!!!
+
+ Answer Y to enable support for glibc's `a' flag for the scanf string
+ conversions `%s', `%[', `%ls', `%l[`, and `%S'. This is used to
+ auto-allocate sufficient memory to hold the data retrieved.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_HEXADECIMAL_FLOATS
+ bool "Support hexadecimal float notation"
+ default n
+ help
+ Answer Y to enable support for hexadecimal float notation in the
+ (wchar and) char string to floating point conversion functions, as
+ well as support for the %a and %A conversion specifiers in the
+ *printf() and *scanf() functions.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_GLIBC_DIGIT_GROUPING
+ bool "Support glibc's `'' flag for allowing locale-specific digit grouping"
+ depends on UCLIBC_HAS_LOCALE
+ default n
+ help
+ Answer Y to enable support for glibc's `'' flag for allowing locale-specific
+ digit grouping in base 10 integer conversions and appropriate floating point
+ conversions in the *printf() and *scanf() functions.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_SCANF_LENIENT_DIGIT_GROUPING
+ bool "Do not require digit grouping when the `'' flag is specified"
+ depends on UCLIBC_HAS_GLIBC_DIGIT_GROUPING
+ default y
+ help
+ Answer Y to make digit grouping optional when the `'' flag is specified.
+ This is the standard glibc behavior. If the initial string of digits
+ exceeds the maximum group number, the input will be treated as a normal
+ non-grouped number.
+
+ Most people will answer N.
+
config USE_OLD_VFPRINTF
bool "Use the old vfprintf implementation"
default n
@@ -332,6 +424,293 @@ config USE_OLD_VFPRINTF
Most people will answer N.
+config UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS
+ int "Maximum number of positional args. Either 0 or >= 9."
+ depends on !USE_OLD_VFPRINTF
+ default 9
+ help
+ Set the maximum number of positional args supported by the printf/scanf
+ functions. The Single Unix Specification Version 3 requires a minimum
+ value of 9. Setting this to a value lower than 9 will disable positional
+ arg support and cause the NL_ARGMAX macro in limits.h to be #undef'd.
+ WARNING! The workspace to support positional args is currently allocated
+ on the stack. You probably don't want to set this to too high a value.
+
+ Most people will answer 9.
+
+
+config UCLIBC_HAS_TZ_CACHING
+ bool "Enable caching of the last valid timezone `TZ' string"
+ default y
+ help
+ Answer Y to enable caching of the last valid `TZ' string describing
+ the timezone setting. This allows a quick string compare to avoid
+ repeated parsing of unchanged `TZ' strings when tzset() is called.
+
+ Most people will answer Y.
+
+config UCLIBC_HAS_TZ_FILE
+ bool "Enable `/etc/TZ' file support to set a default timezone (uClibc-specific)"
+ default y
+ help
+ Answer Y to enable the setting of a default timezone for uClibc.
+
+ Ordinarily, uClibc gets the timezone information exclusively from the
+ `TZ' environment variable. In particular, there is no support for
+ the zoneinfo directory tree or the /etc/timezone file used by glibc.
+
+ With this option enabled, uClibc will use the value stored in the
+ file `/etc/TZ' (default path) to obtain timezone information if the
+ `TZ' environment variable is missing or has an invalid value. The
+ file consists of a single line (newline required) of text describing
+ the timezone in the format specified for the TZ environment variable.
+
+ Simply doing `echo CST6CDT > /etc/TZ' is enough to create a valid file.
+ See
+ http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html
+ for details on valid settings of `TZ'.
+
+ Most people will answer Y.
+
+config UCLIBC_TZ_FILE_PATH
+ string "Path to the `TZ' file for setting the global timezone"
+ depends on UCLIBC_HAS_TZ_FILE
+ default "/etc/TZ"
+ help
+ This is the path to the `TZ' file.
+
+ Most people will use the default of `/etc/TZ'.
+
+config UCLIBC_HAS_TZ_FILE_READ_MANY
+ bool "Repeatedly read the `/etc/TZ' file"
+ depends on UCLIBC_HAS_TZ_FILE
+ default y
+ help
+ Answer Y to enable repeated reading of the `/etc/TZ' file even after
+ a valid value has been read. This incurs the overhead of an open/read/close
+ for each tzset() call (explicit or implied). However, setting this
+ will allows applications to update their timezone information if the contents
+ of the file change.
+
+ Most people will answer Y.
+
+choice
+ prompt "Stdio buffer size"
+ default UCLIBC_HAS_STDIO_BUFSIZ_256
+ help
+ Please select a value for BUFSIZ. This will be used by the
+ stdio subsystem as the default buffer size for a file, and
+ affects fopen(), setvbuf(), etc.
+
+ NOTE: Setting this to `none' will disable buffering completely.
+ However, BUFSIZ will still be defined in stdio.h as 256 because
+ many applications use this value.
+
+config UCLIBC_HAS_STDIO_BUFSIZ_NONE
+ bool "none (WARNING - BUFSIZ will be 256 in stdio.h)"
+ depends !UCLIBC_HAS_WCHAR
+
+config UCLIBC_HAS_STDIO_BUFSIZ_256
+ bool "256 (minimum ANSI/ISO C99 value)"
+
+config UCLIBC_HAS_STDIO_BUFSIZ_512
+ bool "512"
+
+config UCLIBC_HAS_STDIO_BUFSIZ_1024
+ bool "1024"
+
+config UCLIBC_HAS_STDIO_BUFSIZ_2048
+ bool "2048"
+
+config UCLIBC_HAS_STDIO_BUFSIZ_4096
+ bool "4096"
+
+config UCLIBC_HAS_STDIO_BUFSIZ_8192
+ bool "8192"
+
+# If you add more choices, you will need to update uClibc_stdio.h.
+
+endchoice
+
+config UCLIBC_HAS_STDIO_GETC_MACRO
+ bool "Provide a macro version of getc()"
+ depends !UCLIBC_HAS_STDIO_BUFSIZ_NONE
+ default y
+ help
+ Provide a macro version of getc().
+
+ Most people will answer Y.
+
+config UCLIBC_HAS_STDIO_PUTC_MACRO
+ bool "Provide a macro version of putc()"
+ depends !UCLIBC_HAS_STDIO_BUFSIZ_NONE
+ default y
+ help
+ Provide a macro version of putc().
+
+ Most people will answer Y.
+
+config UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION
+ bool "Support auto-r/w transition"
+ default y
+ help
+ Answer Y to enable the stdio subsystem to automaticly transition
+ between reading and writing. This relaxes the ANSI/ISO C99 requirement:
+
+ When a file is opened with update mode ('+' as the second or third character
+ in the list of mode argument values), both input and output may be performed
+ on the associated stream. However, output shall not be directly followed by
+ input without an intervening call to the fflush function or to a file
+ positioning function (fseek, fsetpos, or rewind), and input shall not be
+ directly followed by output without an intervening call to a file positioning
+ function, unless the input operation encounters end­of­file.
+
+ Most people will answer Y.
+
+config UCLIBC_HAS_FOPEN_LARGEFILE_MODE
+ bool "Support an fopen() `F' flag for large file mode (uClibc-specific)"
+ depends on UCLIBC_HAS_LFS
+ default n
+ help
+ Answer Y to enable a uClibc-specific extension to allow passing an
+ additional `F' flag in the mode string for fopen() to specify that
+ the file should be open()ed with the O_LARGEFILE flag set.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE
+ bool "Support an fopen() `x' flag for exclusive mode (glibc-compat)"
+ default n
+ help
+ Answer Y to support a glibc extension to allow passing
+ additional `x' flag in the mode string for fopen() to specify that
+ the file should be open()ed with the O_EXCL flag set.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_GLIBC_CUSTOM_STREAMS
+ bool "Support fmemopen(), open_memstream(), and fopencookie() (glibc-compat)"
+ default n
+ help
+ Answer Y to support the glibc `custom stream' extension functions
+ fmemopen(), open_memstream(), and fopencookie().
+
+ NOTE: There are some minor differences regarding seeking behavior.
+
+ Most people will answer N.
+
+choice
+ prompt "Stdio builtin buffer size (uClibc-specific)"
+ depends !UCLIBC_HAS_STDIO_BUFSIZ_NONE
+ default UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE
+ help
+ When a FILE is created with fopen(), an attempt is made to allocate
+ a BUFSIZ buffer for it. If the allocation fails, fopen() will still
+ succeed but the FILE will be unbuffered.
+
+ This option adds a small amount of space to each FILE to act as an
+ emergeny buffer in the event of a buffer allocation failure.
+
+ Most people will answer None.
+
+config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE
+ bool "None"
+
+config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4
+ bool "4"
+
+config UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8
+ bool "8"
+
+# If you add more choices, you will need to update uClibc_stdio.h.
+
+endchoice
+
+config UCLIBC_HAS_PRINTF_M_SPEC
+ bool "Support the `%m' specifier in printf format strings (glibc-compat)"
+ default n
+ help
+ Answer Y to support a glibc extension to interpret `%m' in printf
+ format strings as an instruction to output the error message string
+ (as generated by strerror) corresponding to the current value of `errno'.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_GLIBC_CUSTOM_PRINTF
+ bool "Support glibc's register_printf_function() (glibc-compat)"
+ default n
+ help
+ Answer Y to support glibc's register_printf_function() to allow an
+ application to add its own printf conversion specifiers.
+
+ NOTE: This implementation limits the number or registered specifiers to 10.
+ NOTE: This implementation requires new conversion specifiers to be ASCII
+ characters (0-0x7f). This is to avoid problems with processing
+ format strings in locales with different multibyte conversions.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_ERRNO_MESSAGES
+ bool "Include the errno message text in the library"
+ default y
+ help
+ Answer Y if you want to include the errno message text in the
+ library. This adds about 3K to the library, but enables strerror()
+ to generate text other than `Unknown error <number>'.
+
+ Most people will answer Y.
+
+config UCLIBC_HAS_SYS_ERRLIST
+ bool "Support sys_errlist[] (obsolete-compat)"
+ depends on UCLIBC_HAS_ERRNO_MESSAGES
+ default n
+ help
+ Answer Y if you want to support the obsolete sys_errlist[].
+ This adds about 0.5k to the library, except for the mips
+ arch where it adds over 4K.
+
+ WARNING! In the future, support for sys_errlist[] may be unavailable
+ in at least some configurations. In fact, it may be removed altogether.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_SIGNUM_MESSAGES
+ bool "Include the signum message text in the library"
+ default y
+ help
+ Answer Y if you want to include the signum message text in the
+ library. This adds about 0.5K to the library, but enables strsignal()
+ to generate text other than `Unknown signal <number>'.
+
+ Most people will answer Y.
+
+config UCLIBC_HAS_SYS_SIGLIST
+ bool "Support sys_siglist[] (bsd-compat)"
+ depends on UCLIBC_HAS_SIGNUM_MESSAGES
+ default n
+ help
+ Answer Y if you want to support sys_siglist[].
+
+ WARNING! In the future, support for sys_siglist[] may be unavailable
+ in at least some configurations. In fact, it may be removed altogether.
+
+ Most people will answer N.
+
+config UCLIBC_HAS_GETTEXT_AWARENESS
+ bool "Include gettext awareness"
+ depends on UCLIBC_HAS_LOCALE
+ default n
+ help
+ NOTE!!! Not yet integrated with strerror and strsignal. NOTE!!!
+
+ Answer Y if you want to include weak stub gettext support and
+ make the *strerror*() and strsignal() functions gettext-aware.
+
+ Currently, to get functional gettext functionality you will need
+ to use gnu gettext.
+
+ Most people will answer N.
+
endmenu
menu "Library Installation Options"
@@ -482,4 +861,12 @@ config UCLIBC_MALLOC_DEBUGGING
the size of malloc appreciably (due to strings etc), you
should say N unless you need to debug a malloc problem.
+config UCLIBC_MJN3_ONLY
+ bool "Manuel's hidden warnings"
+ default n
+ help
+ Answer Y here to see all Manuel's personal notes, warnings, and todos.
+
+ Most people will answer N.
+
endmenu
diff --git a/extra/locale/Makefile b/extra/locale/Makefile
index 983c91c30..41438dadc 100644
--- a/extra/locale/Makefile
+++ b/extra/locale/Makefile
@@ -109,13 +109,17 @@ uClibc_locale_data.h: c8tables.h wctables.h lt_defines.h locale_mmap.h
links-target: locale_data.o uClibc_locale_data.h
ln -sf ../../../extra/locale/locale_data.o ../../libc/misc/locale
- cp uClibc_locale_data.h ../../libc/sysdeps/linux/common/bits/
+ cat uClibc_locale_data.h | awk 'BEGIN{i=1}{ if ( /WANT_/ ) i = /endif/ ; else if (i) print $0 }' > ../../include/bits/uClibc_locale_data.h
+
+# cp uClibc_locale_data.h ../../libc/sysdeps/linux/common/bits/
pregen:
$(CC) $(CFLAGS_mmap) -c locale_data.c
$(STRIPTOOL) -x -R .note -R .comment locale_data.o
ln -sf ../../../extra/locale/locale_data.o ../../libc/misc/locale
- cp uClibc_locale_data.h ../../libc/sysdeps/linux/common/bits/
+ cat uClibc_locale_data.h | awk 'BEGIN{i=1}{ if ( /WANT_/ ) i = /endif/ ; else if (i) print $0 }' > ../../include/bits/uClibc_locale_data.h
+
+# cp uClibc_locale_data.h ../../libc/sysdeps/linux/common/bits/
clean:
rm -f *.[oa] *~ core
diff --git a/extra/locale/gen_collate.c b/extra/locale/gen_collate.c
index 51b6b7383..7a524c8f7 100644
--- a/extra/locale/gen_collate.c
+++ b/extra/locale/gen_collate.c
@@ -1274,7 +1274,7 @@ static void error_msg(const char *fmt, ...)
static void pushfile(char *filename)
{
- static fbuf[PATH_MAX];
+ static char fbuf[PATH_MAX];
snprintf(fbuf, PATH_MAX, "collation/%s", filename);
@@ -2894,28 +2894,28 @@ static void finalize_base(void)
unsigned int u = 0xe40;
table_data *tbl = &table;
-#define WCctype_TI_MASK ((1 << tbl->ti_shift)-1)
-#define WCctype_TI_SHIFT (tbl->ti_shift)
-#define WCctype_TI_LEN (tbl->ti_len)
-#define WCctype_II_MASK ((1 << tbl->ii_shift)-1)
-#define WCctype_II_SHIFT (tbl->ii_shift)
-#define WCctype_II_LEN (tbl->ii_len)
+#define __LOCALE_DATA_WCctype_TI_MASK ((1 << tbl->ti_shift)-1)
+#define __LOCALE_DATA_WCctype_TI_SHIFT (tbl->ti_shift)
+#define __LOCALE_DATA_WCctype_TI_LEN (tbl->ti_len)
+#define __LOCALE_DATA_WCctype_II_MASK ((1 << tbl->ii_shift)-1)
+#define __LOCALE_DATA_WCctype_II_SHIFT (tbl->ii_shift)
+#define __LOCALE_DATA_WCctype_II_LEN (tbl->ii_len)
- sc = u & WCctype_TI_MASK;
- u >>= WCctype_TI_SHIFT;
- n = u & WCctype_II_MASK;
- u >>= WCctype_II_SHIFT;
+ sc = u & __LOCALE_DATA_WCctype_TI_MASK;
+ u >>= __LOCALE_DATA_WCctype_TI_SHIFT;
+ n = u & __LOCALE_DATA_WCctype_II_MASK;
+ u >>= __LOCALE_DATA_WCctype_II_SHIFT;
i0 = tbl->ii[u];
fprintf(stderr, "i0 = %d\n", i0);
-