Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933712AbbFXDEZ (ORCPT ); Tue, 23 Jun 2015 23:04:25 -0400 Received: from mga03.intel.com ([134.134.136.65]:8716 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755001AbbFXDD5 (ORCPT ); Tue, 23 Jun 2015 23:03:57 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,669,1427785200"; d="scan'208";a="513300197" From: Lv Zheng To: "Rafael J. Wysocki" , Len Brown Cc: Lv Zheng , Lv Zheng , , linux-acpi@vger.kernel.org, Bob Moore Subject: [PATCH v2 10/28] ACPICA: MSVC6: Fix build issue for variable argument macros. Date: Wed, 24 Jun 2015 11:03:48 +0800 Message-Id: <267697937de003306c72e1a3b55f962ff855e6f3.1435114811.git.lv.zheng@intel.com> X-Mailer: git-send-email 1.7.10 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2052 Lines: 70 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 Signed-off-by: Bob Moore --- include/acpi/acoutput.h | 13 +++++++++++-- include/acpi/platform/acgcc.h | 4 ++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/include/acpi/acoutput.h b/include/acpi/acoutput.h index a8f3443..f56de8c 100644 --- a/include/acpi/acoutput.h +++ b/include/acpi/acoutput.h @@ -294,8 +294,12 @@ /* 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 */ @@ -315,6 +319,11 @@ 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 * diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h index f54de0a..5457a06 100644 --- a/include/acpi/platform/acgcc.h +++ b/include/acpi/platform/acgcc.h @@ -75,4 +75,8 @@ #undef strchr #endif +/* GCC supports __VA_ARGS__ in macros */ + +#define COMPILER_VA_MACRO 1 + #endif /* __ACGCC_H__ */ -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/