[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI, Both: Alloca
From: |
Akim Demaille |
Subject: |
FYI, Both: Alloca |
Date: |
23 Nov 2001 15:12:28 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Artificial Intelligence) |
Index: ChangeLog
from Akim Demaille <address@hidden>
* src/system.h: Include alloca.h.
* src/main.c (main) [C_ALLOCA]: Call alloca (0).
Index: src/main.c
===================================================================
RCS file: /cvsroot/bison/bison/src/main.c,v
retrieving revision 1.30.2.8
diff -u -u -r1.30.2.8 main.c
--- src/main.c 2001/11/14 14:14:48 1.30.2.8
+++ src/main.c 2001/11/23 14:11:15
@@ -117,6 +117,12 @@
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;
}
Index: src/system.h
===================================================================
RCS file: /cvsroot/bison/bison/src/system.h,v
retrieving revision 1.23.2.7
diff -u -u -r1.23.2.7 system.h
--- src/system.h 2001/11/19 09:14:54 1.23.2.7
+++ src/system.h 2001/11/23 14:11:15
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI, Both: Alloca,
Akim Demaille <=