diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-04-13 22:16:43 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-04-13 22:16:43 +0000 |
commit | 372285b20718e6da7dcb9f6069813459de89f108 (patch) | |
tree | 9e1dd9e875188a719c4faf13a03d1e257d45ea54 | |
parent | eeac99af71e0d0366d8e3a8e5ef60a47e1bb346f (diff) | |
download | coreutils-372285b20718e6da7dcb9f6069813459de89f108.tar.xz |
(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.
-rw-r--r-- | lib/regcomp.c | 10 |
1 files 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 @@ -836,15 +836,17 @@ init_dfa (re_dfa_t *dfa, size_t pat_len) #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)); |