From 372285b20718e6da7dcb9f6069813459de89f108 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Thu, 13 Apr 2006 22:16:43 +0000 Subject: (init_dfa): Don't use wchar_t or wctype_t if RE_ENABLE_I18N is not defined. Problem reported by Mark D. Baushke via Derek R. Price. --- lib/regcomp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/regcomp.c b/lib/regcomp.c index 84512d00c..6e317f513 100644 --- a/lib/regcomp.c +++ b/lib/regcomp.c @@ -835,16 +835,18 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) __re_size_t table_size; #ifndef _LIBC char *codeset_name; +#endif +#ifdef RE_ENABLE_I18N + size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t)); +#else + size_t max_i18n_object_size = 0; #endif size_t max_object_size = MAX (sizeof (struct re_state_table_entry), MAX (sizeof (re_token_t), MAX (sizeof (re_node_set), MAX (sizeof (regmatch_t), - MAX (sizeof (regoff_t), - MAX (sizeof (wchar_t), - MAX (sizeof (wctype_t), - sizeof (Idx)))))))); + max_i18n_object_size)))); memset (dfa, '\0', sizeof (re_dfa_t)); -- cgit v1.2.3-70-g09d2