X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/381fb12e1e6c2f028685d102386bc32725d14f48..fecc10cd9566cfd5dee3c9bada3ebe52de7a30bc:/src/system.h diff --git a/src/system.h b/src/system.h index 4f95e205..6dd83bcf 100644 --- a/src/system.h +++ b/src/system.h @@ -89,6 +89,16 @@ char *alloca (); # endif #endif +#if HAVE_LIMITS_H +# include +#endif +#ifndef SHRT_MIN +# define SHRT_MIN (-32768) +#endif +#ifndef SHRT_MAX +# define SHRT_MAX 32767 +#endif + # include "xalloc.h" /* From xstrndup.c. */ @@ -106,10 +116,6 @@ char *stpcpy PARAMS ((char *dest, const char *src)); char *strchr(const char *s, int c); #endif -#if !HAVE_DECL_STRNDUP -char *strndup PARAMS ((const char *s, size_t size)); -#endif - #if !HAVE_DECL_STRSPN size_t strspn(const char *s, const char *accept); #endif @@ -158,7 +164,7 @@ void *memrchr PARAMS ((const void *s, int c, size_t n)); # define setlocale(Category, Locale) #endif -#include "libgettext.h" +#include "gettext.h" #define _(Msgid) gettext (Msgid) #define N_(Msgid) (Msgid) @@ -223,31 +229,6 @@ do { \ } while (0) -/*---------------------------------. -| Machine-dependencies for Bison. | -`---------------------------------*/ - -#ifdef eta10 -# define MAXSHORT 2147483647 -# define MINSHORT -2147483648 -#else -# define MAXSHORT 32767 -# define MINSHORT -32768 -#endif - -#if defined (MSDOS) && !defined (__GO32__) -# define BITS_PER_WORD 16 -# define MAXTABLE 16383 -#else -# define BITS_PER_WORD 32 -# define MAXTABLE 32767 -#endif - -#define WORDSIZE(n) (((n) + BITS_PER_WORD - 1) / BITS_PER_WORD) -#define SETBIT(x, i) ((x)[(i)/BITS_PER_WORD] |= (1<<((i) % BITS_PER_WORD))) -#define RESETBIT(x, i) ((x)[(i)/BITS_PER_WORD] &= ~(1<<((i) % BITS_PER_WORD))) -#define BITISSET(x, i) (((x)[(i)/BITS_PER_WORD] & (1<<((i) % BITS_PER_WORD))) != 0) - /*-----------------------------------------. | Extensions to use for the output files. | @@ -281,13 +262,6 @@ do { \ -/*----------------------------. -| As memcpy, but for shorts. | -`----------------------------*/ - -#define shortcpy(Dest, Src, Num) \ - memcpy (Dest, Src, Num * sizeof (short)) - /*---------------------. | Free a linked list. | `---------------------*/