+
+/*-----------.
+| Booleans. |
+`-----------*/
+
+#if HAVE_STDBOOL_H
+# include <stdbool.h>
+#else
+typedef enum {false = 0, true = 1} bool;
+#endif
+
+
+/*-----------.
+| Obstacks. |
+`-----------*/
+
+# define obstack_chunk_alloc xmalloc
+# define obstack_chunk_free free
+# include "obstack.h"
+
+#define obstack_sgrow(Obs, Str) \
+ obstack_grow (Obs, Str, strlen (Str))
+
+#define obstack_fgrow1(Obs, Format, Arg1) \
+do { \
+ char buf[4096]; \
+ sprintf (buf, Format, Arg1); \
+ obstack_grow (Obs, buf, strlen (buf)); \
+} while (0)
+
+#define obstack_fgrow2(Obs, Format, Arg1, Arg2) \
+do { \
+ char buf[4096]; \
+ sprintf (buf, Format, Arg1, Arg2); \
+ obstack_grow (Obs, buf, strlen (buf)); \
+} while (0)
+
+#define obstack_fgrow3(Obs, Format, Arg1, Arg2, Arg3) \
+do { \
+ char buf[4096]; \
+ sprintf (buf, Format, Arg1, Arg2, Arg3); \
+ obstack_grow (Obs, buf, strlen (buf)); \
+} while (0)
+
+#define obstack_fgrow4(Obs, Format, Arg1, Arg2, Arg3, Arg4) \
+do { \
+ char buf[4096]; \
+ sprintf (buf, Format, Arg1, Arg2, Arg3, Arg4); \
+ obstack_grow (Obs, buf, strlen (buf)); \
+} while (0)
+
+
+
+/*-----------------------------------------.
+| Extensions to use for the output files. |
+`-----------------------------------------*/
+
+#ifdef VMS
+ /* VMS. */
+# define EXT_TAB "_tab"
+# define EXT_OUTPUT ".output"
+#else /* ! VMS */
+# ifdef MSDOS
+ /* MS DOS. */
+# define EXT_TAB "_tab"
+# define EXT_OUTPUT ".out"
+# else /* ! MSDOS */
+ /* Standard. */
+# define EXT_TAB ".tab"
+# define EXT_OUTPUT ".output"
+# endif /* ! MSDOS */
+#endif /* ! VMS */
+
+#ifndef DEFAULT_TMPDIR
+# define DEFAULT_TMPDIR "/tmp"
+#endif
+
+
+
+/*---------------------.
+| Free a linked list. |
+`---------------------*/
+
+#define LIST_FREE(Type, List) \
+do { \
+ Type *_node, *_next; \
+ for (_node = List; _node; _node = _next) \
+ { \
+ _next = _node->next; \
+ XFREE (_node); \
+ } \
+} while (0)
+
+
+/*---------------------------------------------.
+| Debugging memory allocation (must be last). |
+`---------------------------------------------*/
+
+# if WITH_DMALLOC
+# define DMALLOC_FUNC_CHECK
+# include <dmalloc.h>
+# endif /* WITH_DMALLOC */
+
+#endif /* ! BISON_SYSTEM_H */