Subject: Re: NetBSD version naming - suggestion
To: Frederick Bruckman <fredb@immanent.net>
From: Michael Rauch <mrauch@netbsd.org>
List: current-users
Date: 04/25/2003 10:54:13
Hi, 

On Thu, Apr 24, 2003 at 03:46:45PM -0500, Frederick Bruckman wrote:
> As versions currently map to __NetBSD_Version__:
> 
> 	2.1	=>	201000000
> 	2.1.1	=>	201000100
> 	2.1A	=>	201010000
> 	2.1B	=>	201020000
> 	2.2	=>	202000000
> 
> This shows that the activity on the trunk is more significant than the
> activity on a branch, and lets you test for most feature changes,
> those that appear only on the trunk (and of course, the next branch),
> with a simple comparison.
> [...] So, can you
> tell us what arrangement of digits would make __NetBSD_Version__ for
> 2.2A and 2.2B less than for 2.2?

e.g., we could mark the stable versions with a "current-letter"-number of 99:
(spaces for readability)
              MM mm rr pp 00  
2.1     =>    02 01 99 00 00
2.1.1   =>    02 01 99 01 00
2.2A    =>    02 02 01 00 00 
2.2B    =>    02 02 02 00 00
2.2     =>    02 02 99 00 00

Looking at the already mentioned src/dist/file/src/readelf.c, this would
only change the tests for (ver_rel == 0) to 
((ver_rel == 0)||(ver_rel == 99)) (and likewise for !=), so there aren't
even huge special case constructions necessary.


Michael