X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/f2632e420f295bf6680a3e2e4994d331fa40d982..efcff8cd5ce895df6b6a60dbfa03ba4d3f3affe3:/src/system.h diff --git a/src/system.h b/src/system.h index 5d15969a..bfd24463 100644 --- a/src/system.h +++ b/src/system.h @@ -40,6 +40,18 @@ # include #endif +/* The following test is to work around the gross typo in + systems like Sony NEWS-OS Release 4.0C, whereby EXIT_FAILURE + is defined to 0, not 1. */ +#if !EXIT_FAILURE +# undef EXIT_FAILURE +# define EXIT_FAILURE 1 +#endif + +#ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 +#endif + #if HAVE_UNISTD_H # include #endif @@ -73,7 +85,7 @@ extern int errno; # define PARAMS(p) () #endif - +# include "xalloc.h" /*---------------------. | Missing prototypes. | @@ -126,10 +138,13 @@ size_t strnlen PARAMS ((const char *s, size_t maxlen)); # include # define _(Text) gettext (Text) #else -# undef bindtextdomain +# undef bindtextdomain # define bindtextdomain(Domain, Directory) -# undef textdomain +# undef textdomain # define textdomain(Domain) +# undef ngettext +# define ngettext(Singular, Plural, Number) \ + ((Number == 1) ? Singular : Plural) # define _(Text) Text #endif #define N_(Text) Text @@ -159,9 +174,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)) @@ -271,8 +286,6 @@ do { \ # if WITH_DMALLOC # define DMALLOC_FUNC_CHECK # include - # endif /* WITH_DMALLOC */ - #endif /* BISON_SYSTEM_H */