summaryrefslogtreecommitdiff
path: root/include/string.h
diff options
context:
space:
mode:
authorperry <perry@NetBSD.org>2009-05-01 17:16:49 +0000
committerperry <perry@NetBSD.org>2009-05-01 17:16:49 +0000
commitbdb0c5fb32d7e4d0c72e7d87864e0b53748bbbaf (patch)
treeec654d5fc95d16a6d5b8db7f6b6d743bf94e46ec /include/string.h
parent4d3c211551cfc2469948c48c6bd6dfc6c4f7383e (diff)
Add prototypes for stpcpy, stpncpy, strnlen, added in the latest POSIX.
Implementations in libc to follow. For POSIX compliance, we are still missing: strcoll_l strerror_l strsignal strxfrm_l
Diffstat (limited to 'include/string.h')
-rw-r--r--include/string.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/string.h b/include/string.h
index e4d1f898094..ed709c8c4c8 100644
--- a/include/string.h
+++ b/include/string.h
@@ -1,4 +1,4 @@
-/* $NetBSD: string.h,v 1.36 2009/04/10 23:00:53 christos Exp $ */
+/* $NetBSD: string.h,v 1.37 2009/05/01 17:16:49 perry Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -79,6 +79,20 @@ void *memccpy(void *, const void *, int, size_t);
char *strdup(const char *);
#endif
+#if (_POSIX_C_SOURCE - 0 >= 200809L) || (_XOPEN_SOURCE - 0 >= 700) || \
+ defined(_NETBSD_SOURCE)
+char *stpcpy(char * __restrict, const char * __restrict);
+char *stpncpy(char * __restrict, const char * __restrict, size_t);
+size_t strnlen(const char *, size_t);
+/*
+ * For POSIX compliance, we still need:
+ * strcoll_l
+ * strerror_l
+ * strsignal
+ * strxfrm_l
+ */
+#endif
+
#if defined(_NETBSD_SOURCE)
#include <strings.h> /* for backwards-compatibilty */
void *memmem(const void *, size_t, const void *, size_t);