From 27db799796b702fc2bb5abae03a3019c2d76a8be Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Mon, 23 Oct 2006 21:59:18 +0000 Subject: [PATCH] Further normalize the _XXX_H_ symbols used to conditionalize header file inclusion. Use _MACHINE_BLAH_H_ for headers found in "/usr/src/sys/arch//include". Most headers already did this, but some did not. Use _ARCH_SUBDIR_BLAH_H_ for headers found in "/usr/src/sys/arch//subdir " instead of _I386_SUBDIR_BLAH_H_. Change #include's made in architecture-specific directories to use instead of "blah.h", allowing the included header files to be overrdden by another architecture. For example, a virtual kernel architecture might include a header from arch/i386/include which then includes some other header in arch/i386/include. But really we want that other header to also go via the arch/vkernel/include, so the header files in arch/i386/include must use instead of "blah.h" for most of their sub-includes. Change most architecture-specific includes such as to use a generic path through the "arch" softlink, such as . Remove the temporary -I@/arch shim made in a recent commit, the mechanism replaces it. These changes allow us to implement heirarchical architectural overrides, primarily intended for virtual kernel support. A virtual kernel uses an architecture of 'vkernel' but must be able to access actual cpu-specific header files such as those found in arch/i386. It does this using a "cpu" softlink. For example, someone including in a vkernel build would hit the "arch/vkernel/include/atomic.h" header, and this header could then #include to access the actual cpu's atomic.h file: "arch/i386/include/atomic.h". The ultimate effect is that an architecture can build on another architecture's header and source files. --- sys/net/ppp_layer/ppp_tty.c | 6 ++---- sys/platform/pc32/acpica5/acpi_wakeup.c | 4 ++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/sys/net/ppp_layer/ppp_tty.c b/sys/net/ppp_layer/ppp_tty.c index b0cdf05d1c..9a19b73618 100644 --- a/sys/net/ppp_layer/ppp_tty.c +++ b/sys/net/ppp_layer/ppp_tty.c @@ -71,7 +71,7 @@ */ /* $FreeBSD: src/sys/net/ppp_tty.c,v 1.43.2.1 2002/02/13 00:43:11 dillon Exp $ */ -/* $DragonFly: src/sys/net/ppp_layer/ppp_tty.c,v 1.20 2006/09/10 01:26:39 dillon Exp $ */ +/* $DragonFly: src/sys/net/ppp_layer/ppp_tty.c,v 1.21 2006/10/23 21:59:18 dillon Exp $ */ #include "opt_ppp.h" /* XXX for ppp_defs.h */ @@ -90,9 +90,7 @@ #include #include -#ifdef __i386__ -#include -#endif +#include #include #include diff --git a/sys/platform/pc32/acpica5/acpi_wakeup.c b/sys/platform/pc32/acpica5/acpi_wakeup.c index 12715f54a7..3a8470b7f7 100644 --- a/sys/platform/pc32/acpica5/acpi_wakeup.c +++ b/sys/platform/pc32/acpica5/acpi_wakeup.c @@ -25,7 +25,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/i386/acpica/acpi_wakeup.c,v 1.33 2004/05/06 02:18:58 njl Exp $ - * $DragonFly: src/sys/platform/pc32/acpica5/acpi_wakeup.c,v 1.9 2005/10/30 04:20:49 y0netan1 Exp $ + * $DragonFly: src/sys/platform/pc32/acpica5/acpi_wakeup.c,v 1.10 2006/10/23 21:59:16 dillon Exp $ */ #include @@ -45,7 +45,7 @@ #include #include #include -#include +#include #include "acpi.h" #include -- 2.41.0