]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Include <alloca.h> only if HAVE_ALLOCA.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 19 Dec 2004 13:42:26 +0000 (13:42 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 19 Dec 2004 13:42:26 +0000 (13:42 +0000)
(YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
(YYMAXDEPTH): New macro.

lib/getdate.y

index 6ffee30b96ffb5a96162c45b69c6f44fca3cffb6..b57e6a56d3a2275be798ed4704e5372e42546134 100644 (file)
 
 #include "getdate.h"
 
-#include <alloca.h>
+/* Use alloca only if it is known to be builtin.  */
+#if HAVE_ALLOCA
+# include <alloca.h>
+#else
+# define YYSTACK_USE_ALLOCA 0
+#endif
+
+/* Tell Bison ow much stack space is needed.  20 should be plenty for
+   this grammar, which is not right recursive.  Beware setting it too
+   high, since that might cause problems on machines whose alloca
+   implementations have lame stack-overflow checking.  */
+#define YYMAXDEPTH 20
 
 /* Since the code of getdate.y is not included in the Emacs executable
    itself, there is no need to #define static in this file.  Even if