From 97ab12262b94b9dd695c1555911450f81b91c302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Thu, 3 Apr 2014 23:32:58 +0000 Subject: [PATCH] [ACPICA] Addendum to revision 62606 : because of typedefs redefinitions (we, after, include acpi.h and co. together with DDK in other acpi bus drivers), we hackishly needed to disable them in actypes.h, and now we need to include ntddk *inside* acpi.h ... Everything would be nice only if ACPICA would not have the "clever" (read: dumb) idea to define a ACPI_BIOS_ERROR macro, which is (you guessed it) already defined.... in the DDK via the standard bugcheck code macros. So we introduce two hacks: the firs one right after the inclusion of ntddk.h *in* acpi.h to first undefine the macro (coming from bugcheck.h), *then*, we re-undefine it *after* the inclusion of acpi.h (in the precompiled header) so that drivers that need to use acpi (via the header) can after, include the ntddk.h ... What a hack :DD Part 2bis of our modifications to ACPICA code. CORE-8044 svn path=/trunk/; revision=62607 --- reactos/drivers/bus/acpi/acpica/include/acpi.h | 6 ++++++ reactos/drivers/bus/acpi/precomp.h | 7 +++++++ 2 files changed, 13 insertions(+) diff --git a/reactos/drivers/bus/acpi/acpica/include/acpi.h b/reactos/drivers/bus/acpi/acpica/include/acpi.h index 9c8bc8d61a6..e39627b8de2 100644 --- a/reactos/drivers/bus/acpi/acpica/include/acpi.h +++ b/reactos/drivers/bus/acpi/acpica/include/acpi.h @@ -116,6 +116,12 @@ #ifndef __ACPI_H__ #define __ACPI_H__ +/* + * Header inclusion HACK (see modifications to actypes.h too). + */ +#include +#undef ACPI_BIOS_ERROR // ACPI_BIOS_ERROR is redefined in acoutput.h + /* * Public include files for use by code that will interface to ACPICA. * diff --git a/reactos/drivers/bus/acpi/precomp.h b/reactos/drivers/bus/acpi/precomp.h index fcb766d3eeb..43c15b6a49f 100644 --- a/reactos/drivers/bus/acpi/precomp.h +++ b/reactos/drivers/bus/acpi/precomp.h @@ -1,7 +1,14 @@ #ifndef _ACPI_PCH_ #define _ACPI_PCH_ +#include + #include + +// ACPI_BIOS_ERROR was defined in acoutput.h, but is +// redefined in bugcodes.h included from the DDK. +#undef ACPI_BIOS_ERROR + #include #include #include