Author: hbelusca
Date: Thu Apr 3 23:32:58 2014
New Revision: 62607
URL:
http://svn.reactos.org/svn/reactos?rev=62607&view=rev
Log:
[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
Modified:
trunk/reactos/drivers/bus/acpi/acpica/include/acpi.h
trunk/reactos/drivers/bus/acpi/precomp.h
Modified: trunk/reactos/drivers/bus/acpi/acpica/include/acpi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/acpica/in…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/acpica/include/acpi.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/acpica/include/acpi.h [iso-8859-1] Thu Apr 3 23:32:58
2014
@@ -117,6 +117,12 @@
#define __ACPI_H__
/*
+ * Header inclusion HACK (see modifications to actypes.h too).
+ */
+#include <ntddk.h>
+#undef ACPI_BIOS_ERROR // ACPI_BIOS_ERROR is redefined in acoutput.h
+
+/*
* Public include files for use by code that will interface to ACPICA.
*
* Information includes the ACPICA data types, names, exceptions, and
Modified: trunk/reactos/drivers/bus/acpi/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/precomp.h…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/precomp.h [iso-8859-1] Thu Apr 3 23:32:58 2014
@@ -1,7 +1,14 @@
#ifndef _ACPI_PCH_
#define _ACPI_PCH_
+#include <stdio.h>
+
#include <acpi.h>
+
+// ACPI_BIOS_ERROR was defined in acoutput.h, but is
+// redefined in bugcodes.h included from the DDK.
+#undef ACPI_BIOS_ERROR
+
#include <acpisys.h>
#include <acpi_bus.h>
#include <acpi_drivers.h>