Date: Tue, 20 Jan 1998 21:05:39 +0100 From: Gary Jennejohn <garyj@peedub.muc.de> To: freebsd-hackers@freefall.FreeBSD.org Subject: Re: Device Driver Message-ID: <199801202005.VAA28906@peedub.muc.de> In-Reply-To: Your message of "Mon, 19 Jan 1998 10:10:43 PST." <Pine.BSF.3.96.980119100756.382D-100000@zippy.dyn.ml.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801202005.VAA28906>