Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Apr 1995 21:39:38 +0200 (MET DST)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        andreas@knobel.gun.de (Andreas Klemm)
Cc:        freebsd-hackers@FreeBSD.org (FreeBSD hackers)
Subject:   Re: aspfilter & stdin
Message-ID:  <199504291939.VAA00553@uriah.heep.sax.de>
In-Reply-To: <199504291421.QAA02416@knobel.GUN.de> from "Andreas Klemm" at Apr 29, 95 04:21:19 pm

next in thread | previous in thread | raw e-mail | index | archive | help
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 <sys/param.h>.  Hopefully that
    file is already included; if not, add the code:

*   #ifdef _HAVE_PARAM_H
*   #include <sys/param.h>
*   #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. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504291939.VAA00553>