X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/88f06d2beb389060ef707a44225dbad8c45e0046..e89a22bfab22e4d2ee73be49dcb66b51f8d0e892:/src/system.h?ds=sidebyside diff --git a/src/system.h b/src/system.h index 04412d56..8d480333 100644 --- a/src/system.h +++ b/src/system.h @@ -110,14 +110,26 @@ char *alloca (); char *stpcpy PARAMS ((char *dest, const char *src)); #endif -#if !HAVE_DECL_STRNDUP -char *strndup PARAMS ((const char *s, size_t size)); +#if !HAVE_DECL_STRCHR +char *strchr(const char *s, int c); +#endif + +#if !HAVE_DECL_STRSPN +size_t strspn(const char *s, const char *accept); #endif #if !HAVE_DECL_STRNLEN size_t strnlen PARAMS ((const char *s, size_t maxlen)); #endif +#if !HAVE_DECL_MEMCHR +void *memchr PARAMS ((const void *s, int c, size_t n)); +#endif + +#if !HAVE_DECL_MEMRCHR +void *memrchr PARAMS ((const void *s, int c, size_t n)); +#endif + /*-----------------. @@ -126,7 +138,8 @@ size_t strnlen PARAMS ((const char *s, size_t maxlen)); #ifndef __attribute__ /* This feature is available in gcc versions 2.5 and later. */ -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ +# if !defined (__GNUC__) || __GNUC__ < 2 || \ +(__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__ # define __attribute__(Spec) /* empty */ # endif /* The __-protected variants of `format' and `printf' attributes