1130389Sle/******************************************************************************
2190507Slulf *
3130389Sle * Name: acgcc.h - GCC specific defines, etc.
4130389Sle *
5130389Sle *****************************************************************************/
6130389Sle
7130389Sle/******************************************************************************
8130389Sle *
9130389Sle * 1. Copyright Notice
10130389Sle *
11130389Sle * Some or all of this work - Copyright (c) 1999 - 2012, Intel Corp.
12130389Sle * All rights reserved.
13130389Sle *
14130389Sle * 2. License
15130389Sle *
16130389Sle * 2.1. This is your license from Intel Corp. under its intellectual property
17130389Sle * rights. You may have additional license terms from the party that provided
18130389Sle * you this software, covering your right to use that party's intellectual
19130389Sle * property rights.
20130389Sle *
21130389Sle * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22130389Sle * copy of the source code appearing in this file ("Covered Code") an
23130389Sle * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24130389Sle * base code distributed originally by Intel ("Original Intel Code") to copy,
25130389Sle * make derivatives, distribute, use and display any portion of the Covered
26130389Sle * Code in any form, with the right to sublicense such rights; and
27130389Sle *
28130389Sle * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29130389Sle * license (with the right to sublicense), under only those claims of Intel
30130389Sle * patents that are infringed by the Original Intel Code, to make, use, sell,
31130389Sle * offer to sell, and import the Covered Code and derivative works thereof
32130389Sle * solely to the minimum extent necessary to exercise the above copyright
33130389Sle * license, and in no event shall the patent license extend to any additions
34130389Sle * to or modifications of the Original Intel Code. No other license or right
35130389Sle * is granted directly or by implication, estoppel or otherwise;
36130389Sle *
37130389Sle * The above copyright and patent license is granted only if the following
38130389Sle * conditions are met:
39130389Sle *
40130389Sle * 3. Conditions
41190507Slulf *
42190507Slulf * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43190507Slulf * Redistribution of source code of any substantial portion of the Covered
44190507Slulf * Code or modification with rights to further distribute source must include
45190507Slulf * the above Copyright Notice, the above License, this list of Conditions,
46190507Slulf * and the following Disclaimer and Export Compliance provision. In addition,
47190507Slulf * Licensee must cause all Covered Code to which Licensee contributes to
48190507Slulf * contain a file documenting the changes Licensee made to create that Covered
49190507Slulf * Code and the date of any change. Licensee must include in that file the
50190507Slulf * documentation of any changes made by any predecessor Licensee. Licensee
51137730Sle * must include a prominent statement that the modification is derived,
52190507Slulf * directly or indirectly, from Original Intel Code.
53190507Slulf *
54190507Slulf * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55190507Slulf * Redistribution of source code of any substantial portion of the Covered
56190507Slulf * Code or modification without rights to further distribute source must
57190507Slulf * include the following Disclaimer and Export Compliance provision in the
58190507Slulf * documentation and/or other materials provided with distribution. In
59190507Slulf * addition, Licensee may not authorize further sublicense of source of any
60190507Slulf * portion of the Covered Code, and must include terms to the effect that the
61190507Slulf * license from Licensee to its licensee is limited to the intellectual
62190507Slulf * property embodied in the software Licensee provides to its licensee, and
63190507Slulf * not to intellectual property embodied in modifications its licensee may
64190507Slulf * make.
65190507Slulf *
66190507Slulf * 3.3. Redistribution of Executable. Redistribution in executable form of any
67190507Slulf * substantial portion of the Covered Code or modification must reproduce the
68191856Slulf * above Copyright Notice, and the following Disclaimer and Export Compliance
69190507Slulf * provision in the documentation and/or other materials provided with the
70191856Slulf * distribution.
71190507Slulf *
72190507Slulf * 3.4. Intel retains all right, title, and interest in and to the Original
73190507Slulf * Intel Code.
74190507Slulf *
75190507Slulf * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76190507Slulf * Intel shall be used in advertising or otherwise to promote the sale, use or
77190507Slulf * other dealings in products derived from or relating to the Covered Code
78190507Slulf * without prior written authorization from Intel.
79190507Slulf *
80190507Slulf * 4. Disclaimer and Export Compliance
81190507Slulf *
82190507Slulf * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83190507Slulf * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84190507Slulf * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85190507Slulf * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86190507Slulf * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87190507Slulf * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
88190507Slulf * PARTICULAR PURPOSE.
89190507Slulf *
90190507Slulf * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91190507Slulf * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92190507Slulf * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93190507Slulf * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94190507Slulf * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95190507Slulf * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96190507Slulf * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
97190507Slulf * LIMITED REMEDY.
98190507Slulf *
99190507Slulf * 4.3. Licensee shall not export, either directly or indirectly, any of this
100190507Slulf * software or system incorporating such software without first obtaining any
101190507Slulf * required license or other approval from the U. S. Department of Commerce or
102190507Slulf * any other agency or department of the United States Government. In the
103190507Slulf * event Licensee exports any such software from the United States or
104190507Slulf * re-exports any such software from a foreign destination, Licensee shall
105190507Slulf * ensure that the distribution and export/re-export of the software is in
106190507Slulf * compliance with all laws, regulations, orders, or other restrictions of the
107190507Slulf * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108190507Slulf * any of its subsidiaries will export/re-export any technical data, process,
109190507Slulf * software, or service, directly or indirectly, to any country for which the
110190507Slulf * United States government or any agency thereof requires an export license,
111190507Slulf * other governmental approval, or letter of assurance, without first obtaining
112190507Slulf * such license, approval or letter.
113190507Slulf *
114190507Slulf *****************************************************************************/
115190507Slulf
116190507Slulf#ifndef __ACGCC_H__
117190507Slulf#define __ACGCC_H__
118190507Slulf
119190507Slulf#define ACPI_INLINE             __inline__
120190507Slulf
121190507Slulf/* Function name is used for debug output. Non-ANSI, compiler-dependent */
122190507Slulf
123191856Slulf#define ACPI_GET_FUNCTION_NAME          __FUNCTION__
124191856Slulf
125191852Slulf/*
126190507Slulf * This macro is used to tag functions as "printf-like" because
127190507Slulf * some compilers (like GCC) can catch printf format string problems.
128190507Slulf */
129190507Slulf#define ACPI_PRINTF_LIKE(c) __attribute__ ((__format__ (__printf__, c, c+1)))
130190507Slulf
131190507Slulf/*
132190507Slulf * Some compilers complain about unused variables. Sometimes we don't want to
133190507Slulf * use all the variables (for example, _AcpiModuleName). This allows us
134190507Slulf * to to tell the compiler warning in a per-variable manner that a variable
135190507Slulf * is unused.
136190507Slulf */
137190507Slulf#define ACPI_UNUSED_VAR __attribute__ ((unused))
138190507Slulf
139130389Sle#endif /* __ACGCC_H__ */
140130389Sle