]> git.saurik.com Git - bison.git/commitdiff
* src/system.h: Include alloca.h.
authorAkim Demaille <akim@epita.fr>
Fri, 23 Nov 2001 14:13:19 +0000 (14:13 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 23 Nov 2001 14:13:19 +0000 (14:13 +0000)
* src/main.c (main) [C_ALLOCA]: Call alloca (0).

ChangeLog
src/main.c
src/system.h

index 19c9251a67ac228000355a5ed650b97baa9952dd..0ae8e768ec6d18c6aceb403dd7f1d03fd76c03b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-11-23  Akim Demaille  <akim@epita.fr>
+
+       * src/system.h: Include alloca.h.
+       * src/main.c (main) [C_ALLOCA]: Call alloca (0).
+
 2001-11-23  Akim Demaille  <akim@epita.fr>
 
        * src/print_graph.c (print_actions): Remove `rule', unused.
 2001-11-23  Akim Demaille  <akim@epita.fr>
 
        * src/print_graph.c (print_actions): Remove `rule', unused.
@@ -6,7 +11,6 @@
        * src/closure.c (itemsetsize): Likewise.
        * src/reader.c (symbol_list_new): Static.
 
        * src/closure.c (itemsetsize): Likewise.
        * src/reader.c (symbol_list_new): Static.
 
-       
 2001-11-23  Akim Demaille  <akim@epita.fr>
 
        Attaching lineno to buckets is stupid, since only one copy of each
 2001-11-23  Akim Demaille  <akim@epita.fr>
 
        Attaching lineno to buckets is stupid, since only one copy of each
index 62436a806914b14e38ec28d48d378e5cb1e0dfa9..33994c9b3596d00d77f7cf3f29945e49b6687155 100644 (file)
@@ -117,6 +117,12 @@ main (int argc, char *argv[])
 
   output_files ();
 
 
   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;
 }
 \f
   return complain_message_count ? EXIT_FAILURE : EXIT_SUCCESS;
 }
 \f
index b8a73edbdc27effa05559fc53000a395976277f6..93213cb72c5e07a78d65bab459f9c56ef8e48b8f 100644 (file)
 extern int errno;
 #endif
 
 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
 #if PROTOTYPES
 # define PARAMS(p) p
 #else