From: Paul Eggert Date: Thu, 13 Apr 2006 22:16:43 +0000 (+0000) Subject: (init_dfa): Don't use wchar_t or wctype_t if RE_ENABLE_I18N X-Git-Tag: v6.0~495 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=372285b20718e6da7dcb9f6069813459de89f108;p=thirdparty%2Fcoreutils.git (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. --- diff --git a/lib/regcomp.c b/lib/regcomp.c index 84512d00cf..6e317f5134 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));