ACPICA: OSL: Cleanup the inclusion order of the compiler-specific headers
authorLv Zheng <lv.zheng@intel.com>
Thu, 4 Aug 2016 08:45:40 +0000 (16:45 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 13 Aug 2016 01:16:39 +0000 (03:16 +0200)
ACPICA commit a760a98ec84b1ec782e0bff5f6612af6fb89c10c

Originally compiler specific headers are included by the host-specific
headers. This makes build configuration management very inconvenient. And
many inclusion order issues can be hidden accross different host OSes. It
will then likely that some host builds will be broken just because of
fixing some inclusion order issues for other host builds.

This patch splits the compiler-specific header inclusions out of the
host-specific headers so that compiler-specific inclusion order issues will
not get entangled in the host-specific inclusion orders.

Note that intel compiler defines __GNUC__, so this patch contains special
handling because acintel.h and acgcc.h should be mutual exclusive.

Link: https://github.com/acpica/acpica/commit/a760a98e
Link: https://bugs.acpica.org/show_bug.cgi?id=1303
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
include/acpi/platform/acenv.h
include/acpi/platform/acenvex.h
include/acpi/platform/aclinux.h

index f9af0e03e5921a95207b083b7ebbbce8ccc25536..34cce729109cc9d5ad7ac5346627af7da3358cf1 100644 (file)
 /******************************************************************************
  *
  * Host configuration files. The compiler configuration files are included
- * by the host files.
+ * first.
  *
  *****************************************************************************/
 
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+#include <acpi/platform/acgcc.h>
+
+#elif defined(_MSC_VER)
+#include "acmsvc.h"
+
+#elif defined(__INTEL_COMPILER)
+#include "acintel.h"
+
+#endif
+
 #if defined(_LINUX) || defined(__linux__)
 #include <acpi/platform/aclinux.h>
 
index 58ca39ce16d49dc9355a4a819c9f305b3a5bf330..060fb08e643b09739345c170d15c079adf5793ad 100644 (file)
@@ -56,9 +56,6 @@
 #if defined(_LINUX) || defined(__linux__)
 #include <acpi/platform/aclinuxex.h>
 
-#elif defined(WIN32)
-#include "acwinex.h"
-
 #elif defined(__DragonFly__)
 #include "acdragonflyex.h"
 
 
 #endif
 
+#if defined(_MSC_VER)
+#include "acmsvcex.h"
+
+#endif
+
 /*! [End] no source code translation !*/
 
 #endif                         /* __ACENVEX_H__ */
index 1380ec7035f8d75a37d0546d0b3155040a87de12..a5d98d171866fe758462b15898f5e04019fe57cb 100644 (file)
 
 #endif                         /* __KERNEL__ */
 
-/* Linux uses GCC */
-
-#include <acpi/platform/acgcc.h>
-
 #endif                         /* __ACLINUX_H__ */