Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Sep 1997 03:15:06 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        cgull@smoke.marlboro.vt.us (john hood)
Cc:        tlambert@primenet.com, freebsd-current@freebsd.org
Subject:   Re: Bug in committed pci/if_de.c
Message-ID:  <199709080315.UAA17179@usr07.primenet.com>
In-Reply-To: <199709080300.XAA17185@smoke.marlboro.vt.us> from "john hood" at Sep 7, 97 11:00:55 pm

next in thread | previous in thread | raw e-mail | index | archive | help
>  > It's also incorrect because it's using __FreeBSD__, which is a compiler
>  > compile-time constant, and has nothing to do with the version of FreeBSD
>  > that is being target by the compile, only (really) which version of
>  > FreeBSD the compiler was compiled on.
> 
> Well...is there a way to determine which version or variant of the
> kernel's buing built?  There's one new define that keeps wd.c from
> being portable between 2.2.2 and -current, and I'd like to find
> something a tad more elegant than '#if defined'...

Commit one variant on the 2.2.2 branch and the other on the -current
branch.  IMO, it is topologically equivalent to use an #ifdef and
the implicit #ifdef of the particular tag you checkout.

As far as the question: I don't know.  It seems that the OS, not
the compiler, should be the source of compile-time version information
about the OS.  Putting it in the gcc and cpp sources is broken no
matter how you look at it.

As to the "right way", well, there's my sysctl kludge suggestion, but
that's a kludge.  I think maybe the correct way might be to drop the
things in as .m4 and process them to one branch or the other, while
doing joint maintenance on the .m4; a bad, if UNIX tradtitionalist,
soloution.

If the problem is really getting this big with maintaining backward
compatability with -release, perhaps it's time to upgrade the version
dependent features that you are switching, as well as upgrading single
driver files?

The only other real alternative would be a new release; that doesn't
seem very viable at this point in time.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199709080315.UAA17179>