[attributes] update attribute definitions

* support C++
* support C23
* replace __inline et al with C11 inline
This commit is contained in:
Armin Novak
2026-02-25 10:22:58 +01:00
parent 8016117eb7
commit e9723d1b61
12 changed files with 107 additions and 57 deletions

View File

@@ -27,7 +27,13 @@
#include <stdbool.h>
#if defined(__GNUC__) && (__GNUC__ >= 4)
#if defined(__cplusplus) && (__cplusplus >= 201703L)
#define UWAC_API [[gnu::visibility("default")]]
#elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 202311L)
#define UWAC_API [[gnu::visibility("default")]]
#else
#define UWAC_API __attribute__((visibility("default")))
#endif
#else
#define UWAC_API
#endif