X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/b9d2d2a88146860c0cba292f2077fdfc8b9fc888..efcff8cd5ce895df6b6a60dbfa03ba4d3f3affe3:/src/system.h diff --git a/src/system.h b/src/system.h index 1ac9b6d8..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 @@ -123,7 +135,7 @@ size_t strnlen PARAMS ((const char *s, size_t maxlen)); #endif #ifdef ENABLE_NLS -# include +# include # define _(Text) gettext (Text) #else # undef bindtextdomain @@ -131,7 +143,8 @@ size_t strnlen PARAMS ((const char *s, size_t maxlen)); # undef textdomain # define textdomain(Domain) # undef ngettext -# define ngettext(Singular, Plural, Num) Plural +# define ngettext(Singular, Plural, Number) \ + ((Number == 1) ? Singular : Plural) # define _(Text) Text #endif #define N_(Text) Text