]> git.saurik.com Git - bison.git/blobdiff - src/system.h
* tests/regression.at (Mixing %token styles): New test.
[bison.git] / src / system.h
index c6f77daeba453b7d76cf94c1dfdce4683b836f63..b3c8f6d94f130eac4bdf239de38d676b47cd55ee 100644 (file)
@@ -73,6 +73,26 @@ extern int errno;
 # define PARAMS(p) ()
 #endif
 
+# include "xalloc.h"
+
+/*---------------------.
+| Missing prototypes.  |
+`---------------------*/
+
+#if !HAVE_DECL_STPCPY
+char *stpcpy PARAMS ((char *dest, const char *src));
+#endif
+
+#if !HAVE_DECL_STRNDUP
+char *strndup PARAMS ((const char *s, size_t size));
+#endif
+
+#if !HAVE_DECL_STRNLEN
+size_t strnlen PARAMS ((const char *s, size_t maxlen));
+#endif
+
+
+
 /*-----------------.
 | GCC extensions.  |
 `-----------------*/
@@ -123,8 +143,6 @@ extern int errno;
 # define LOCALEDIR "/usr/local/share/locale"
 #endif
 
-#endif  /* BISON_SYSTEM_H */
-
 
 /*-----------.
 | Booleans.  |
@@ -141,9 +159,9 @@ typedef int bool;
 | Obstacks.  |
 `-----------*/
 
-#define obstack_chunk_alloc xmalloc
-#define obstack_chunk_free  free
-#include "obstack.h"
+# define obstack_chunk_alloc xmalloc
+# define obstack_chunk_free  free
+# include "obstack.h"
 
 #define obstack_sgrow(Obs, Str) \
   obstack_grow (Obs, Str, strlen (Str))
@@ -209,8 +227,8 @@ do {                                                                \
   /* VMS. */
 # define EXT_TAB       "_tab"
 # define EXT_OUTPUT    ".output"
-# define EXT_STYPE_H   "_stype.h"
-# define EXT_GUARD_C   "_guard.c"
+# define EXT_STYPE_H   "_stype"
+# define EXT_GUARD_C   "_guard"
 #else /* ! VMS */
 # ifdef MSDOS
    /* MS DOS. */
@@ -222,8 +240,8 @@ do {                                                                \
   /* Standard. */
 #  define EXT_TAB      ".tab"
 #  define EXT_OUTPUT   ".output"
-#  define EXT_STYPE_H  ".stype.h"
-#  define EXT_GUARD_C  ".guard.c"
+#  define EXT_STYPE_H  ".stype"
+#  define EXT_GUARD_C  ".guard"
 # endif /* ! MSDOS */
 #endif /* ! VMS */
 
@@ -244,3 +262,15 @@ do {                                                               \
 #  define BISON_HAIRY "c:/usr/local/lib/bison.hairy"
 # endif
 #endif
+
+
+/*---------------------------------.
+| Debugging the memory allocator.  |
+`---------------------------------*/
+
+# if WITH_DMALLOC
+#  define DMALLOC_FUNC_CHECK
+#  include <dmalloc.h>
+# endif /* WITH_DMALLOC */
+
+#endif  /* BISON_SYSTEM_H */