#ifdef __STDC_CLEANUP__ #define my_cleanup(func) stdc_cleanup(func) #else #define my_cleanup(func) __attribute__((cleanup(func))) #endif