2 * Asterisk -- An open source telephony toolkit.
4 * Copyright (C) 1999 - 2005, Digium, Inc.
6 * Mark Spencer <markster@digium.com>
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
20 * \brief Compiler-specific macros and other items
23 #ifndef _ASTERISK_COMPILER_H
24 #define _ASTERISK_COMPILER_H
26 #ifdef HAVE_ATTRIBUTE_always_inline
27 #define force_inline __attribute__((always_inline)) inline
29 #define force_inline inline
32 #ifdef HAVE_ATTRIBUTE_pure
33 #define attribute_pure __attribute__((pure))
35 #define attribute_pure
38 #ifdef HAVE_ATTRIBUTE_const
39 #define attribute_const __attribute__((const))
41 #define attribute_const
44 #ifdef HAVE_ATTRIBUTE_unused
45 #define attribute_unused __attribute__((unused))
47 #define attribute_unused
50 #ifdef HAVE_ATTRIBUTE_malloc
51 #define attribute_malloc __attribute__((malloc))
53 #define attribute_malloc
56 #ifdef HAVE_ATTRIBUTE_deprecated
57 #define attribute_deprecated __attribute__((deprecated))
59 #define attribute_deprecated
62 #endif /* _ASTERISK_COMPILER_H */