summaryrefslogtreecommitdiff
path: root/regex.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-05-31 09:13:34 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-05-31 09:13:34 +0000
commit8a4cbc733114d0a51bc324b466764d10985cbd80 (patch)
tree218dc2e4d069b9656143ab3e0de06aaa97c26209 /regex.c
parent1307f8d555235116f0f0c79b9902df9cfd4bff12 (diff)
990531
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'regex.c')
-rw-r--r--regex.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/regex.c b/regex.c
index bbe6df5..d978431 100644
--- a/regex.c
+++ b/regex.c
@@ -57,11 +57,6 @@
#ifndef __STDC__
# define volatile
-# ifdef __GNUC__
-# define const __const__
-# else
-# define const
-# endif
#endif
#ifdef HAVE_PROTOTYPES
@@ -70,10 +65,12 @@
# define _(args) ()
#endif
+#ifndef xmalloc
void *xmalloc _((unsigned long));
void *xcalloc _((unsigned long,unsigned long));
void *xrealloc _((void*,unsigned long));
void free _((void*));
+#endif
/* #define NO_ALLOCA */ /* try it out for now */
#ifndef NO_ALLOCA
@@ -3764,7 +3761,7 @@ re_match(bufp, string_arg, size, pos, regs)
case jump:
nofinalize:
EXTRACT_NUMBER_AND_INCR(mcnt, p);
- if (mcnt < 0 && stackp[-2] == d) /* avoid infinit loop */
+ if (mcnt < 0 && stackp > stackb && stackp[-2] == d) /* avoid infinit loop */
goto fail;
p += mcnt;
continue;