summaryrefslogtreecommitdiff
path: root/src/regex.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2007-10-11 16:24:58 +0000
committerMiles Bader <miles@gnu.org>2007-10-11 16:24:58 +0000
commitc73bd236f75b742ad4642ec94798987ae6e3e1e8 (patch)
treeef5edc8db557fc1d25a17c379e4ae63a38b3ba5c /src/regex.c
parentecb21060d5c1752d41d7a742be565c59b5fcb855 (diff)
parent58ade22bf16a9ec2ff0aee6c59d8db4d1703e94f (diff)
downloademacs-c73bd236f75b742ad4642ec94798987ae6e3e1e8.tar.gz
Merge from emacs--devo--0
Patches applied: * emacs--devo--0 (patch 866-879) - Merge multi-tty branch - Update from CVS - Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
Diffstat (limited to 'src/regex.c')
-rw-r--r--src/regex.c19
1 files changed, 1 insertions, 18 deletions
diff --git a/src/regex.c b/src/regex.c
index 0858378c6e4..a0d6b945cf1 100644
--- a/src/regex.c
+++ b/src/regex.c
@@ -1398,18 +1398,12 @@ static const char *re_error_msgid[] =
/* Normally, this is fine. */
#define MATCH_MAY_ALLOCATE
-/* When using GNU C, we are not REALLY using the C alloca, no matter
- what config.h may say. So don't take precautions for it. */
-#ifdef __GNUC__
-# undef C_ALLOCA
-#endif
-
/* The match routines may not allocate if (1) they would do it with malloc
and (2) it's not safe for them to use malloc.
Note that if REL_ALLOC is defined, matching would not use malloc for the
failure stack, but we would still use it for the register vectors;
so REL_ALLOC should not affect this. */
-#if (defined C_ALLOCA || defined REGEX_MALLOC) && defined emacs
+#if defined REGEX_MALLOC && defined emacs
# undef MATCH_MAY_ALLOCATE
#endif
@@ -4635,11 +4629,6 @@ re_search_2 (bufp, str1, size1, str2, size2, startpos, range, regs, stop)
val = re_match_2_internal (bufp, string1, size1, string2, size2,
startpos, regs, stop);
-#ifndef REGEX_MALLOC
-# ifdef C_ALLOCA
- alloca (0);
-# endif
-#endif
if (val >= 0)
return startpos;
@@ -5076,9 +5065,6 @@ re_match (bufp, string, size, pos, regs)
{
int result = re_match_2_internal (bufp, NULL, 0, (re_char*) string, size,
pos, regs, size);
-# if defined C_ALLOCA && !defined REGEX_MALLOC
- alloca (0);
-# endif
return result;
}
WEAK_ALIAS (__re_match, re_match)
@@ -5124,9 +5110,6 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
result = re_match_2_internal (bufp, (re_char*) string1, size1,
(re_char*) string2, size2,
pos, regs, stop);
-#if defined C_ALLOCA && !defined REGEX_MALLOC
- alloca (0);
-#endif
return result;
}
WEAK_ALIAS (__re_match_2, re_match_2)