]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(init_dfa): Don't use wchar_t or wctype_t if RE_ENABLE_I18N
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Apr 2006 22:16:43 +0000 (22:16 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 13 Apr 2006 22:16:43 +0000 (22:16 +0000)
is not defined.  Problem reported by Mark D. Baushke via Derek R. Price.

lib/regcomp.c

index 84512d00cfa3a09413e473633e478748fb67258d..6e317f5134c4ab19591579da302d98f62a37f242 100644 (file)
@@ -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));