summaryrefslogtreecommitdiff
path: root/libc/misc/regex
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-16 11:54:26 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-16 11:54:26 +0000
commite5b07a0aeddfaec7f0edf253ef3a92fcce46963c (patch)
tree7add971d663d6cb4a983944e907a885d50d6b3b5 /libc/misc/regex
parentf6ec4106b66554f64f24713cdeea19916b2b3f57 (diff)
Make new regex build w/ WCHAR disabled, vapier, does it now work for you?
Diffstat (limited to 'libc/misc/regex')
-rw-r--r--libc/misc/regex/regcomp.c4
-rw-r--r--libc/misc/regex/regex_internal.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/libc/misc/regex/regcomp.c b/libc/misc/regex/regcomp.c
index 83df61108..9d6c78cda 100644
--- a/libc/misc/regex/regcomp.c
+++ b/libc/misc/regex/regcomp.c
@@ -833,7 +833,11 @@ 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__
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)
diff --git a/libc/misc/regex/regex_internal.h b/libc/misc/regex/regex_internal.h
index 14d14da3c..4782883c1 100644
--- a/libc/misc/regex/regex_internal.h
+++ b/libc/misc/regex/regex_internal.h
@@ -670,7 +670,9 @@ typedef struct
{
unsigned char ch;
unsigned char *name;
+#ifdef __UCLIBC_HAS_WCHAR__
wchar_t wch;
+#endif
} opr;
} bracket_elem_t;