From 076114decb8bc3f4b8fd742e9b50fac5aafc9425 Mon Sep 17 00:00:00 2001 From: Artur Grabowski Date: Tue, 16 Feb 1999 21:27:38 +0000 Subject: Move defining of PIPE_NODIRECT to pipe.h and conditionalize more code with it. This allows this code to compile on sparc. --- sys/kern/sys_pipe.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'sys/kern') 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 @@ -87,15 +87,6 @@ #include -/* - * 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 */ @@ -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); -- cgit v1.2.3