From owner-freebsd-hackers Sat Apr 29 12:46:59 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id MAA08085 for hackers-outgoing; Sat, 29 Apr 1995 12:46:59 -0700 Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id MAA08075 for ; Sat, 29 Apr 1995 12:46:54 -0700 Received: from sax.sax.de by irz301.inf.tu-dresden.de with SMTP (5.67b+/DEC-Ultrix/4.3) id AA16242; Sat, 29 Apr 1995 21:46:31 +0200 Received: by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id VAA02720; Sat, 29 Apr 1995 21:46:31 +0200 Received: (from j@localhost) by uriah.heep.sax.de (8.6.11/8.6.9) id VAA00553; Sat, 29 Apr 1995 21:39:39 +0200 From: J Wunsch Message-Id: <199504291939.VAA00553@uriah.heep.sax.de> Subject: Re: aspfilter & stdin To: andreas@knobel.gun.de (Andreas Klemm) Date: Sat, 29 Apr 1995 21:39:38 +0200 (MET DST) Cc: freebsd-hackers@FreeBSD.org (FreeBSD hackers) Reply-To: freebsd-hackers@FreeBSD.org (FreeBSD hackers) In-Reply-To: <199504291421.QAA02416@knobel.GUN.de> from "Andreas Klemm" at Apr 29, 95 04:21:19 pm Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) X-Phone: +49-351-2012 669 X-Mailer: ELM [version 2.4 PL23] Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Content-Length: 1583 Sender: hackers-owner@FreeBSD.org Precedence: bulk As Andreas Klemm wrote: > > > Boy, he tries to rewind a pipe from a separate _process_! This is > > impossible. > > I got this from someone to eliminate the need for a tmp file, when > printing dvi files using dvips. It worked for Linux Slackware like > charm, as well as for FreeBSD 1.1.5.1. My fault. Someone else clarified this in private mail; the rewind is actually on a disk file, of course. > FreeBSD 2.0 introduces something new, which made this necessary: > > #ifdef __FreeBSD__ NOOO! I'm not sure which systems define the 2nd parameter of lseek() to be off_t. Anyway, from /usr/ports/GUIDELINES: 0.2 The preferred way to tell 4.3BSD/Reno and newer versions of the BSD code apart is by using the "BSD" macro defined in . Hopefully that file is already included; if not, add the code: * #ifdef _HAVE_PARAM_H * #include * #endif to the proper place in the .c file and add -D_HAVE_PARAM_H to the CFLAGS in the Makefile. Then, you may use: #if (defined(BSD) && (BSD >= 199103)) to detect if the code is being compiled on a 4.3 Net2 code base or newer (e.g. FreeBSD 1.x, 4.3/Reno, NetBSD 0.9, 386BSD, BSD/386 1.0). * Use: * * #if (defined(BSD) && (BSD >= 199306)) * * to detect if the code is being compiled on a 4.4 code base or newer * (e.g. FreeBSD 2.x, 4.4, NetBSD 1.0, BSD/386 1.1). The change is required for ALL 4.4BSD based systems! -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ Never trust an operating system you don't have sources for. ;-)