Module Name: src
Committed By: rillig
Date: Fri Nov 13 08:21:37 UTC 2020
Modified Files:
src/usr.bin/make: main.c
Log Message:
make(1): flatten #ifdef in InitVarMachineArch
Without proper indentation, that chain of nested #ifndef directives was
really hard to read.
To generate a diff of this commit:
cvs rdiff -u -r1.456 -r1.457 src/usr.bin/make/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.456 src/usr.bin/make/main.c:1.457
--- src/usr.bin/make/main.c:1.456 Thu Nov 12 23:35:21 2020
+++ src/usr.bin/make/main.c Fri Nov 13 08:21:37 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.456 2020/11/12 23:35:21 sjg Exp $ */
+/* $NetBSD: main.c,v 1.457 2020/11/13 08:21:37 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
#include "trace.h"
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.456 2020/11/12 23:35:21 sjg Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.457 2020/11/13 08:21:37 rillig Exp $");
#if defined(MAKE_NATIVE) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
"The Regents of the University of California. "
@@ -1022,17 +1022,13 @@ InitVarMachineArch(void)
return machine_arch_buf;
}
-#else
-#ifndef MACHINE_ARCH
-#ifdef MAKE_MACHINE_ARCH
+#elif defined(MACHINE_ARCH)
+ return MACHINE_ARCH;
+#elif defined(MAKE_MACHINE_ARCH)
return MAKE_MACHINE_ARCH;
#else
return "unknown";
#endif
-#else
- return MACHINE_ARCH;
-#endif
-#endif
}
#ifndef NO_PWD_OVERRIDE