Skip to content

Commit 9fa1ceb

Browse files
Lv Zhengrafaeljw
authored andcommitted
ACPICA: OSL: Cleanup the inclusion order of the compiler-specific headers
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: open-acpica/acpica@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>
1 parent d2d48ea commit 9fa1ceb

3 files changed

Lines changed: 17 additions & 8 deletions

File tree

‎include/acpi/platform/acenv.h‎

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,21 @@
166166
/******************************************************************************
167167
*
168168
* Host configuration files. The compiler configuration files are included
169-
* by the host files.
169+
* first.
170170
*
171171
*****************************************************************************/
172172

173+
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
174+
#include <acpi/platform/acgcc.h>
175+
176+
#elif defined(_MSC_VER)
177+
#include "acmsvc.h"
178+
179+
#elif defined(__INTEL_COMPILER)
180+
#include "acintel.h"
181+
182+
#endif
183+
173184
#if defined(_LINUX) || defined(__linux__)
174185
#include <acpi/platform/aclinux.h>
175186

‎include/acpi/platform/acenvex.h‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@
5656
#if defined(_LINUX) || defined(__linux__)
5757
#include <acpi/platform/aclinuxex.h>
5858

59-
#elif defined(WIN32)
60-
#include "acwinex.h"
61-
6259
#elif defined(__DragonFly__)
6360
#include "acdragonflyex.h"
6461

@@ -72,6 +69,11 @@
7269

7370
#endif
7471

72+
#if defined(_MSC_VER)
73+
#include "acmsvcex.h"
74+
75+
#endif
76+
7577
/*! [End] no source code translation !*/
7678

7779
#endif /* __ACENVEX_H__ */

‎include/acpi/platform/aclinux.h‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,4 @@
215215

216216
#endif /* __KERNEL__ */
217217

218-
/* Linux uses GCC */
219-
220-
#include <acpi/platform/acgcc.h>
221-
222218
#endif /* __ACLINUX_H__ */

0 commit comments

Comments
 (0)