acgcc.h revision 26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0
17c478bdstevel@tonic-gate/******************************************************************************
27c478bdstevel@tonic-gate *
37c478bdstevel@tonic-gate * Name: acgcc.h - GCC specific defines, etc.
47c478bdstevel@tonic-gate *
57c478bdstevel@tonic-gate *****************************************************************************/
67c478bdstevel@tonic-gate
726f3cdfGordon Ross/*
826f3cdfGordon Ross * Copyright (C) 2000 - 2011, Intel Corp.
97c478bdstevel@tonic-gate * All rights reserved.
107c478bdstevel@tonic-gate *
1126f3cdfGordon Ross * Redistribution and use in source and binary forms, with or without
1226f3cdfGordon Ross * modification, are permitted provided that the following conditions
1326f3cdfGordon Ross * are met:
1426f3cdfGordon Ross * 1. Redistributions of source code must retain the above copyright
1526f3cdfGordon Ross *    notice, this list of conditions, and the following disclaimer,
1626f3cdfGordon Ross *    without modification.
1726f3cdfGordon Ross * 2. Redistributions in binary form must reproduce at minimum a disclaimer
1826f3cdfGordon Ross *    substantially similar to the "NO WARRANTY" disclaimer below
1926f3cdfGordon Ross *    ("Disclaimer") and any redistribution must be conditioned upon
2026f3cdfGordon Ross *    including a substantially similar Disclaimer requirement for further
2126f3cdfGordon Ross *    binary redistribution.
2226f3cdfGordon Ross * 3. Neither the names of the above-listed copyright holders nor the names
2326f3cdfGordon Ross *    of any contributors may be used to endorse or promote products derived
2426f3cdfGordon Ross *    from this software without specific prior written permission.
2526f3cdfGordon Ross *
2626f3cdfGordon Ross * Alternatively, this software may be distributed under the terms of the
2726f3cdfGordon Ross * GNU General Public License ("GPL") version 2 as published by the Free
2826f3cdfGordon Ross * Software Foundation.
2926f3cdfGordon Ross *
3026f3cdfGordon Ross * NO WARRANTY
3126f3cdfGordon Ross * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3226f3cdfGordon Ross * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3326f3cdfGordon Ross * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
3426f3cdfGordon Ross * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3526f3cdfGordon Ross * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
3626f3cdfGordon Ross * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
3726f3cdfGordon Ross * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
3826f3cdfGordon Ross * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
3926f3cdfGordon Ross * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
4026f3cdfGordon Ross * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4126f3cdfGordon Ross * POSSIBILITY OF SUCH DAMAGES.
4226f3cdfGordon Ross */
437c478bdstevel@tonic-gate
447c478bdstevel@tonic-gate#ifndef __ACGCC_H__
457c478bdstevel@tonic-gate#define __ACGCC_H__
467c478bdstevel@tonic-gate
4726f3cdfGordon Ross#define ACPI_INLINE             __inline__
4826f3cdfGordon Ross
49450d696myers/* Function name is used for debug output. Non-ANSI, compiler-dependent */
50450d696myers
51450d696myers#define ACPI_GET_FUNCTION_NAME          __FUNCTION__
52450d696myers
5330082d0myers/*
5430082d0myers * This macro is used to tag functions as "printf-like" because
557c478bdstevel@tonic-gate * some compilers (like GCC) can catch printf format string problems.
567c478bdstevel@tonic-gate */
5730082d0myers#define ACPI_PRINTF_LIKE(c) __attribute__ ((__format__ (__printf__, c, c+1)))
587c478bdstevel@tonic-gate
5930082d0myers/*
6030082d0myers * Some compilers complain about unused variables. Sometimes we don't want to
61450d696myers * use all the variables (for example, _AcpiModuleName). This allows us
627c478bdstevel@tonic-gate * to to tell the compiler warning in a per-variable manner that a variable
637c478bdstevel@tonic-gate * is unused.
647c478bdstevel@tonic-gate */
657c478bdstevel@tonic-gate#define ACPI_UNUSED_VAR __attribute__ ((unused))
667c478bdstevel@tonic-gate
677c478bdstevel@tonic-gate#endif /* __ACGCC_H__ */
68