summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-09-02 19:28:40 +0200
committerLennart Poettering <lennart@poettering.net>2008-09-02 19:28:40 +0200
commit0e073990c758f7d11e5638a8eb6d51570fc0efdc (patch)
treedaec1c64c35ac56f728055bc57d17f2c225abe7c
parent7e96d1fe34451e72b1653e9d6f7bc85bcd146187 (diff)
add check for GCC destructor function attributes
-rw-r--r--src/macro.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/macro.h b/src/macro.h
index 10b217f..d8b68d6 100644
--- a/src/macro.h
+++ b/src/macro.h
@@ -240,4 +240,10 @@ typedef void (*ca_free_cb_t)(void *);
#define ca_streq(a, b) (strcmp((a),(b)) == 0)
+#ifdef __GNUC__
+#define CA_GCC_DESTRUCTOR __attribute__ ((destructor))
+#else
+#undef CA_GCC_DESTRUCTOR
+#endif
+
#endif