Subject: Re: Checking for NetBSD version
To: Alan Barrett <apb@cequrux.com>
From: Greywolf <greywolf@starwolf.com>
List: current-users
Date: 11/17/2003 10:29:11
Thus spake Alan Barrett ("AB> ") sometime Today...

AB> From: Alan Barrett <apb@cequrux.com>
AB> To: current-users@NetBSD.org
AB> Subject: Re: Checking for NetBSD version
AB> Date: Mon, 17 Nov 2003 10:13:06 +0200
AB> X-Spam-Level:
AB>
AB> On Mon, 17 Nov 2003, martti.kuparinen@piuha.net wrote:
AB> > What is "the correct way" of checking NetBSD version (1.x vs -current) in
AB> > source code (with preprocessor)? In other words, how should I rewrite
AB> > the "if 1" line in the following code fragment?
AB>
AB> #include <sys/param.h>
AB> #if defined(__NetBSD_Version__) && (__NetBSD_Version__ < 106110000)
AB> 	/* NetBSD < 1.6K does not have separate read/write statistics. */
AB>

Just a thought:  Should sys/param.h have a __NetBSD_Date__ setting, or
would this just be too much of a dependency nightmare...?  Since we don't
always bump the __NetBSD_Version__ for stuff which is visible, the
__NetBSD_Date__ setting might prove more reliable...

				--*greywolf;
--
NetBSD: Two guys with a vax.