diff options
author | 1999-02-16 21:27:37 +0000 | |
---|---|---|
committer | 1999-02-16 21:27:37 +0000 | |
commit | ece7822f17a58620d91c4e3bf7068e8c6eca5031 (patch) | |
tree | 5c1c3acf7dfb675971bd468283088cbfdffd37cd /sys/kern/sys_pipe.c | |
parent | kludge to get rid of dbm_rdonly not being defined (diff) | |
download | wireguard-openbsd-ece7822f17a58620d91c4e3bf7068e8c6eca5031.tar.xz wireguard-openbsd-ece7822f17a58620d91c4e3bf7068e8c6eca5031.zip |
Move defining of PIPE_NODIRECT to pipe.h and conditionalize more code with it.
This allows this code to compile on sparc.
Diffstat (limited to 'sys/kern/sys_pipe.c')
-rw-r--r-- | sys/kern/sys_pipe.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/kern/sys_pipe.c b/sys/kern/sys_pipe.c index 559ceee1c09..990fd6b79e4 100644 --- a/sys/kern/sys_pipe.c +++ b/sys/kern/sys_pipe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sys_pipe.c,v 1.8 1997/11/06 05:58:21 csapuntz Exp $ */ +/* $OpenBSD: sys_pipe.c,v 1.9 1999/02/16 21:27:37 art Exp $ */ /* * Copyright (c) 1996 John S. Dyson @@ -88,15 +88,6 @@ #include <sys/pipe.h> /* - * Use this define if you want to disable *fancy* VM things. Expect an - * approx 30% decrease in transfer rate. This could be useful for - * NetBSD or OpenBSD. - */ -#if defined(__NetBSD__) || defined(__OpenBSD__) -#define PIPE_NODIRECT -#endif - -/* * interfaces to the outside world */ int pipe_read __P((struct file *, struct uio *, struct ucred *)); @@ -981,9 +972,11 @@ pipe_ioctl(fp, cmd, data, p) return (0); case FIONREAD: +#ifndef PIPE_NODIRECT if (mpipe->pipe_state & PIPE_DIRECTW) *(int *)data = mpipe->pipe_map.cnt; else +#endif *(int *)data = mpipe->pipe_buffer.cnt; return (0); |