gccmacro.h

Go to the documentation of this file.
00001 #ifndef foopulsegccmacrohfoo
00002 #define foopulsegccmacrohfoo
00003 
00004 /***
00005   This file is part of PulseAudio.
00006 
00007   Copyright 2004-2006 Lennart Poettering
00008 
00009   PulseAudio is free software; you can redistribute it and/or modify
00010   it under the terms of the GNU Lesser General Public License as published
00011   by the Free Software Foundation; either version 2 of the License,
00012   or (at your option) any later version.
00013 
00014   PulseAudio is distributed in the hope that it will be useful, but
00015   WITHOUT ANY WARRANTY; without even the implied warranty of
00016   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00017   General Public License for more details.
00018 
00019   You should have received a copy of the GNU Lesser General Public License
00020   along with PulseAudio; if not, write to the Free Software
00021   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00022   USA.
00023 ***/
00024 
00025 #ifdef __GNUC__
00026 #define PA_GCC_PRINTF_ATTR(a,b) __attribute__ ((format (printf, a, b)))
00027 #else
00028 
00029 #define PA_GCC_PRINTF_ATTR(a,b)
00030 #endif
00031 
00032 #if defined(__GNUC__) && (__GNUC__ >= 4)
00033 #define PA_GCC_SENTINEL __attribute__ ((sentinel))
00034 #else
00035 
00036 #define PA_GCC_SENTINEL
00037 #endif
00038 
00039 #ifdef __GNUC__
00040 #define PA_GCC_NORETURN __attribute__((noreturn))
00041 #else
00042 
00043 #define PA_GCC_NORETURN
00044 #endif
00045 
00046 #ifdef __GNUC__
00047 #define PA_GCC_UNUSED __attribute__ ((unused))
00048 #else
00049 
00050 #define PA_GCC_UNUSED
00051 #endif
00052 
00053 #ifdef __GNUC__
00054 #define PA_GCC_DESTRUCTOR __attribute__ ((destructor))
00055 #else
00056 
00057 #define PA_GCC_DESTRUCTOR
00058 #endif
00059 
00060 #ifndef PA_GCC_PURE
00061 #ifdef __GNUC__
00062 #define PA_GCC_PURE __attribute__ ((pure))
00063 #else
00064 
00065 #define PA_GCC_PURE
00066 #endif
00067 #endif
00068 
00069 #ifndef PA_GCC_CONST
00070 #ifdef __GNUC__
00071 #define PA_GCC_CONST __attribute__ ((const))
00072 #else
00073 
00074 #define PA_GCC_CONST
00075 #endif
00076 #endif
00077 
00078 #ifndef PA_GCC_DEPRECATED
00079 #ifdef __GNUC__
00080 #define PA_GCC_DEPRECATED __attribute__ ((deprecated))
00081 #else
00082 
00083 #define PA_GCC_DEPRECATED
00084 #endif
00085 #endif
00086 
00087 #ifndef PA_GCC_PACKED
00088 #ifdef __GNUCC__
00089 #define PA_GCC_PACKED __attribute__ ((packed))
00090 #else
00091 
00092 #define PA_GCC_PACKED
00093 #endif
00094 #endif
00095 
00096 #ifndef PA_GCC_ALLOC_SIZE
00097 #if defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 3)
00098 #define PA_GCC_ALLOC_SIZE(x) __attribute__ ((__alloc_size__(x)))
00099 #define PA_GCC_ALLOC_SIZE2(x,y) __attribute__ ((__alloc_size__(x,y)))
00100 #else
00101 
00102 #define PA_GCC_ALLOC_SIZE(x)
00103 #define PA_GCC_ALLOC_SIZE2(x,y)
00104 #endif
00105 #endif
00106 
00107 #ifndef PA_GCC_MALLOC
00108 #ifdef __GNUCC__
00109 #define PA_GCC_MALLOC __attribute__ ((malloc))
00110 #else
00111 
00112 #define PA_GCC_MALLOC
00113 #endif
00114 #endif
00115 
00116 #endif

Generated on Tue Sep 16 10:58:58 2008 for PulseAudio by  doxygen 1.5.4