mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
Use wrappers from macros.h instead of bare GCC attributes/pragmas
This commit is contained in:
parent
2559a9711c
commit
39b2e46e72
4 changed files with 17 additions and 15 deletions
12
macros.h
12
macros.h
|
|
@ -45,6 +45,18 @@
|
|||
#define MALLOC
|
||||
#endif
|
||||
|
||||
#if GNUC_AT_LEAST(3, 0) || HAS_ATTRIBUTE(constructor)
|
||||
#define CONSTRUCTOR __attribute__((__constructor__))
|
||||
#else
|
||||
#define CONSTRUCTOR
|
||||
#endif
|
||||
|
||||
#if GNUC_AT_LEAST(3, 0) || HAS_ATTRIBUTE(destructor)
|
||||
#define DESTRUCTOR __attribute__((__destructor__))
|
||||
#else
|
||||
#define DESTRUCTOR
|
||||
#endif
|
||||
|
||||
#if GNUC_AT_LEAST(3, 0) || HAS_ATTRIBUTE(format)
|
||||
#define PRINTF(x) __attribute__((__format__(__printf__, (x), (x + 1))))
|
||||
#define VPRINTF(x) __attribute__((__format__(__printf__, (x), 0)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue