ACPICA: MSVC6: Fix build issue for variable argument macros
authorLv Zheng <lv.zheng@intel.com>
Wed, 1 Jul 2015 06:43:43 +0000 (14:43 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 1 Jul 2015 21:17:53 +0000 (23:17 +0200)
ACPICA commit 72f5a358f28c5d154ed613c142c7dca03192c5ee

This patch intoduces generic variable macro detection support and fixes
build breakage issue with macros using __VA_ARGS__ feature defined in
C99.

This patch fixes this build issue. Lv Zheng.

This patch doesn't affect Linux kernel.

Link: https://github.com/acpica/acpica/commit/72f5a358
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/acoutput.h
include/acpi/platform/acgcc.h

index a8f344363e7737d056bebc7ec7f4d45fa2e170f0..f56de8c5d844de3019d2e8fb8b04f5fedab2d58f 100644 (file)
 
 /* DEBUG_PRINT functions */
 
-#define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
-#define ACPI_DEBUG_PRINT_RAW(plist)     ACPI_ACTUAL_DEBUG_RAW plist
+#ifndef COMPILER_VA_MACRO
+
+#define ACPI_DEBUG_PRINT(plist)         acpi_debug_print plist
+#define ACPI_DEBUG_PRINT_RAW(plist)     acpi_debug_print_raw plist
+
+#else
 
 /* Helper macros for DEBUG_PRINT */
 
        ACPI_DO_DEBUG_PRINT (acpi_debug_print_raw, level, line, \
                filename, modulename, component, __VA_ARGS__)
 
+#define ACPI_DEBUG_PRINT(plist)         ACPI_ACTUAL_DEBUG plist
+#define ACPI_DEBUG_PRINT_RAW(plist)     ACPI_ACTUAL_DEBUG_RAW plist
+
+#endif
+
 /*
  * Function entry tracing
  *
index f54de0a635582d45b3aca6bb1977313d431e0549..5457a06cb52879f2775ed64630f63025ca3fbb9c 100644 (file)
@@ -75,4 +75,8 @@
 #undef strchr
 #endif
 
+/* GCC supports __VA_ARGS__ in macros */
+
+#define COMPILER_VA_MACRO               1
+
 #endif                         /* __ACGCC_H__ */