From a67fbaa46cbdf18a03eefb3f83e2f74f68918753 Mon Sep 17 00:00:00 2001 From: das Date: Sat, 28 Feb 2009 06:00:58 +0000 Subject: - Add getdelim(), getline(), stpncpy(), strnlen(), wcsnlen(), wcscasecmp(), and wcsncasecmp(). - Make some previously non-standard extensions visible if POSIX_VISIBLE >= 200809. - Use restrict qualifiers in stpcpy(). - Declare off_t and size_t in stdio.h. - Bump __FreeBSD_version in case the new symbols (particularly getline()) cause issues with ports. Reviewed by: standards@ --- include/string.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include/string.h') diff --git a/include/string.h b/include/string.h index 91007f1..5923cb5 100644 --- a/include/string.h +++ b/include/string.h @@ -67,8 +67,11 @@ void *memmem(const void *, size_t, const void *, size_t) __pure; #endif void *memmove(void *, const void *, size_t); void *memset(void *, int, size_t); +#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE +char *stpcpy(char * __restrict, const char * __restrict); +char *stpncpy(char * __restrict, const char * __restrict, size_t); +#endif #if __BSD_VISIBLE -char *stpcpy(char *, const char *); char *strcasestr(const char *, const char *) __pure; #endif char *strcat(char * __restrict, const char * __restrict); @@ -95,14 +98,19 @@ void strmode(int, char *); 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 +#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE char *strndup(const char *, size_t) __malloc_like; +size_t strnlen(const char *, size_t) __pure; +#endif +#if __BSD_VISIBLE char *strnstr(const char *, const char *, size_t) __pure; #endif char *strpbrk(const char *, const char *) __pure; char *strrchr(const char *, int) __pure; #if __BSD_VISIBLE char *strsep(char **, const char *); +#endif +#if __POSIX_VISIBLE >= 200809 || __BSD_VISIBLE char *strsignal(int); #endif size_t strspn(const char *, const char *) __pure; -- cgit v1.1