Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Jan 1996 07:46:14 +0100 (MET)
From:      J Wunsch <j@uriah.heep.sax.de>
To:        dglo@SSEC.WISC.EDU (Dave Glowacki)
Cc:        ports@FreeBSD.org
Subject:   Re: Differentiating between 2.0 and 2.1
Message-ID:  <199601100646.HAA05265@uriah.heep.sax.de>
In-Reply-To: <199601100205.UAA03363@tick.SSEC.WISC.EDU> from "Dave Glowacki" at Jan 9, 96 08:05:56 pm

next in thread | previous in thread | raw e-mail | index | archive | help
As Dave Glowacki wrote:
> 
> OK, I can determine that I'm on a FreeBSD system if __FreeBSD__ is defined
> and I can tell that I'm on a FreeBSD 2.x system if __FreeBSD__ == 2.
> 
> Is there a way to determine if a program is being built on a FreeBSD 2.1
> system as opposed to a 2.0 system?

#if __FreeBSD__ >= 2
#include <osreldate.h>

__FreeBSD_version was:

2.0R:			199411
2.1-current's:		199501, 199503
2.0.5R:			199504
2.1R:			199511
2.2-current before 2.1: 199508
2.2-current as of today: 199512  (will certainly be bumped)

(Can please somebody record this in the handbook?  I've extracted it
out of the CVS files.)

-- 
cheers, J"org

joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
Never trust an operating system you don't have sources for. ;-)



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