All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
	linux-acpi@vger.kernel.org, Bob Moore <robert.moore@intel.com>
Subject: [PATCH 28/53] ACPICA: OSL: Add support to exclude stdarg.h
Date: Mon,  5 Jun 2017 16:39:56 +0800	[thread overview]
Message-ID: <7c3d9f72e9d7a86ea04d2d0d3209f413d12bc0d5.1496650343.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1496650343.git.lv.zheng@intel.com>

ACPICA commit e2df7455a9a4301b03668e4c9c02c7a564cc841c

Some hosts may choose not to include stdarg.h, implementing a
configurability in acgcc.h, allowing OSen like Solaris to exclude stdarg.h.
This patch also fixes acintel.h accordingly without providing builtin
support as Intel compiler is similar as GCC. Reported by Dana Myers, fixed
by Lv Zheng.

Link: https://github.com/acpica/acpica/commit/e2df7455
Reported-by: Dana Myers <dana.myers@oracle.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
 include/acpi/platform/acgcc.h   | 10 ++++++++++
 include/acpi/platform/acintel.h |  2 ++
 2 files changed, 12 insertions(+)

diff --git a/include/acpi/platform/acgcc.h b/include/acpi/platform/acgcc.h
index e877a35..97a7e21 100644
--- a/include/acpi/platform/acgcc.h
+++ b/include/acpi/platform/acgcc.h
@@ -48,7 +48,17 @@
  * Use compiler specific <stdarg.h> is a good practice for even when
  * -nostdinc is specified (i.e., ACPI_USE_STANDARD_HEADERS undefined.
  */
+#ifndef va_arg
+#ifdef ACPI_USE_BUILTIN_STDARG
+typedef __builtin_va_list va_list;
+#define va_start(v, l)          __builtin_va_start(v, l)
+#define va_end(v)               __builtin_va_end(v)
+#define va_arg(v, l)            __builtin_va_arg(v, l)
+#define va_copy(d, s)           __builtin_va_copy(d, s)
+#else
 #include <stdarg.h>
+#endif
+#endif
 
 #define ACPI_INLINE             __inline__
 
diff --git a/include/acpi/platform/acintel.h b/include/acpi/platform/acintel.h
index 17bd3b7..bdb6858 100644
--- a/include/acpi/platform/acintel.h
+++ b/include/acpi/platform/acintel.h
@@ -48,7 +48,9 @@
  * Use compiler specific <stdarg.h> is a good practice for even when
  * -nostdinc is specified (i.e., ACPI_USE_STANDARD_HEADERS undefined.
  */
+#ifndef va_arg
 #include <stdarg.h>
+#endif
 
 /* Configuration specific to Intel 64-bit C compiler */
 
-- 
2.7.4


  parent reply	other threads:[~2017-06-05  8:39 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-05  8:15 [PATCH 00/54] ACPICA 20170531 Release Lv Zheng
2017-06-05  8:15 ` [PATCH 01/53] ACPICA: Change path's type from u8* to char* Lv Zheng
2017-06-05  8:15 ` [PATCH 02/53] ACPICA: Tables: Add WSMT support Lv Zheng
2017-06-05  8:37 ` [PATCH 03/53] ACPICA: Tables: Add HMAT table definitions Lv Zheng
2017-06-05  8:37 ` [PATCH 04/53] ACPICA: Add new notify value for memory attributes update Lv Zheng
2017-06-05  8:37 ` [PATCH 05/53] ACPICA: Added two new UUID values Lv Zheng
2017-06-05  8:37 ` [PATCH 07/53] ACPICA: Update Status field for BGRT table Lv Zheng
2017-06-05  8:37 ` [PATCH 08/53] ACPICA: Tables: Fix defined values for MADT PCAT_COMPAT flag Lv Zheng
2017-06-05  8:37 ` [PATCH 09/53] ACPICA: Add support for _LSI as a predefined method Lv Zheng
2017-06-05  8:38 ` [PATCH 10/53] ACPICA: Add support for _LSR " Lv Zheng
2017-06-05  8:38 ` [PATCH 11/53] ACPICA: Add support for _LSW " Lv Zheng
2017-06-05  8:38 ` [PATCH 12/53] ACPICA: Add support for _HMA " Lv Zheng
2017-06-05  8:38 ` [PATCH 13/53] ACPICA: Add new notify value for HEST table Lv Zheng
2017-06-05  8:38 ` [PATCH 14/53] ACPICA: Tables: Add PPTT table definitions Lv Zheng
2017-06-05  8:38 ` [PATCH 15/53] ACPICA: Add new flags to HEST subtables Lv Zheng
2017-06-05  8:38 ` [PATCH 16/53] ACPICA: Add support for new HEST subtable Lv Zheng
2017-06-05  8:38 ` [PATCH 17/53] ACPICA: Add support for new SRAT subtable Lv Zheng
2017-06-05  8:38 ` [PATCH 18/53] ACPICA: disassembler: improve Switch support Lv Zheng
2017-06-05  8:39 ` [PATCH 19/53] ACPICA: Add header support for TPM2 table changes Lv Zheng
2017-06-05  8:39 ` [PATCH 20/53] ACPICA: Add support for new PCCT subtables Lv Zheng
2017-06-05  8:39 ` [PATCH 21/53] ACPICA: ACPI 6.2: Add support for PinFunction() resource Lv Zheng
2017-06-05  8:39 ` [PATCH 22/53] ACPICA: ACPI 6.2: Add support for PinConfig() resource Lv Zheng
2017-06-05  8:39 ` [PATCH 23/53] ACPICA: ACPI 6.2: Add support for PinGroup() resource Lv Zheng
2017-06-05  8:39 ` [PATCH 24/53] ACPICA: ACPI 6.2: Add support for PinGroupFunction() resource Lv Zheng
2017-06-05  8:39 ` [PATCH 25/53] ACPICA: ACPI 6.2: Add support for PinGroupConfig() resource Lv Zheng
2017-06-05  8:39 ` [PATCH 26/53] ACPICA: Fix a type value overlap in the AML support file Lv Zheng
2017-06-05  8:39 ` [PATCH 27/53] ACPICA: Core: Always set GPIO VendorOffset Lv Zheng
2017-06-05  8:39 ` Lv Zheng [this message]
2017-06-05  8:40 ` [PATCH 29/53] ACPICA: Events: Add runtime stub support for event APIs Lv Zheng
2017-06-05  8:40 ` [PATCH 30/53] ACPICA: Update error message for field beyond buffer case Lv Zheng
2017-06-05  8:40 ` [PATCH 31/53] ACPICA: Explicitly cast 1 to u32 Lv Zheng
2017-06-05  8:40 ` [PATCH 32/53] ACPICA: Debugger/acpiexec: Cleanup error messages Lv Zheng
2017-06-05  8:40 ` [PATCH 33/53] ACPICA: Dispatcher: Remove unnecessary call to debugger Lv Zheng
2017-06-05  8:40 ` [PATCH 34/53] ACPICA: Disassembler: Abort on an invalid/unknown AML opcode Lv Zheng
2017-06-05  8:40 ` [PATCH 35/53] ACPICA: Export the public mutex interfaces Lv Zheng
2017-06-05  8:40 ` [PATCH 36/53] ACPICA: Remove extraneous status check Lv Zheng
2017-06-05  8:40 ` [PATCH 37/53] ACPICA: Update resource descriptor handling Lv Zheng
2017-06-05  8:40 ` [PATCH 38/53] ACPICA: Split resource descriptor decode strings to a new file Lv Zheng
2017-06-05  8:41 ` [PATCH 39/53] ACPICA: Update comments, no functional change Lv Zheng
2017-06-05  8:41 ` [PATCH 40/53] ACPICA: Comment update: spelling/format. No " Lv Zheng
2017-06-05  8:41 ` [PATCH 41/53] ACPICA: Fix for Device/Thermal objects with ObjectType and DerefOf Lv Zheng
2017-06-05  8:41 ` [PATCH 42/53] ACPICA: Update two error messages to emit control method name Lv Zheng
2017-06-05  8:41 ` [PATCH 43/53] ACPICA: Changing External to a named object Lv Zheng
2017-06-05  8:41 ` [PATCH 44/53] ACPICA: Changed Gbl_disasm_flag to acpi_gbl_disasm_flag Lv Zheng
2017-06-05  8:41 ` [PATCH 45/53] ACPICA: Disassembler: prevent external op's from opening a new scope Lv Zheng
2017-06-05  8:41 ` [PATCH 46/53] ACPICA: Disassembler: add external op to namespace on first pass Lv Zheng
2017-06-05  8:41 ` [PATCH 47/53] ACPICA: Disassembler: allow conflicting external declarations to be emitted Lv Zheng
2017-06-05  8:42 ` [PATCH 48/53] ACPICA: Improvements for debug output only Lv Zheng
2017-06-05  8:42 ` [PATCH 49/53] ACPICA: Unix application OSL: Correctly handle control-c (EINTR) Lv Zheng
2017-06-05  8:42 ` [PATCH 50/53] ACPICA: Simplify output for the ACPI Debug Object Lv Zheng
2017-06-05  8:42 ` [PATCH 51/53] ACPICA: acpiexec: enhance local signal handler Lv Zheng
2017-06-05  8:42 ` [PATCH 52/53] ACPICA: Update a couple of debug output messages Lv Zheng
2017-06-05  8:42 ` [PATCH 53/53] ACPICA: Update version to 20170531 Lv Zheng
2017-06-05  8:45 ` [PATCH 06/53] ACPICA: Utilities: Make a notify value reserved Lv Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7c3d9f72e9d7a86ea04d2d0d3209f413d12bc0d5.1496650343.git.lv.zheng@intel.com \
    --to=lv.zheng@intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rafael.j.wysocki@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=robert.moore@intel.com \
    --cc=zetalog@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.