summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-30 08:29:47 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1995-12-30 08:29:47 +0000
commit7ea78dd02395485638dcc4edca5cefe5489f69fd (patch)
tree9b24b8c7957a6fba691a8148a6f2727da9adba6b
parenta889e4a9e447d7a396e6160975f23d8bd7f49edf (diff)
from netbsd: use memcpy/memset for FD_COPY/FD_ZERO in userland
-rw-r--r--sys/sys/types.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/sys/types.h b/sys/sys/types.h
index e2496fe03ae..27762001c62 100644
--- a/sys/sys/types.h
+++ b/sys/sys/types.h
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.23 1995/05/28 03:06:34 jtc Exp $ */
+/* $NetBSD: types.h,v 1.24 1995/12/29 01:15:13 jtc Exp $ */
/*-
* Copyright (c) 1982, 1986, 1991, 1993
@@ -148,8 +148,13 @@ typedef struct fd_set {
#define FD_SET(n, p) ((p)->fds_bits[(n)/NFDBITS] |= (1 << ((n) % NFDBITS)))
#define FD_CLR(n, p) ((p)->fds_bits[(n)/NFDBITS] &= ~(1 << ((n) % NFDBITS)))
#define FD_ISSET(n, p) ((p)->fds_bits[(n)/NFDBITS] & (1 << ((n) % NFDBITS)))
+#ifdef _KERNEL
#define FD_COPY(f, t) bcopy(f, t, sizeof(*(f)))
#define FD_ZERO(p) bzero(p, sizeof(*(p)))
+#else
+#define FD_COPY(f, t) memcpy(t, f, sizeof(*(f)))
+#define FD_ZERO(p) memset(p, 0, sizeof(*(p)))
+#endif
#if defined(__STDC__) && defined(_KERNEL)
/*