summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/regex.c b/regex.c
index fd8a447b05..9988be2d2a 100644
--- a/regex.c
+++ b/regex.c
@@ -48,13 +48,6 @@
# include <sys/types.h>
#endif
-#if defined(STDC_HEADERS)
-# include <stddef.h>
-#else
-/* We need this for `regex.h', and perhaps for the Emacs include files. */
-# include <sys/types.h>
-#endif
-
#ifndef __STDC__
# define volatile
#endif
@@ -1406,7 +1399,8 @@ re_compile_pattern(pattern, size, bufp)
case 'W':
for (c = 0; c < (1 << BYTEWIDTH); c++) {
if (SYNTAX(c) != Sword &&
- (current_mbctype || SYNTAX(c) != Sword2))
+ (current_mbctype && !re_mbctab[c] ||
+ !current_mbctype && SYNTAX(c) != Sword2))
SET_LIST_BIT(c);
}
last = -1;