]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
ACPICA: MSVC9: Fix <sys/stat.h> inclusion order issue
authorLv Zheng <lv.zheng@intel.com>
Thu, 4 Aug 2016 08:44:59 +0000 (16:44 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 13 Aug 2016 01:09:35 +0000 (03:09 +0200)
ACPICA commit 9bb265c2afb9910e46f820d6759648580edabd09

When /Za is specified, headers of some Windows SDKs contain bugs breaking
VC builds, and MSVC9's default SDK is one of such header-buggy library.

In order to solve this issue, many VC developers stop using /Za. However
we've been asked to have this fixed without removing /Za.

In MSVC9 default SDK, this issue can be fixed by restricting <sys/stat.h>
to be the last standard file included by every source file in the projects.
This patch thus moves <sys/stat.h> inclusion to "acapps.h", so that this
issue can be fixed by ensuring that "acapps.h" is always the last standard
file included by all of the ACPICA source files. This is in fact also a
useful cleanup because applications can only include one header (e.x.,
acpidump.h) instead of including acapps.h separately. Lv Zheng.

Except some harmless header inclusion re-ordering, Linux kernel is not
affected by this change.

Link: https://github.com/acpica/acpica/commit/9bb265c2
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>
drivers/acpi/acpica/acapps.h
include/acpi/platform/acenv.h
tools/power/acpi/tools/acpidump/acpidump.h
tools/power/acpi/tools/acpidump/apfiles.c
tools/power/acpi/tools/acpidump/apmain.c

index 247f30c33e21c4f46c77690db9841d617feebc94..bc385347932e3ce46ce9d4c21424211c184fd00f 100644 (file)
 #ifndef _ACAPPS
 #define _ACAPPS
 
+#ifdef ACPI_USE_STANDARD_HEADERS
+#include <sys/stat.h>
+#endif                         /* ACPI_USE_STANDARD_HEADERS */
+
 /* Common info for tool signons */
 
 #define ACPICA_NAME                 "Intel ACPI Component Architecture"
index 1e2fe9501c1619999da5030734624a3c63d58e56..3dbfa27424ea98c460b524c5734476e102ffa800 100644 (file)
 #include <stdio.h>
 #include <fcntl.h>
 #include <errno.h>
-#include <sys/stat.h>
+#include <time.h>
+#include <signal.h>
 #endif
 
 #endif                         /* ACPI_USE_STANDARD_HEADERS */
index 9f7db006f326546a5a9f2eaef72d4199f43cd1a8..00423fc45e7cfbd3e3819c8333d7c61e2d79a479 100644 (file)
@@ -55,6 +55,7 @@
 #include <acpi/acpi.h>
 #include "accommon.h"
 #include "actables.h"
+#include "acapps.h"
 
 /* Globals */
 
index c52752126462439ccc89a995238a7167551a8c1e..44a0010d16c9c932d9a57dbe4faf3fba1f038ee4 100644 (file)
@@ -42,7 +42,6 @@
  */
 
 #include "acpidump.h"
-#include "acapps.h"
 
 /* Local prototypes */
 
index cd6c097b6a891385f663d9c5f857a74ad8a7912d..17ce0d7ef29d30a5a4d45a062d9477a8e93bceb7 100644 (file)
@@ -43,7 +43,6 @@
 
 #define _DECLARE_GLOBALS
 #include "acpidump.h"
-#include "acapps.h"
 
 /*
  * acpidump - A portable utility for obtaining system ACPI tables and dumping