summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1996-10-15 09:41:57 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1996-10-15 09:41:57 +0000
commit07accf0ee3553270b2d9d0f6ca567f03df4e38eb (patch)
treea9e76dfd9a6523e6c1b5959d07948c0d7f171889 /sys
parentc93ece3684c623e008a789363af7a22a5fff6662 (diff)
zlib need this
Diffstat (limited to 'sys')
-rw-r--r--sys/lib/libsa/Makefile7
-rw-r--r--sys/lib/libsa/memset.c51
-rw-r--r--sys/lib/libsa/stand.h4
3 files changed, 59 insertions, 3 deletions
diff --git a/sys/lib/libsa/Makefile b/sys/lib/libsa/Makefile
index 12efd273cf1..55771a15699 100644
--- a/sys/lib/libsa/Makefile
+++ b/sys/lib/libsa/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.6 1996/09/23 14:18:44 mickey Exp $
+# $OpenBSD: Makefile,v 1.7 1996/10/15 09:41:54 mickey Exp $
# $NetBSD: Makefile,v 1.10 1995/10/01 06:00:32 phil Exp $
LIB= sa
@@ -13,9 +13,12 @@ AFLAGS+=${XAFLAGS}
CFLAGS+=${XCFLAGS} -D_STANDALONE -DCOMPAT_UFS $(DEBUGFLAGS) -I${DIR} -I${DIR}/../..
CPPFLAGS+=${XCPPFLAGS}
+all:
+ echo ${S}/arch/${MACHINE_ARCH}/stand/Makefile.inc
+
# stand routines
SRCS+= alloc.c bcopy.c memcpy.c exit.c exec.c getfile.c gets.c globals.c \
- printf.c strerror.c strcmp.c
+ printf.c strerror.c strcmp.c memset.c
# io routines
SRCS+= close.c closeall.c dev.c disklabel.c dkcksum.c ioctl.c \
diff --git a/sys/lib/libsa/memset.c b/sys/lib/libsa/memset.c
new file mode 100644
index 00000000000..ad3e9b5dc1f
--- /dev/null
+++ b/sys/lib/libsa/memset.c
@@ -0,0 +1,51 @@
+/* $OpenBSD: memset.c,v 1.1 1996/10/15 09:41:55 mickey Exp $ */
+
+/*-
+ * Copyright (c) 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ *
+ * from: @(#)bcopy.c 8.1 (Berkeley) 6/11/93
+ */
+
+#include <sys/types.h>
+#include "stand.h"
+
+void *
+memset(s1, c, n)
+ void *s1;
+ int c;
+ size_t n;
+{
+ register char *p = s1;
+ while (n--)
+ *p++ = c;
+ return s1;
+}
diff --git a/sys/lib/libsa/stand.h b/sys/lib/libsa/stand.h
index cc19608a3fc..9bfe239624b 100644
--- a/sys/lib/libsa/stand.h
+++ b/sys/lib/libsa/stand.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: stand.h,v 1.6 1996/09/23 14:19:04 mickey Exp $ */
+/* $OpenBSD: stand.h,v 1.7 1996/10/15 09:41:56 mickey Exp $ */
/* $NetBSD: stand.h,v 1.13 1996/01/13 22:25:42 leo Exp $ */
/*-
@@ -125,12 +125,14 @@ __dead void panic __P((const char *, ...)) __attribute__((noreturn));
__dead void _rtt __P((void)) __attribute__((noreturn));
void bcopy __P((const void *, void *, size_t));
void *memcpy __P((void *, const void *, size_t));
+void *memset __P((void *, int, size_t));
void exec __P((char *, char *, int));
int open __P((const char *, int));
int close __P((int));
void closeall __P((void));
ssize_t read __P((int, void *, size_t));
ssize_t write __P((int, void *, size_t));
+ssize_t zread __P((int, void *, size_t)); /* for execz */
int nodev __P((void));
int noioctl __P((struct open_file *, u_long, void *));