From owner-freebsd-hackers Tue Jan 20 12:16:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA01861 for hackers-outgoing; Tue, 20 Jan 1998 12:16:34 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from peedub.muc.de (newpc.muc.ditec.de [194.120.126.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA01851 for ; Tue, 20 Jan 1998 12:16:25 -0800 (PST) (envelope-from garyj@peedub.muc.de) Received: from peedub.muc.de (localhost [127.0.0.1]) by peedub.muc.de (8.8.8/8.6.9) with ESMTP id VAA28906 for ; Tue, 20 Jan 1998 21:05:40 +0100 (CET) Message-Id: <199801202005.VAA28906@peedub.muc.de> X-Mailer: exmh version 2.0.1 12/23/97 To: freebsd-hackers@freefall.FreeBSD.org Subject: Re: Device Driver Reply-To: Gary Jennejohn In-reply-to: Your message of "Mon, 19 Jan 1998 10:10:43 PST." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 20 Jan 1998 21:05:39 +0100 From: Gary Jennejohn Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk Alex writes: >On Mon, 19 Jan 1998 daniel_sobral@voga.com.br wrote: > >> 1) It would be nice if the driver would compile both under 3.0 and 2.2. >> Now, I realise this is not _really_ possible, because the define I have to >> check does not depend on what you are compiling for, but on what the gcc >> was compiled under. Now, if someone would tell me _what_ this define name, >> I'd be really grateful. Again, if there is any driver in the 3.0 tree that >> does this trick already (same driver under both 3.0 and 2.2), would someone >> kindly indicate it to me? > >What about including osreldate.h? It does depend on the include files >being installed, but other than that, that's not necesarily compiler >dependant. It only assumes that you're not cross compiling. >Realistically however, two seperate versions are probably the most >bulletproof idea. > osreldate.h isn't accessible during a kernel compile (at least under -current). You could try using something like this: #if defined(__FreeBSD__) && __FreeBSD__ >= 3 #endif for -current. Works for me. --- Gary Jennejohn Home - garyj@muc.de Work - garyj@fkr.dec.com