From owner-freebsd-hackers Wed Jun 12 14:44:53 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA07051 for hackers-outgoing; Wed, 12 Jun 1996 14:44:53 -0700 (PDT) Received: from peedub.gj.org (newpc.muc.ditec.de [194.120.126.33]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id OAA07041 for ; Wed, 12 Jun 1996 14:44:46 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by peedub.gj.org (8.7.5/8.6.9) with SMTP id XAA07254; Wed, 12 Jun 1996 23:37:53 GMT Message-Id: <199606122337.XAA07254@peedub.gj.org> X-Authentication-Warning: peedub.gj.org: Host localhost [127.0.0.1] didn't use HELO protocol X-Mailer: exmh version 1.6 4/21/95 To: Michael Smith Cc: freebsd-hackers@freefall.FreeBSD.org Subject: Re: Stupid driver question... Reply-To: Gary Jennejohn In-reply-to: Your message of "Wed, 12 Jun 1996 11:54:58 +0930." <199606120224.LAA14856@genesis.atrad.adelaide.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 12 Jun 1996 23:37:53 +0000 From: Gary Jennejohn Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Michael Smith writes: > >I'm sure I've seen this asked before, but I can't find or recall the answer. > >How can a driver tell whether it's being built in a 2.1 or 2.2 kernel? > >(More specifically, I have a driver I'd like to keep as a single file that > needs to be built into 2.1R and -current kernels) > the way I handled this in the new ISDN code (which compiles under 2.1R, -stable, -current and NetBSD) was to include and then use `#if BSD > 199306' for code which was restricted to -current. Of course, this won't work for stuff which was brought into -stable from -current but isn't in 2.1R. Luckily, there isn't any code in the ISDN stuff for which this is true. --- Gary Jennejohn Home - Gary.Jennejohn@munich.netsurf.de Work - gjennejohn@frt.dec.com