mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-18 17:35:45 +01:00
switch from c17 to gnu99
I am choosing gnu99 over c99, since I am planning to use GNU extensions, like bswap. (in a future commit) Why I choose c99 over c17, is because this'll produce more portable code. c99 does not implement noreturn.h, thus I added it to the compiler attributes header.
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#define atrb_unused
|
||||
#define atrb_pure
|
||||
#define atrb_const
|
||||
#define atrb_noreturn
|
||||
#define atrb_format()
|
||||
#define atrb_nonnull()
|
||||
|
||||
@@ -34,6 +35,11 @@
|
||||
#define atrb_const __attribute__((const))
|
||||
#endif
|
||||
|
||||
#if __has_attribute(noreturn)
|
||||
#undef atrb_noreturn
|
||||
#define atrb_noreturn __attribute__((noreturn))
|
||||
#endif
|
||||
|
||||
#if __has_attribute(format)
|
||||
#undef atrb_format
|
||||
#define atrb_format(...) __attribute__((format(__VA_ARGS__)))
|
||||
|
||||
Reference in New Issue
Block a user