tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Can someone please explain the rules for __NetBSD_Version__ ??

I don't understand how __NetBSD_Version__ is supposed to operate
(other than the way it is used in -current - that part is no
mystery) - that is, how it is used in NetBSD releases.

The documentation (which as far as I can ascertain is just what
is in src/sys/sys/param.h) no longer seems to match current

Eg: NetBSD 5.1.1 seems to have a __NetBSD_Version__ of 501000000
which is exactly the same value as was used for NetBSD 5.1
(the comments in param.h imply that 5.1.1 should be 501000100 instead).

If it was just 5.1.1 I would assume maybe just an accident, and send-pr
it, but the same seems to have happened for NetBSD 4.0.1 (the only
patch release of NetBSD 4 that ever existed, I think) which has its
__NetBSD_Version__ set identically to what was used for NetBSD 4.0.

This suggests a rule somewhere, but I can't find what it is.

Also note that it seems to have changed, as the minor number was included
in __NetBSD_Version__ back in the NetBSD 3 days (sure 3.0.1 was
given a value that would suggest it was actually 3.0.10 - someone
got the column wrong, and that persisted into 3.0.2 and 3.0.3, but
that's trivia).    I don't recall any announcement about any changes
in how this is intended to be used, and certainly the comments in param.h
have not been adjusted.

Could someone who knows please explain the rules for the construction
of __NetBSD_Version__ for releases, what the sub-fields are, and how
they're actually used - and then perhaps actually put that information
into param.h  ?



ps: I'd still like to see __NetBSD_Prereq__() macro destroyed.
The change in its definition (now quite a while ago) makes it unreliable
to use, and (at least the last time it was discussed) no-one knew of
anyone or anything who used it, and I thought the consensus at the time
was to nuke it - but that's never actually been done.   Note this is
an independent issue to the main question above,

Home | Main Index | Thread Index | Old Index