From a96d7080dc5f043e9173190479e0fa296d44d498 Mon Sep 17 00:00:00 2001 From: marcel Date: Tue, 23 Nov 1999 10:35:24 +0000 Subject: [PATCH] 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... --- usr.bin/make/main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 25726b871a5f..ae3f820ec892 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;