diff options
| author | allusive-dev <[email protected]> | 2023-10-30 15:12:21 +1100 |
|---|---|---|
| committer | allusive-dev <[email protected]> | 2023-10-30 15:12:21 +1100 |
| commit | ac33357e7ce7c474aeaffc92e381020289d767a2 (patch) | |
| tree | 7f05fa79b3ccd7834f85cc65a07fbd4f8030eb94 /src/compiler.h | |
| parent | Create FUNDING.yml (diff) | |
| download | compfy-ac33357e7ce7c474aeaffc92e381020289d767a2.tar.xz compfy-ac33357e7ce7c474aeaffc92e381020289d767a2.zip | |
Version 1.01.0.0
Diffstat (limited to 'src/compiler.h')
| -rw-r--r-- | src/compiler.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler.h b/src/compiler.h index f146bd2..00da4cb 100644 --- a/src/compiler.h +++ b/src/compiler.h @@ -85,6 +85,12 @@ # define fallthrough() #endif +#if __has_attribute(cleanup) +# define cleanup(func) __attribute__((cleanup(func))) +#else +# error "Compiler is missing cleanup attribute" +#endif + #if __STDC_VERSION__ >= 201112L # define attr_noret _Noreturn #else @@ -102,7 +108,7 @@ #endif #ifndef __has_include -# define __has_include(x) 0 +#define __has_include(x) 0 #endif #if !defined(__STDC_NO_THREADS__) && __has_include(<threads.h>) |