From: Lv Zheng <lv.zheng@intel.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Len Brown <len.brown@intel.com>
Cc: Lv Zheng <lv.zheng@intel.com>, Lv Zheng <zetalog@gmail.com>,
<linux-kernel@vger.kernel.org>,
linux-acpi@vger.kernel.org, Bob Moore <robert.moore@intel.com>
Subject: [PATCH 15/22] ACPICA: MSVC: Fix inclusion order issue of <crtdbg.h>.
Date: Thu, 23 Jul 2015 12:53:42 +0800 [thread overview]
Message-ID: <cc124d2fef29ea8eec3dfaa858736ba8adc34d42.1437627016.git.lv.zheng@intel.com> (raw)
In-Reply-To: <cover.1437627016.git.lv.zheng@intel.com>
ACPICA commit 49c6a6517a906900e9baa51ad5859beeb8a3089f
The following error logs can be seen for calloc/free/malloc/realloc that
defined in the stdlib.h:
...\stdlib.h(281) : error C2059: syntax error : ','
...\stdlib.h(281) : error C2143: syntax error : missing ')' before 'constant'
...\stdlib.h(281) : error C2143: syntax error : missing '{' before 'constant'
...\stdlib.h(281) : error C2059: syntax error : '<Unknown>'
...\stdlib.h(281) : error C2059: syntax error : ')'
This is caused by the wrong inclusion order of stdlib.h/crtdbg.h introduced
in acenv.h. This patch fixes this breakage. Lv Zheng.
This patch doesn't affect Linux kernel.
Link: https://github.com/acpica/acpica/commit/49c6a651
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Bob Moore <robert.moore@intel.com>
---
include/acpi/platform/acenvex.h | 3 +++
include/acpi/platform/acmsvcex.h | 54 ++++++++++++++++++++++++++++++++++++++
include/acpi/platform/acwinex.h | 49 ++++++++++++++++++++++++++++++++++
3 files changed, 106 insertions(+)
create mode 100644 include/acpi/platform/acmsvcex.h
create mode 100644 include/acpi/platform/acwinex.h
diff --git a/include/acpi/platform/acenvex.h b/include/acpi/platform/acenvex.h
index 0a7dc8e..2f296cb 100644
--- a/include/acpi/platform/acenvex.h
+++ b/include/acpi/platform/acenvex.h
@@ -56,6 +56,9 @@
#if defined(_LINUX) || defined(__linux__)
#include <acpi/platform/aclinuxex.h>
+#elif defined(WIN32)
+#include "acwinex.h"
+
#elif defined(_AED_EFI)
#include "acefiex.h"
diff --git a/include/acpi/platform/acmsvcex.h b/include/acpi/platform/acmsvcex.h
new file mode 100644
index 0000000..b647974
--- /dev/null
+++ b/include/acpi/platform/acmsvcex.h
@@ -0,0 +1,54 @@
+/******************************************************************************
+ *
+ * Name: acmsvcex.h - Extra VC specific defines, etc.
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2015, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#ifndef __ACMSVCEX_H__
+#define __ACMSVCEX_H__
+
+/* Debug support. */
+
+#ifdef _DEBUG
+#define _CRTDBG_MAP_ALLOC /* Enables specific file/lineno for leaks */
+#include <crtdbg.h>
+#endif
+
+#endif /* __ACMSVCEX_H__ */
diff --git a/include/acpi/platform/acwinex.h b/include/acpi/platform/acwinex.h
new file mode 100644
index 0000000..6ed1d71
--- /dev/null
+++ b/include/acpi/platform/acwinex.h
@@ -0,0 +1,49 @@
+/******************************************************************************
+ *
+ * Name: acwinex.h - Extra OS specific defines, etc.
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2015, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#ifndef __ACWINEX_H__
+#define __ACWINEX_H__
+
+/* Windows uses VC */
+
+#endif /* __ACWINEX_H__ */
--
1.7.10
next prev parent reply other threads:[~2015-07-23 4:53 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 4:51 [PATCH 00/22] ACPICA: 20150717 Release Lv Zheng
2015-07-23 4:52 ` [PATCH 01/22] ACPICA: Parser: Reduce parser/namespace divergences for tracer support Lv Zheng
2015-07-23 4:52 ` [PATCH 02/22] ACPICA: Parser: Cleanup aml_offset in struct acpi_walk_state Lv Zheng
2015-07-23 4:52 ` [PATCH 03/22] ACPICA: Parser: Cleanup aml_offset in union acpi_operand_object Lv Zheng
2015-07-23 4:52 ` [PATCH 04/22] ACPICA: Dispatcher: Cleanup union acpi_operand_object's AML address assignments Lv Zheng
2015-07-23 4:52 ` [PATCH 05/22] ACPICA: Executer: Add back pointing reference of method operand Lv Zheng
2015-07-23 4:52 ` [PATCH 06/22] ACPICA: Namespace: Add function to directly return normalized full path Lv Zheng
2015-07-23 4:52 ` [PATCH 07/22] ACPICA: Dispatcher: Move stack traversal code to dispatcher Lv Zheng
2015-07-23 4:52 ` [PATCH 08/22] ACPICA: Dispatcher: Add trace support for interpreter Lv Zheng
2015-07-23 4:52 ` [PATCH 09/22] ACPICA: Executer: Add interpreter tracing mode for method tracing facility Lv Zheng
2015-07-23 4:53 ` [PATCH 10/22] ACPICA: Executer: Add OSL trace hook support Lv Zheng
2015-07-23 4:53 ` [PATCH 11/22] ACPICA: Executer: Add option to bypass opcode tracing Lv Zheng
2015-07-23 4:53 ` [PATCH 12/22] ACPICA: Parser: Remove redundant opcode execution debugging output Lv Zheng
2015-07-23 4:53 ` [PATCH 13/22] ACPICA: Remove extraneous check for null walk_state Lv Zheng
2015-07-23 4:53 ` [PATCH 14/22] ACPICA: iASL: Add new warnings for method local_x and arg_x variables Lv Zheng
2015-07-23 4:53 ` Lv Zheng [this message]
2015-07-23 4:53 ` [PATCH 16/22] ACPICA: Cleanup use of all non-ANSI local C library functions Lv Zheng
2015-07-23 4:53 ` [PATCH 17/22] ACPICA: Cleanup use of NEGATIVE and POSITIVE defines Lv Zheng
2015-07-23 4:54 ` [PATCH 18/22] ACPICA: iASL: Add support for TCPA Server Table Lv Zheng
2015-07-23 4:54 ` [PATCH 19/22] ACPICA: Debugger: Reduce structure size for debugger Lv Zheng
2015-07-23 4:54 ` [PATCH 20/22] ACPICA: Debugger: Move debugger specific APIs to debugger component Lv Zheng
2015-07-23 4:54 ` [PATCH 21/22] ACPICA: iASL/Disassembler: Add prototype verbose mode Lv Zheng
2015-07-23 4:54 ` [PATCH 22/22] ACPICA: Update version to 20150717 Lv Zheng
2015-07-23 5:06 ` [PATCH 0/4] ACPI: Update method tracing facility Lv Zheng
2015-07-23 5:06 ` [PATCH 1/4] ACPI / sysfs: Add ACPI_LV_REPAIR debug level Lv Zheng
2015-07-23 5:06 ` [PATCH 2/4] ACPI / sysfs: Update method tracing facility Lv Zheng
2015-07-23 5:06 ` [PATCH 3/4] ACPI / Documentation: Update method tracing documentation Lv Zheng
2015-07-23 5:07 ` [PATCH 4/4] ACPI / sysfs: Add support to allow leading "\" missing in trace_method_name Lv Zheng
2015-07-23 20:51 ` [PATCH 0/4] ACPI: Update method tracing facility Rafael J. Wysocki
2015-07-24 2:02 ` Zheng, Lv
2015-07-24 19:55 ` Rafael J. Wysocki
2015-07-27 0:42 ` Zheng, Lv
2015-07-29 0:58 ` [PATCH 00/22] ACPICA: 20150717 Release Rafael J. Wysocki
2015-07-29 1:41 ` Zheng, Lv
2015-08-05 8:23 ` [PATCH v2 0/4] ACPI: Update method tracing facility Lv Zheng
2015-08-05 8:23 ` [PATCH v2 1/4] ACPI / sysfs: Add ACPI_LV_REPAIR debug level Lv Zheng
2015-08-05 8:23 ` [PATCH v2 2/4] ACPI / sysfs: Update method tracing facility Lv Zheng
2015-08-05 8:23 ` [PATCH v2 3/4] ACPI / sysfs: Add support to allow leading "\" missing in trace_method_name Lv Zheng
2015-08-05 8:24 ` [PATCH v2 4/4] ACPI / Documentation: Update method tracing documentation 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=cc124d2fef29ea8eec3dfaa858736ba8adc34d42.1437627016.git.lv.zheng@intel.com \
--to=lv.zheng@intel.com \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®