diff options
author | wollman <wollman@FreeBSD.org> | 1994-08-10 06:25:07 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1994-08-10 06:25:07 +0000 |
commit | f0e3ec0f969773ab477b4ad957e73fd26d41bc8a (patch) | |
tree | 13d577b69718b7ebec0b718a2f0cb456791e77d7 /sys/conf/newvers.sh | |
parent | 723735466d0c88ab1e89fa509d02a427c69d822a (diff) | |
download | FreeBSD-src-f0e3ec0f969773ab477b4ad957e73fd26d41bc8a.zip FreeBSD-src-f0e3ec0f969773ab477b4ad957e73fd26d41bc8a.tar.gz |
Make it easier for programs to figure out what revision of FreeBSD they
are running under. Here's how to bootstrap (order is important):
1) Re-compile gcc (just the driver is all you need).
2) Re-compile libc.
3) Re-compile your kernel. Reboot.
4) cd /usr/src/include; make install
You can now detect the compilation environment with the following code:
#if !defined(__FreeBSD__)
#define __FreeBSD_version 199401
#elif __FreeBSD__ == 1
#define __FreeBSD_version 199405
#else
#include <osreldate.h>
#endif
You can determine the run-time environment by calling the new C library
function getosreldate(), or by examining the MIB variable kern.osreldate.
For the time being, the release date is defined as 199409, which we have
already established as our target.
Diffstat (limited to 'sys/conf/newvers.sh')
-rw-r--r-- | sys/conf/newvers.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index 6ee1eda..adc2a27 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -32,7 +32,7 @@ # SUCH DAMAGE. # # @(#)newvers.sh 8.1 (Berkeley) 4/20/94 -# $Id$ +# $Id: newvers.sh,v 1.3 1994/08/02 07:38:27 davidg Exp $ if [ ! -r version ] then @@ -43,6 +43,7 @@ touch version v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date` echo "char ostype[] = \"FreeBSD\";" > vers.c echo "char osrelease[] = \"2.0.0 (Development)\";" >> vers.c +echo "int osreldate = 199409;" >> vers.c echo "char sccs[4] = { '@', '(', '#', ')' };" >>vers.c echo "char version[] = \"FreeBSD 2.0.0 (Development) #${v}: ${t}\\n ${u}@${h}:${d}\\n\";" >>vers.c |