Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Apr 1997 11:58:00 +1000 (EST)
From:      Darren Reed <avalon@coombs.anu.edu.au>
To:        terry@lambert.org (Terry Lambert)
Cc:        hackers@freebsd.org
Subject:   Re: detecting kernel version at compile time
Message-ID:  <199704130204.TAA09799@freefall.freebsd.org>
In-Reply-To: <199704121850.LAA15492@phaeton.artisoft.com> from "Terry Lambert" at Apr 12, 97 11:50:18 am

next in thread | previous in thread | raw e-mail | index | archive | help
In some mail from Terry Lambert, sie said:
> 
> > Hmmm, can __FreeBSD_sysversion be made the same value as __FreeBSD_version ?
> > (or vice versa)
> 
> 
> The easiest way is to install only RELEASE version of the OS, and don't
> update your kernel or user space sources until the next RELEASE.
> 
> It turns out that that also happens to be the easiest situation for
> a commercial vendor to support, so everyone gets to be happy.  8-).
> 
> 
> > The problem with __FreeBSD__ is that it is defined by cc - or gcc/pgcc.
> > 
> > That is, it depends on what system the compiler is built, not what OS
> > it is running on.
> > 
> > Problem being, it impacts every compilation thereafter.
> 
> I do not use the __FreeBSD__ tag, personally.

Okay, Terry, you don't use __FreeBSD__ and you don't use <osreldate.h>.

How do you write code that compiles & runs on FreeBSD 2.1.6 ->
FreeBSD-current ?

More importantly, how do you write kernel code for the same set of versions
without having n different source files ?

Darren



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