summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/gccmacro.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/pulsecore/gccmacro.h')
-rw-r--r--src/pulsecore/gccmacro.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/pulsecore/gccmacro.h b/src/pulsecore/gccmacro.h
index 57d28006..e9f0d093 100644
--- a/src/pulsecore/gccmacro.h
+++ b/src/pulsecore/gccmacro.h
@@ -52,4 +52,29 @@
#define PA_GCC_UNUSED
#endif
+#ifdef __GNUC__
+#define PA_GCC_DESTRUCTOR __attribute__ ((destructor))
+#else
+/** Call this function when process terminates */
+#define PA_GCC_DESTRUCTOR
+#endif
+
+#ifndef PA_GCC_PURE
+#ifdef __GNUCC__
+#define PA_GCC_PURE __attribute__ ((pure))
+#else
+/** This function's return value depends only the arguments list and global state **/
+#define PA_GCC_PURE
+#endif
+#endif
+
+#ifndef PA_GCC_CONST
+#ifdef __GNUCC__
+#define PA_GCC_CONST __attribute__ ((const))
+#else
+/** This function's return value depends only the arguments list (stricter version of PA_GCC_PURE) **/
+#define PA_GCC_CONST
+#endif
+#endif
+
#endif