Subject: Re: osrelease.sh and param.h
To: Chris G. Demetriou <cgd@netbsd.org>
From: Simon Burge <simonb@netbsd.org>
List: tech-kern
Date: 05/06/1999 11:05:53
Chris G. Demetriou wrote:

> Simon Burge <simonb@netbsd.org> writes:
> > I originally tinkered with parsing the value of __NetBSD_Version__, but
> > this value doesn't take into account things like _ALPHA and _BETA which
> > seem to have no representation at the moment.
> 
> (1) i think you do have to parse it.

That's easy, until (2) is taken into account.

> (2) i think you do need to cope with the _ALPHA and _BETA issue.

I had a think about this and couldn't come up with anything.  Parsing
__NetBSD_Version__ and then looking for ALPHA, BETA, whatever crossed my
mind, but I thought it'd be better to do it either one way or the other.
Unfortunately I didn't come up with a representation that fits the
current setup.

Hmm, maybe we can use those two `0's at the end - how does:

	MMmmrrppRl

sound, where 'R' is 0 for pre-release and '1' for released, and 'l'
is the level - '0' for alpha, '1' for beta, and so on.  This still
satifies 1.4 (104000010) > 1.4BETA (104000002).  You could even
encode a released 1.4.2B and an 1.4.2B_BETA this way ;)

> the change, as-is, is one step forward two steps back.

I was thinking one and half forward, one back :-)

Simon.