summaryrefslogtreecommitdiffstats
path: root/usr.bin/make
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>1999-11-23 10:35:24 +0000
committermarcel <marcel@FreeBSD.org>1999-11-23 10:35:24 +0000
commita96d7080dc5f043e9173190479e0fa296d44d498 (patch)
tree1aaab2ffa163beadb20ed6467a3dd85b2ec84d47 /usr.bin/make
parente3a552ed38f71bafb06bca255418e110a40208a8 (diff)
downloadFreeBSD-src-a96d7080dc5f043e9173190479e0fa296d44d498.zip
FreeBSD-src-a96d7080dc5f043e9173190479e0fa296d44d498.tar.gz
Improve backward compatibility.
make(1) uses sysctlbyname() to find out if it is running on a PC98 machine. This check has been added on 1998/9/9. The MIB variable was added on 1998/8/31. At that time __FreeBSD_version was 300003. So, only perform the check *if* __FreeBSD_version is defined and if it's greater than 300003. For the record: sysctlbyname was added on 1997/5/30 so this change automaticly handles that...
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c
index 25726b8..ae3f820 100644
--- a/usr.bin/make/main.c
+++ b/usr.bin/make/main.c
@@ -516,12 +516,16 @@ main(argc, argv)
}
#endif
-#if defined(__i386__)
+#if defined(__i386__) && defined(__FreeBSD_version) && \
+ __FreeBSD_version > 300003
/*
* PC-98 kernel sets the `i386' string to the utsname.machine and
* it cannot be distinguished from IBM-PC by uname(3). Therefore,
* we check machine.ispc98 and adjust the machine variable before
* using usname(3) below.
+ * NOTE: machdep.ispc98 was defined on 1998/8/31. At that time,
+ * __FreeBSD_version was defined as 300003. So, this check can
+ * safely be done with any kernel with version > 300003.
*/
if (!machine) {
int ispc98;
OpenPOWER on IntegriCloud