From cf4fa783b43670546879db49c8201247cc03bfe8 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 1 May 1996 15:18:44 +0000 Subject: [PATCH] switch on _KERNEL to pull in correct headers --- sys/lib/libkern/Makefile | 6 +++--- sys/lib/libkern/bcmp.c | 7 +++++-- sys/lib/libkern/bzero.c | 6 +++++- sys/lib/libkern/ffs.c | 6 +++++- sys/lib/libkern/quad.h | 8 ++++++-- sys/lib/libkern/strcat.c | 8 ++++++-- sys/lib/libkern/strcmp.c | 6 +++++- sys/lib/libkern/strcpy.c | 8 ++++++-- sys/lib/libkern/strlen.c | 6 +++++- sys/lib/libkern/strncasecmp.c | 8 ++++++-- sys/lib/libkern/strncmp.c | 6 +++++- sys/lib/libkern/strncpy.c | 6 +++++- 12 files changed, 62 insertions(+), 19 deletions(-) diff --git a/sys/lib/libkern/Makefile b/sys/lib/libkern/Makefile index 6d6e57e0123..83f4888d652 100644 --- a/sys/lib/libkern/Makefile +++ b/sys/lib/libkern/Makefile @@ -1,5 +1,5 @@ -# $OpenBSD: Makefile,v 1.4 1996/04/17 05:03:07 mickey Exp $ -# $NetBSD: Makefile,v 1.25 1996/02/02 20:34:38 mycroft Exp $ +# $OpenBSD: Makefile,v 1.5 1996/05/01 15:18:44 deraadt Exp $ +# $NetBSD: Makefile,v 1.26 1996/04/18 02:14:48 cgd Exp $ LIB= kern NOPIC= @@ -7,7 +7,7 @@ NOPIC= DIR= ${KERNREL}${KERNDIR} CPPFLAGS= -I${DIR}/arch/${MACHINE_ARCH} \ - ${KERNCPPFLAGS:S/-D_KERNEL//:S@-I.@-I${KERNREL}.@g} + ${KERNCPPFLAGS:S@-I.@-I${KERNREL}.@g} .if exists (${DIR}/arch/${MACHINE_ARCH}/Makefile.inc) .PATH: ${DIR}/arch/${MACHINE_ARCH} diff --git a/sys/lib/libkern/bcmp.c b/sys/lib/libkern/bcmp.c index feaa9655521..53b867e557b 100644 --- a/sys/lib/libkern/bcmp.c +++ b/sys/lib/libkern/bcmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcmp.c,v 1.2 1996/04/19 16:09:19 niklas Exp $ */ +/* $OpenBSD: bcmp.c,v 1.3 1996/05/01 15:18:45 deraadt Exp $ */ /* * Copyright (c) 1987 Regents of the University of California. @@ -35,11 +35,14 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)bcmp.c 5.6 (Berkeley) 2/24/91";*/ -static char *rcsid = "$OpenBSD: bcmp.c,v 1.2 1996/04/19 16:09:19 niklas Exp $"; +static char *rcsid = "$OpenBSD: bcmp.c,v 1.3 1996/05/01 15:18:45 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ +#ifndef _KERNEL #include +#else #include +#endif /* * bcmp -- vax cmpc3 instruction diff --git a/sys/lib/libkern/bzero.c b/sys/lib/libkern/bzero.c index b631f9e37fc..e2f924a2615 100644 --- a/sys/lib/libkern/bzero.c +++ b/sys/lib/libkern/bzero.c @@ -33,10 +33,14 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)bzero.c 5.7 (Berkeley) 2/24/91";*/ -static char *rcsid = "$Id: bzero.c,v 1.1.1.1 1995/10/18 08:52:49 deraadt Exp $"; +static char *rcsid = "$Id: bzero.c,v 1.2 1996/05/01 15:18:46 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ +#ifndef _KERNEL #include +#else +#include +#endif /* * bzero -- vax movc5 instruction diff --git a/sys/lib/libkern/ffs.c b/sys/lib/libkern/ffs.c index ce998fcf9a4..08dd6cf6a20 100644 --- a/sys/lib/libkern/ffs.c +++ b/sys/lib/libkern/ffs.c @@ -33,10 +33,14 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)ffs.c 5.4 (Berkeley) 5/17/90";*/ -static char *rcsid = "$Id: ffs.c,v 1.1.1.1 1995/10/18 08:52:49 deraadt Exp $"; +static char *rcsid = "$Id: ffs.c,v 1.2 1996/05/01 15:18:47 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ +#ifndef _KERNEL #include +#else +#include +#endif /* * ffs -- vax ffs instruction diff --git a/sys/lib/libkern/quad.h b/sys/lib/libkern/quad.h index b1b57eea1d0..217b5459e2e 100644 --- a/sys/lib/libkern/quad.h +++ b/sys/lib/libkern/quad.h @@ -1,5 +1,5 @@ -/* $OpenBSD: quad.h,v 1.3 1996/04/19 16:09:31 niklas Exp $ */ -/* $NetBSD: quad.h,v 1.6 1996/03/14 18:52:14 christos Exp $ */ +/* $OpenBSD: quad.h,v 1.4 1996/05/01 15:18:48 deraadt Exp $ */ +/* $NetBSD: quad.h,v 1.7 1996/04/18 02:20:04 cgd Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -57,7 +57,11 @@ */ #include +#ifndef _KERNEL #include +#else +#include +#endif /* * Depending on the desired operation, we view a `long long' (aka quad_t) in diff --git a/sys/lib/libkern/strcat.c b/sys/lib/libkern/strcat.c index 069bd1fa35b..a63f2209bf2 100644 --- a/sys/lib/libkern/strcat.c +++ b/sys/lib/libkern/strcat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: strcat.c,v 1.2 1996/04/19 16:09:37 niklas Exp $ */ +/* $OpenBSD: strcat.c,v 1.3 1996/05/01 15:18:49 deraadt Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -35,10 +35,14 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)strcat.c 5.6 (Berkeley) 2/24/91";*/ -static char *rcsid = "$OpenBSD: strcat.c,v 1.2 1996/04/19 16:09:37 niklas Exp $"; +static char *rcsid = "$OpenBSD: strcat.c,v 1.3 1996/05/01 15:18:49 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ +#ifndef _KERNEL #include +#else +#include +#endif char * strcat(s, append) diff --git a/sys/lib/libkern/strcmp.c b/sys/lib/libkern/strcmp.c index 6e73b6686a2..9dd06cb389e 100644 --- a/sys/lib/libkern/strcmp.c +++ b/sys/lib/libkern/strcmp.c @@ -36,10 +36,14 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)strcmp.c 5.5 (Berkeley) 1/26/91";*/ -static char *rcsid = "$Id: strcmp.c,v 1.1.1.1 1995/10/18 08:52:50 deraadt Exp $"; +static char *rcsid = "$Id: strcmp.c,v 1.2 1996/05/01 15:18:49 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ +#ifndef _KERNEL #include +#else +#include +#endif /* * Compare strings. diff --git a/sys/lib/libkern/strcpy.c b/sys/lib/libkern/strcpy.c index d08b319e67b..cfeff18e2b2 100644 --- a/sys/lib/libkern/strcpy.c +++ b/sys/lib/libkern/strcpy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: strcpy.c,v 1.2 1996/04/19 16:09:39 niklas Exp $ */ +/* $OpenBSD: strcpy.c,v 1.3 1996/05/01 15:18:50 deraadt Exp $ */ /* * Copyright (c) 1988 Regents of the University of California. @@ -35,10 +35,14 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)strcpy.c 5.7 (Berkeley) 2/24/91";*/ -static char *rcsid = "$OpenBSD: strcpy.c,v 1.2 1996/04/19 16:09:39 niklas Exp $"; +static char *rcsid = "$OpenBSD: strcpy.c,v 1.3 1996/05/01 15:18:50 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ +#ifndef _KERNEL #include +#else +#include +#endif char * strcpy(to, from) diff --git a/sys/lib/libkern/strlen.c b/sys/lib/libkern/strlen.c index aebb667ae96..10597e31354 100644 --- a/sys/lib/libkern/strlen.c +++ b/sys/lib/libkern/strlen.c @@ -33,10 +33,14 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)strlen.c 5.5 (Berkeley) 1/26/91";*/ -static char *rcsid = "$Id: strlen.c,v 1.1.1.1 1995/10/18 08:52:50 deraadt Exp $"; +static char *rcsid = "$Id: strlen.c,v 1.2 1996/05/01 15:18:51 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ +#ifndef _KERNEL #include +#else +#include +#endif size_t strlen(str) diff --git a/sys/lib/libkern/strncasecmp.c b/sys/lib/libkern/strncasecmp.c index a0c6633adeb..5249050ddd8 100644 --- a/sys/lib/libkern/strncasecmp.c +++ b/sys/lib/libkern/strncasecmp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: strncasecmp.c,v 1.1 1996/02/29 13:27:50 niklas Exp $ */ +/* $OpenBSD: strncasecmp.c,v 1.2 1996/05/01 15:18:52 deraadt Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -30,10 +30,14 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$Id: strncasecmp.c,v 1.1 1996/02/29 13:27:50 niklas Exp $"; +static char *rcsid = "$Id: strncasecmp.c,v 1.2 1996/05/01 15:18:52 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ +#ifndef _KERNEL #include +#else +#include +#endif int strncasecmp(s1, s2, n) diff --git a/sys/lib/libkern/strncmp.c b/sys/lib/libkern/strncmp.c index 894ab4bbd0d..0a88e080488 100644 --- a/sys/lib/libkern/strncmp.c +++ b/sys/lib/libkern/strncmp.c @@ -33,10 +33,14 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)strncmp.c 5.6 (Berkeley) 1/26/91";*/ -static char *rcsid = "$Id: strncmp.c,v 1.1.1.1 1995/10/18 08:52:50 deraadt Exp $"; +static char *rcsid = "$Id: strncmp.c,v 1.2 1996/05/01 15:18:52 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ +#ifndef _KERNEL #include +#else +#include +#endif int strncmp(s1, s2, n) diff --git a/sys/lib/libkern/strncpy.c b/sys/lib/libkern/strncpy.c index 93be91a529b..5279942a2be 100644 --- a/sys/lib/libkern/strncpy.c +++ b/sys/lib/libkern/strncpy.c @@ -36,10 +36,14 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)strncpy.c 5.6 (Berkeley) 1/26/91";*/ -static char *rcsid = "$Id: strncpy.c,v 1.1.1.1 1995/10/18 08:52:50 deraadt Exp $"; +static char *rcsid = "$Id: strncpy.c,v 1.2 1996/05/01 15:18:53 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ +#ifndef _KERNEL #include +#else +#include +#endif /* * Copy src to dst, truncating or null-padding to always copy n bytes. -- 2.20.1