From 0e073990c758f7d11e5638a8eb6d51570fc0efdc Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 2 Sep 2008 19:28:40 +0200 Subject: add check for GCC destructor function attributes --- src/macro.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') 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 -- cgit