diff options
| author | KATO Takenori <kato@FreeBSD.org> | 1998-09-09 14:58:30 +0000 |
|---|---|---|
| committer | KATO Takenori <kato@FreeBSD.org> | 1998-09-09 14:58:30 +0000 |
| commit | cab4769a9493bed0e1d1a307cdb5603c3a4ca410 (patch) | |
| tree | 7813939c84cf6f708358f23b183a732abd0f6bf3 /usr.bin | |
| parent | 00d11a6a37c767f7bb63430dbd7fb64db2ce4b62 (diff) | |
Notes
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/make/main.c | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/usr.bin/make/main.c b/usr.bin/make/main.c index 8f82d1dafe011..63dbe1acea14d 100644 --- a/usr.bin/make/main.c +++ b/usr.bin/make/main.c @@ -47,7 +47,7 @@ static const char copyright[] = static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #endif static const char rcsid[] = - "$Id: main.c,v 1.24 1998/06/13 11:55:57 peter Exp $"; + "$Id: main.c,v 1.25 1998/07/26 17:06:05 imp Exp $"; #endif /* not lint */ /*- @@ -83,6 +83,9 @@ static const char rcsid[] = #include <sys/resource.h> #include <sys/signal.h> #include <sys/stat.h> +#if defined(__i386__) +#include <sys/sysctl.h> +#endif #ifndef MACHINE #include <sys/utsname.h> #endif @@ -473,6 +476,25 @@ main(argc, argv) (void) strcpy(curdir, pwd); } +#if defined(__i386__) + /* + * 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. + */ + if (!machine) { + int ispc98; + size_t len; + + len = sizeof(ispc98); + if (!sysctlbyname("machdep.ispc98", &ispc98, &len, NULL, 0)) { + if (ispc98) + machine = "pc98"; + } + } +#endif + /* * Get the name of this type of MACHINE from utsname * so we can share an executable for similar machines. |
