diff options
| author | 2025-11-14 22:13:45 -0600 | |
|---|---|---|
| committer | 2025-11-15 00:21:37 -0600 | |
| commit | 635b33df0f7d567626fab4f1acaa91e5609e92ca (patch) | |
| tree | 981e50865b73732a9ea34a4e35d8229be6db5489 /config.h.in | |
| parent | initial commit (diff) | |
update some stuff
Diffstat (limited to 'config.h.in')
| -rw-r--r-- | config.h.in | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/config.h.in b/config.h.in index 9ef3491..59956d4 100644 --- a/config.h.in +++ b/config.h.in @@ -3,6 +3,9 @@ #mesondefine HAS_ATTR_WUR #mesondefine HAS_ATTR_ALWAYS_INLINE +#mesondefine HAS_ATTR_MALLOC +#mesondefine HAS_ATTR_FORMAT +#mesondefine HAS_RESTRICT #ifdef HAS_ATTR_WUR #define ATTR_WUR __attribute__((warn_unused_result)) @@ -16,4 +19,33 @@ #define ATTR_ALWAYS_INLINE #endif +#ifdef HAS_ATTR_MALLOC +#define ATTR_MALLOC(_x) +#else +#define ATTR_MALLOC(_x) __attribute__((malloc _x)) +#endif + +#ifdef HAS_ATTR_FORMAT +#define ATTR_FORMAT(_x) __attribute__((format _x)) +#else +#define ATTR_FORMAT(_x) +#endif + +#ifdef HAS_RESTRICT +#define PTX_RESTRICT restrict +#else +#define PTX_RESTRICT +#endif + +/* meson doesn't support this one yet :( */ +#ifdef __has_attribute +# if __has_attribute(access) +# define ATTR_ACCESS(_x) __attribute__((access _x)) +# else +# define ATTR_ACCESS(_x) +# endif +#else +#define ATTR_ACCESS(_x) +#endif + #endif /* include guard */ |
