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

AB> From: Alan Barrett <>
AB> To:
AB> Subject: Re: Checking for NetBSD version
AB> Date: Mon, 17 Nov 2003 10:13:06 +0200
AB> X-Spam-Level:
AB> On Mon, 17 Nov 2003, 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> #include <sys/param.h>
AB> #if defined(__NetBSD_Version__) && (__NetBSD_Version__ < 106110000)
AB> 	/* NetBSD < 1.6K does not have separate read/write statistics. */

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...

NetBSD: Two guys with a vax.