Add strndup(3) prototype to string.h.

This change was erronously ommitted from the r185690, and attempt
to simply add the prototype to string.h has revealed that several
contributed programs defined local prototypes for strndup(), controlled
by autoconfed config.h. So, manually change #undef HAVE_STRNDUP to
#define HAVE_STRNDUP 1. Next import of the corresponding program would
regenerate config.h, overriding the changes in this commit.

No objections from: kan
This commit is contained in:
Konstantin Belousov 2008-12-08 21:04:24 +00:00
parent a6d94c502c
commit 20e76cb365
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=185777
7 changed files with 7 additions and 6 deletions

View File

@ -235,7 +235,7 @@
#define HAVE_STRNCASECMP 1
/* Define to 1 if you have the `strndup' function. */
/* #undef HAVE_STRNDUP */
#define HAVE_STRNDUP 1
/* Define to 1 if you have the `strrchr' function. */
#define HAVE_STRRCHR 1

View File

@ -759,7 +759,7 @@
#define HAVE_STRNCASECMP 1
/* Define to 1 if you have the `strndup' function. */
/* #undef HAVE_STRNDUP */
#define HAVE_STRNDUP 1
/* Define to 1 if you have the `strpbrk' function. */
#define HAVE_STRPBRK 1

View File

@ -96,6 +96,7 @@ char *strncat(char * __restrict, const char * __restrict, size_t);
int strncmp(const char *, const char *, size_t) __pure;
char *strncpy(char * __restrict, const char * __restrict, size_t);
#if __BSD_VISIBLE
char *strndup(const char *, size_t);
char *strnstr(const char *, const char *, size_t) __pure;
#endif
char *strpbrk(const char *, const char *) __pure;

View File

@ -785,7 +785,7 @@ static /**/const char *const rcsid[] = { (const char *)rcsid, "@(#)" msg }
#define HAVE_STRNCASECMP 1
/* Define if you have the function `strndup'. */
/* #undef HAVE_STRNDUP */
#define HAVE_STRNDUP 1
/* Define if you have the function `strnlen'. */
/* #undef HAVE_STRNLEN */

View File

@ -30,7 +30,7 @@
#undef HAS_IN_ADDR6
#define HAVE_SOCKADDR_STORAGE 1
#undef NEED_GETTIMEOFDAY
#undef HAVE_STRNDUP
#define HAVE_STRNDUP 1
#undef USE_FIONBIO_IOCTL
#undef USE_SYSERROR_LIST
#undef INNETGR_ARGS

View File

@ -77,7 +77,7 @@
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strndup' function. */
/* #undef HAVE_STRNDUP */
#define HAVE_STRNDUP 1
/* Define to 1 if you have the `strtof' function. */
#define HAVE_STRTOF 1

View File

@ -77,7 +77,7 @@
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strndup' function. */
/* #undef HAVE_STRNDUP */
#define HAVE_STRNDUP 1
/* Define to 1 if you have the `strtof' function. */
#define HAVE_STRTOF 1