[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 1/2] regex: support Gawk, which never uses alloca
From: |
Paul Eggert |
Subject: |
[PATCH 1/2] regex: support Gawk, which never uses alloca |
Date: |
Tue, 01 Jan 2013 16:36:29 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
* lib/regex_internal.h [!_LIBC && !HAVE_ALLOCA]:
Do not include in this case. Gawk doesn't supply a substitute
alloca.h and doesn't need one.
---
ChangeLog | 5 +++++
lib/regex_internal.h | 4 +++-
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index cab9521..cbbc5b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2013-01-01 Paul Eggert <address@hidden>
+ regex: support Gawk, which never uses alloca
+ * lib/regex_internal.h [!_LIBC && !HAVE_ALLOCA]:
+ Do not include in this case. Gawk doesn't supply a substitute
+ alloca.h and doesn't need one.
+
regex: port __libc_lock_define usage to C89
* lib/regex_internal.h (__libc_lock_define) [!_LIBC]: Remove.
(struct re_dfa_t): Use #ifdef instead. '__libc_lock_define (, lock)'
diff --git a/lib/regex_internal.h b/lib/regex_internal.h
index 43fae40..fa93382 100644
--- a/lib/regex_internal.h
+++ b/lib/regex_internal.h
@@ -445,7 +445,9 @@ static unsigned int re_string_context_at (const re_string_t
*input, Idx idx,
#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
-#include <alloca.h>
+#if defined _LIBC || HAVE_ALLOCA
+# include <alloca.h>
+#endif
#ifndef _LIBC
# if HAVE_ALLOCA
--
1.7.11.7
- [PATCH 1/2] regex: support Gawk, which never uses alloca,
Paul Eggert <=