projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add inet_pton module.
[gnulib.git]
/
m4
/
regex.m4
diff --git
a/m4/regex.m4
b/m4/regex.m4
index
c6490d2
..
c600852
100644
(file)
--- a/
m4/regex.m4
+++ b/
m4/regex.m4
@@
-1,4
+1,4
@@
-#serial 3
5
+#serial 3
6
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
# 2006 Free Software Foundation, Inc.
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
# 2006 Free Software Foundation, Inc.
@@
-38,13
+38,19
@@
AC_DEFUN([gl_REGEX],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[AC_INCLUDES_DEFAULT
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[AC_INCLUDES_DEFAULT
+ #include <limits.h>
#include <regex.h>
],
[[static struct re_pattern_buffer regex;
#include <regex.h>
],
[[static struct re_pattern_buffer regex;
+ unsigned char folded_chars[UCHAR_MAX + 1];
+ int i;
const char *s;
struct re_registers regs;
re_set_syntax (RE_SYNTAX_POSIX_EGREP);
memset (®ex, 0, sizeof (regex));
const char *s;
struct re_registers regs;
re_set_syntax (RE_SYNTAX_POSIX_EGREP);
memset (®ex, 0, sizeof (regex));
+ for (i = 0; i <= UCHAR_MAX; i++)
+ folded_chars[i] = i;
+ regex.translate = folded_chars;
s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex);
/* This should fail with _Invalid character class name_ error. */
if (!s)
s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, ®ex);
/* This should fail with _Invalid character class name_ error. */
if (!s)