summaryrefslogtreecommitdiffstats
path: root/libc/misc/regex/regcomp.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2006-01-07 02:32:27 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2006-01-07 02:32:27 +0000
commite523bd15353350c3480b8a1820a0944b0fa8212e (patch)
tree60485116f9c62c306bb753f12f9d4eb79d16aa4e /libc/misc/regex/regcomp.c
parent3b3434516a3415d7e0f4e1d50c553876dcb337b2 (diff)
downloaduClibc-alpine-e523bd15353350c3480b8a1820a0944b0fa8212e.tar.bz2
uClibc-alpine-e523bd15353350c3480b8a1820a0944b0fa8212e.tar.xz
Big fricking merge from trunk.
Diffstat (limited to 'libc/misc/regex/regcomp.c')
-rw-r--r--libc/misc/regex/regcomp.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libc/misc/regex/regcomp.c b/libc/misc/regex/regcomp.c
index 83df61108..419d879be 100644
--- a/libc/misc/regex/regcomp.c
+++ b/libc/misc/regex/regcomp.c
@@ -292,7 +292,7 @@ re_set_fastmap (char *fastmap, int icase, int ch)
{
fastmap[ch] = 1;
if (icase)
- fastmap[tolower (ch)] = 1;
+ fastmap[__tolower (ch)] = 1;
}
/* Helper function for re_compile_fastmap.
@@ -833,7 +833,14 @@ init_dfa (re_dfa_t *dfa, size_t pat_len)
dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size);
dfa->state_hash_mask = table_size - 1;
+#ifdef __UCLIBC_HAS_WCHAR__
+# undef MB_CUR_MAX
+# define MB_CUR_MAX (_stdlib_mb_cur_max_internal ())
+extern size_t _stdlib_mb_cur_max_internal (void) __THROW __wur attribute_hidden;
dfa->mb_cur_max = MB_CUR_MAX;
+#else
+ dfa->mb_cur_max = 1;
+#endif
#ifdef _LIBC
if (dfa->mb_cur_max == 6
&& strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0)