From 756153f8259b8c3580eab535cb015c6f1e87a237 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Sun, 5 Apr 1998 07:22:08 +0000 Subject: [PATCH] define alloca to malloc in case we're using bison but don't have alloca git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@4734 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/com_err/parse.y | 7 +++++++ lib/sl/parse.y | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/lib/com_err/parse.y b/lib/com_err/parse.y index 8550c8d41..922de9671 100644 --- a/lib/com_err/parse.y +++ b/lib/com_err/parse.y @@ -44,6 +44,13 @@ void yyerror (char *s); long name2number(const char *str); extern char *yytext; + +/* This is for bison */ + +#if !defined(alloca) && !defined(HAVE_ALLOCA) +#define alloca(x) malloc(x) +#endif + %} %union { diff --git a/lib/sl/parse.y b/lib/sl/parse.y index 9dcdbb05e..efbac3f44 100644 --- a/lib/sl/parse.y +++ b/lib/sl/parse.y @@ -46,6 +46,13 @@ long name2number(const char *str); struct string_list* append_string(struct string_list*, char*); void free_string_list(struct string_list *list); unsigned string_to_flag(const char *); + +/* This is for bison */ + +#if !defined(alloca) && !defined(HAVE_ALLOCA) +#define alloca(x) malloc(x) +#endif + %} %union {