summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorkleink <kleink@NetBSD.org>1998-02-02 16:15:07 +0000
committerkleink <kleink@NetBSD.org>1998-02-02 16:15:07 +0000
commitea1a5dbd2650ffd6bf496ca4604f0b0dffc11022 (patch)
tree39f6c34cfb95637b42b123481b44fb8ee204180c /include
parent7d9fe293d73b4171b371cb96a622a2297a0a2752 (diff)
Per XPG4.2, move the prototypes of bcmp(), bcopy(), bzero(), ffs(), index(),
rindex(), strcasecmp() and strncasecmp() to <strings.h>. For now, include <strings.h> to get these prototypes; this should go away eventually. Also, protect the prototypes of strtok_r() and strsep().
Diffstat (limited to 'include')
-rw-r--r--include/string.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/include/string.h b/include/string.h
index 4de4df426ce..7d92012041f 100644
--- a/include/string.h
+++ b/include/string.h
@@ -1,4 +1,4 @@
-/* $NetBSD: string.h,v 1.9 1998/01/12 16:05:40 kleink Exp $ */
+/* $NetBSD: string.h,v 1.10 1998/02/02 16:15:07 kleink Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -49,6 +49,7 @@ typedef _BSD_SIZE_T_ size_t;
#endif
#include <sys/cdefs.h>
+#include <sys/featuretest.h>
__BEGIN_DECLS
void *memchr __P((const void *, int, size_t));
@@ -72,23 +73,22 @@ char *strrchr __P((const char *, int));
size_t strspn __P((const char *, const char *));
char *strstr __P((const char *, const char *));
char *strtok __P((char *, const char *));
+#if (!defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE)) || \
+ defined(_REENTRANT) || (_POSIX_C_SOURCE - 0 >= 199506L)
char *strtok_r __P((char *, const char *, char **));
+#endif /* !defined(_ANSI_SOURCE) || defined(_REENTRANT) || ... */
size_t strxfrm __P((char *, const char *, size_t));
-/* Nonstandard routines */
-#if !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE)
-int bcmp __P((const void *, const void *, size_t));
-void bcopy __P((const void *, void *, size_t));
-void bzero __P((void *, size_t));
-int ffs __P((int));
-char *index __P((const char *, int));
+#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE)
+#include <strings.h> /* for backwards-compatibilty */
void *memccpy __P((void *, const void *, int, size_t));
-char *rindex __P((const char *, int));
-int strcasecmp __P((const char *, const char *));
char *strdup __P((const char *));
-int strncasecmp __P((const char *, const char *, size_t));
+#endif /* !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) */
+
+#if !defined(_ANSI_SOURCE) && !defined(_POSIX_C_SOURCE) && \
+ !defined(_XOPEN_SOURCE)
char *strsep __P((char **, const char *));
-#endif
+#endif /* !defined(_ANSI_SOURCE) && !defined(_POSIX_SOURCE) && ... */
__END_DECLS
-#endif /* _STRING_H_ */
+#endif /* !defined(_STRING_H_) */