summaryrefslogtreecommitdiff
path: root/lib/libc/string
diff options
context:
space:
mode:
authorcgd <cgd@NetBSD.org>1998-01-21 21:13:09 +0000
committercgd <cgd@NetBSD.org>1998-01-21 21:13:09 +0000
commit9bdf1983793e9ffd5ec45c40a2ffc30d78ebf8a0 (patch)
tree531c8bbc066bd9dc382021505852fa70482da943 /lib/libc/string
parent40894919ece010ef79dc409c6dd2380a826adb90 (diff)
add appropriate #ifdefs (kernel includes) so that these files can
be copied to libkern and built without modification.
Diffstat (limited to 'lib/libc/string')
-rw-r--r--lib/libc/string/index.c9
-rw-r--r--lib/libc/string/memchr.c9
-rw-r--r--lib/libc/string/rindex.c9
3 files changed, 21 insertions, 6 deletions
diff --git a/lib/libc/string/index.c b/lib/libc/string/index.c
index 59e799f7c88..e3f4fb0e0f8 100644
--- a/lib/libc/string/index.c
+++ b/lib/libc/string/index.c
@@ -1,4 +1,4 @@
-/* $NetBSD: index.c,v 1.5 1997/07/13 20:24:15 christos Exp $ */
+/* $NetBSD: index.c,v 1.6 1998/01/21 21:13:09 cgd Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -38,11 +38,16 @@
#if 0
static char *sccsid = "@(#)index.c 5.7 (Berkeley) 2/24/91";
#else
-__RCSID("$NetBSD: index.c,v 1.5 1997/07/13 20:24:15 christos Exp $");
+__RCSID("$NetBSD: index.c,v 1.6 1998/01/21 21:13:09 cgd Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
+#ifndef _KERNEL
#include <string.h>
+#else
+#include <lib/libkern/libkern.h>
+#define NULL ((char *)0)
+#endif
char *
#ifdef STRCHR
diff --git a/lib/libc/string/memchr.c b/lib/libc/string/memchr.c
index b998a4049a4..7141c6d1de9 100644
--- a/lib/libc/string/memchr.c
+++ b/lib/libc/string/memchr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: memchr.c,v 1.5 1997/07/13 20:24:17 christos Exp $ */
+/* $NetBSD: memchr.c,v 1.6 1998/01/21 21:13:09 cgd Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
@@ -41,11 +41,16 @@
#if 0
static char *sccsid = "@(#)memchr.c 5.6 (Berkeley) 1/26/91";
#else
-__RCSID("$NetBSD: memchr.c,v 1.5 1997/07/13 20:24:17 christos Exp $");
+__RCSID("$NetBSD: memchr.c,v 1.6 1998/01/21 21:13:09 cgd Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
+#ifndef _KERNEL
#include <string.h>
+#else
+#include <lib/libkern/libkern.h>
+#define NULL ((char *)0)
+#endif
void *
memchr(s, c, n)
diff --git a/lib/libc/string/rindex.c b/lib/libc/string/rindex.c
index 9d37c623e8a..4d49917b557 100644
--- a/lib/libc/string/rindex.c
+++ b/lib/libc/string/rindex.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rindex.c,v 1.5 1997/07/13 20:24:19 christos Exp $ */
+/* $NetBSD: rindex.c,v 1.6 1998/01/21 21:13:10 cgd Exp $ */
/*
* Copyright (c) 1988 Regents of the University of California.
@@ -38,11 +38,16 @@
#if 0
static char *sccsid = "@(#)rindex.c 5.9 (Berkeley) 2/24/91";
#else
-__RCSID("$NetBSD: rindex.c,v 1.5 1997/07/13 20:24:19 christos Exp $");
+__RCSID("$NetBSD: rindex.c,v 1.6 1998/01/21 21:13:10 cgd Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
+#ifndef _KERNEL
#include <string.h>
+#else
+#include <lib/libkern/libkern.h>
+#define NULL ((char *)0)
+#endif
char *
#ifdef STRRCHR