* lib/basename.c, lib/dirname.h, lib/dirname.c, lib/memrchr.c,

* lib/xstrndup.c, lib/strchr.c:
New, stolen from the Fileutils 4.1.
* lib/Makefile.am (libbison_a_SOURCES): Adjust.
* configure.in: Check for the presence of memrchr, strchr,
strnlen, and of their prototypes.
Don't check for strndup: we no longer use it.
* src/system.h: Adjust the prototypes.
This commit is contained in:
Akim Demaille
2002-01-08 17:30:53 +00:00
parent 25a46077de
commit 43cc2463d2
15 changed files with 816 additions and 102 deletions

View File

@@ -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
/*-----------------.