Subject: Re: Checking for NetBSD version
To: None <current-users@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: current-users
Date: 11/17/2003 10:53:24
On Mon, 17 Nov 2003, Frederick Bruckman wrote:
> I seem to recall that the change occurred *in* 1.6K. There's no
> backwards compatibility, so someone's going to lose no matter where
> you draw the line.
The real change went in about 80 minutes before the version bump
from 1.6J to 1.6K. See CVS logs for src/sys/sys/param.h;1.152 and
src/sys/sys/disk.h;1.20.
> BTW, you can simplify by turning that around:
>
> #if __NetBSD_Version__ >= 106110000
> /* separate read/write statistics */
> #else
> /* ... */
> #endif
>
> as __NetBSD_Version__ will compare numerically as if it were "0" for
> non-NetBSD or older NetBSD systems (for any ANSI compiler).
Yes, you can omit the test for defined(__NetBSD_Version__) if you are
careful.
--apb (Alan Barrett)