From owner-freebsd-hackers Sat Apr 12 19:04:25 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id TAA09809 for hackers-outgoing; Sat, 12 Apr 1997 19:04:25 -0700 (PDT) Received: from cheops.anu.edu.au (avalon@cheops.anu.edu.au [150.203.76.24]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id TAA09799 for ; Sat, 12 Apr 1997 19:04:19 -0700 (PDT) Message-Id: <199704130204.TAA09799@freefall.freebsd.org> Received: by cheops.anu.edu.au (1.37.109.16/16.2) id AA277876680; Sun, 13 Apr 1997 11:58:00 +1000 From: Darren Reed Subject: Re: detecting kernel version at compile time To: terry@lambert.org (Terry Lambert) Date: Sun, 13 Apr 1997 11:58:00 +1000 (EST) Cc: hackers@freebsd.org In-Reply-To: <199704121850.LAA15492@phaeton.artisoft.com> from "Terry Lambert" at Apr 12, 97 11:50:18 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk 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 . 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