Subject: Re: is __NetBSD_Version__ being misused (again) ?
To: None <email@example.com>
From: Trevor Talbot <firstname.lastname@example.org>
Date: 11/17/2007 18:09:46
On 11/17/07, Robert Elz <email@example.com> wrote:
> | #define __NetBSD_Prereq__(M,m,p) (((((M) * 100000000) + \
> | (m) * 1000000) + (p) * 100) <= __NetBSD_Version__)
> | so __NetBSD_Prereq__(4,0,0) will succeed if __NetBSD_Version__ is
> | 400000003.
> * #define __NetBSD_Version__ MMmmrrpp00
> * (etc)
> It isn't the test, the test is fine, the problem is with the definition
> of __NetBSD_Version__ - and any problems with it won't appear until
> NetBSD 4.0.1 is released. The problem is that __NetBSD_Prereq__() cannot
> possibly distinguish between 4.0 (the way __NetBSD_Version__ for it
> seems to be going to be defined) and 4.0.1.
Er, why not? From what I can tell, 4.0.1 would be defined as
4000001xx. 4.0.0 is 4000000xx.
__NetBSD_Prereq__() currently tests a minimum version, not a maximum
one. A maximum test will look slightly different, but I don't see
anything wrong with __NetBSD_Version__ itself.
It seems to me that if you want to lock code to a particular ABI, you
need to test __NetBSD_Version__ equality anyway, not use
Am I missing something?