Module Name: src
Committed By: perry
Date: Fri May 1 17:16:49 UTC 2009
Modified Files:
src/include: string.h
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/include/string.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/include/string.h
diff -u src/include/string.h:1.36 src/include/string.h:1.37
--- src/include/string.h:1.36 Fri Apr 10 23:00:53 2009
+++ src/include/string.h Fri May 1 17:16:49 2009
@@ -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 @@
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);