X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/3fbf949b82f56969eba1ff33d8ee70790cc8cc43..26b4a96981afd4c92e5f3590ee53fbc6a015303b:/src/system.h diff --git a/src/system.h b/src/system.h index 9aa6ea83..50149c98 100644 --- a/src/system.h +++ b/src/system.h @@ -1,4 +1,4 @@ -/* system-dependent definitions for Bison. +/* System-dependent definitions for Bison. Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -41,7 +41,8 @@ char *alloca (); #include -#include +/* Verify a requirement at compile-time (unlike assert, which is runtime). */ +#define verify(name, assertion) struct name {char name[(assertion) ? 1 : -1];} #if HAVE_SYS_TYPES_H # include @@ -78,23 +79,14 @@ char *alloca (); /* memory.h and strings.h conflict on some systems. */ #endif /* not STDC_HEADERS and not HAVE_STRING_H */ -#include #include -# include "xalloc.h" +#include /* From xstrndup.c. */ char *xstrndup (const char *s, size_t n); -/*----------------. -| Using timevar. | -`----------------*/ - -#include "timevar.h" -extern int time_report; - - /*---------------------. | Missing prototypes. | `---------------------*/ @@ -129,6 +121,14 @@ void *memrchr (const void *s, int c, size_t n); | GCC extensions. | `-----------------*/ +/* Use this to suppress gcc's `...may be used before initialized' + warnings. */ +#ifdef lint +# define IF_LINT(Code) Code +#else +# define IF_LINT(Code) /* empty */ +#endif + #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ # if !defined (__GNUC__) || __GNUC__ < 2 || \ @@ -163,7 +163,7 @@ void *memrchr (const void *s, int c, size_t n); # define setlocale(Category, Locale) #endif -#include "gettext.h" +#include #define _(Msgid) gettext (Msgid) #define N_(Msgid) (Msgid) @@ -194,7 +194,7 @@ typedef enum {false = 0, true = 1} bool; # define obstack_chunk_alloc xmalloc # define obstack_chunk_free free -# include "obstack.h" +# include #define obstack_sgrow(Obs, Str) \ obstack_grow (Obs, Str, strlen (Str)) @@ -235,17 +235,17 @@ do { \ #ifdef VMS /* VMS. */ -# define EXT_TAB "_tab" -# define EXT_OUTPUT ".output" +# define TAB_EXT "_tab" +# define OUTPUT_EXT ".output" #else /* ! VMS */ # ifdef MSDOS /* MS DOS. */ -# define EXT_TAB "_tab" -# define EXT_OUTPUT ".out" +# define TAB_EXT "_tab" +# define OUTPUT_EXT ".out" # else /* ! MSDOS */ /* Standard. */ -# define EXT_TAB ".tab" -# define EXT_OUTPUT ".output" +# define TAB_EXT ".tab" +# define OUTPUT_EXT ".output" # endif /* ! MSDOS */ #endif /* ! VMS */