Subject: Checking for NetBSD version
To: None <current-users@netbsd.org>
From: None <martti.kuparinen@piuha.net>
List: current-users
Date: 11/17/2003 09:36:03
Hi!

What is "the correct way" of checking NetBSD version (1.x vs -current) in
source code (with preprocessor)? In other words, how should I rewrite
the "if 1" line in the following code fragment?


#if 1
        /* NetBSD 1.x does not have separate read/write statistics. */
        perf->rbytes = drive.dk_bytes;
        perf->wbytes = drive.dk_bytes;
#else
        perf->rbytes = drive.dk_rbytes;
        perf->wbytes = drive.dk_wbytes;
#endif


Martti