* src/system.h: Include alloca.h.

* src/main.c (main) [C_ALLOCA]: Call alloca (0).
This commit is contained in:
Akim Demaille
2001-11-23 14:16:34 +00:00
parent 6255b43511
commit 722c4bfec2
12 changed files with 1817 additions and 1594 deletions

View File

@@ -119,6 +119,12 @@ main (int argc, char *argv[])
output_files ();
/* If using alloca.c, flush the alloca'ed memory for the benefit of
people running Bison as a library in IDEs. */
#if C_ALLOCA
alloca (0);
#endif
return complain_message_count ? EXIT_FAILURE : EXIT_SUCCESS;
}

View File

@@ -79,6 +79,21 @@
extern int errno;
#endif
/* AIX requires this to be the first thing in the file. */
#ifndef __GNUC__
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
# endif
# endif
# endif
#endif
#if PROTOTYPES
# define PARAMS(p) p
#else