summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorAlain Magloire <alainm@rcsm.ee.mcgill.ca>2000-03-05 19:26:57 +0000
committerAlain Magloire <alainm@rcsm.ee.mcgill.ca>2000-03-05 19:26:57 +0000
commitcd0dedb60ad5107417d47daed4debaab848054c3 (patch)
treee799dd8f4c6c56d5d10e7efaac8064f0a0aec53e /m4
parent345769266575aa4aa402a24bfea737c47c2932f7 (diff)
downloadgrep-cd0dedb60ad5107417d47daed4debaab848054c3.tar.gz
.cvsignore ABOUT-NLS AUTHORS ChangeLog Makefile.am NEWS
PATCHES.AC PATCHES.AM README THANKS TODO acconfig.h configure.in stamp-h.in bootstrap/Makefile.am bootstrap/Makefile.try bootstrap/README djgpp/Makefile.am djgpp/README djgpp/config.bat djgpp/config.h djgpp/config.sed djgpp/config.site djgpp/getconf djgpp/intl.mak djgpp/main.mak djgpp/po.mak djgpp/po2tbl.sed djgpp/src.mak djgpp/tests.mak doc/Makefile.am doc/egrep.man doc/fgrep.man doc/grep.1 doc/grep.texi intl/ChangeLog intl/Makefile.in intl/VERSION intl/bindtextdom.c intl/cat-compat.c intl/dcgettext.c intl/dgettext.c intl/explodename.c intl/finddomain.c intl/gettext.c intl/gettext.h intl/gettextP.h intl/hash-string.h intl/intl-compat.c intl/l10nflist.c intl/libgettext.h intl/linux-msg.sed intl/loadinfo.h intl/loadmsgcat.c intl/localealias.c intl/po2tbl.sed.in intl/textdomain.c intl/xopen-msg.sed m4/Makefile.am m4/djgpp.m4 m4/dosfile.m4 m4/envsep.m4 m4/gettext.m4 m4/glibc.m4 m4/header.m4 m4/init.m4 m4/install.m4 m4/isc-posix.m4 m4/largefile.m4 m4/lcmessage.m4 m4/missing.m4 m4/progtest.m4 m4/regex.m4 m4/sanity.m4 po/ChangeLog po/Makefile.in.in po/POTFILES.in po/cat-id-tbl.c po/cs.po po/de.po po/el.po po/eo.po po/es.po po/et.po po/fr.po po/grep.pot po/hr.po po/id.po po/it.po po/ja.po po/ko.po po/nl.po po/no.po po/pl.po po/pt_BR.po po/ru.po po/sl.po po/stamp-cat-id po/sv.po src/Makefile.am src/alloca.c src/ansi2knr.1 src/ansi2knr.c src/dfa.c src/dfa.h src/dosbuf.c src/egrepmat.c src/fgrepmat.c src/getopt.c src/getopt.h src/getopt1.c src/getpagesize.h src/grep.c src/grep.h src/grepmat.c src/kwset.c src/kwset.h src/memchr.c src/obstack.c src/obstack.h src/regex.c src/regex.h src/savedir.c src/savedir.h src/search.c src/stpcpy.c src/system.h src/vms_fab.c src/vms_fab.h src/posix/Makefile.am src/posix/regex.h tests/Makefile.am tests/bre.awk tests/bre.sh tests/bre.tests tests/empty.sh tests/ere.awk tests/ere.sh tests/ere.tests tests/formatbre.awk tests/formatere.awk tests/khadafy.lines tests/khadafy.regexp tests/khadafy.sh tests/options.sh tests/spencer1.awk tests/spencer1.sh tests/spencer1.tests tests/spencer2.sh tests/spencer2.tests tests/status.sh tests/tests tests/warning.sh vms/Makefile.am vms/README vms/config_vms.h vms/make.com ---------------------------------------------------------------------- sigh .. my timestamp is screwed again. * regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
Diffstat (limited to 'm4')
-rw-r--r--m4/regex.m414
1 files changed, 10 insertions, 4 deletions
diff --git a/m4/regex.m4 b/m4/regex.m4
index 3047d4d4..3012a669 100644
--- a/m4/regex.m4
+++ b/m4/regex.m4
@@ -1,4 +1,4 @@
-#serial 5
+#serial 5001
dnl Initially derived from code in GNU grep.
dnl Mostly written by Jim Meyering.
@@ -16,8 +16,8 @@ AC_DEFUN(jm_INCLUDED_REGEX,
# However, if the system regex support is good enough that it passes the
# the following run test, then default to *not* using the included regex.c.
# If cross compiling, assume the test would fail and use the included
- # regex.c. The failing regular expression is from `Spencer ere test #75'
- # in grep-2.3.
+ # regex.c. The first failing regular expression is from `Spencer ere
+ # test #75' in grep-2.3.
AC_CACHE_CHECK([for working re_compile_pattern],
jm_cv_func_working_re_compile_pattern,
AC_TRY_RUN(
@@ -35,7 +35,13 @@ AC_DEFUN(jm_INCLUDED_REGEX,
three right ones below. Otherwise autoconf-2.14 chokes. */
s = re_compile_pattern ("a[[:]:]]b\n", 9, &regex);
/* This should fail with _Invalid character class name_ error. */
- exit (s ? 0 : 1);
+ if (!s)
+ exit (1);
+
+ /* This should succeed, but doesn't for e.g. glibc-2.1.3. */
+ s = re_compile_pattern ("{1", 2, &regex);
+
+ exit (s ? 1 : 0);
}
>>,
changequote([, ])dnl