diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-12-03 13:10:09 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-12-03 13:28:26 +0100 |
commit | d752090f3efebe6d71e5baf994f694f6dc9bd43c (patch) | |
tree | 9204c93e22531cb7a32467a2fb3c3609bfdbc51c | |
parent | tree-wide: use gcc attribute macros where appropriate (diff) | |
download | systemd-d752090f3efebe6d71e5baf994f694f6dc9bd43c.tar.xz systemd-d752090f3efebe6d71e5baf994f694f6dc9bd43c.zip |
macro: add macros for a couple of more gcc attributes we use
-rw-r--r-- | src/basic/macro.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/basic/macro.h b/src/basic/macro.h index f54f13e4fe..4e37bed9ca 100644 --- a/src/basic/macro.h +++ b/src/basic/macro.h @@ -15,6 +15,8 @@ # define _alloc_(...) __attribute__ ((__alloc_size__(__VA_ARGS__))) #endif #define _sentinel_ __attribute__ ((__sentinel__)) +#define _section_(x) __attribute__((__section__(x))) +#define _used_ __attribute__((__used__)) #define _unused_ __attribute__ ((__unused__)) #define _destructor_ __attribute__ ((__destructor__)) #define _pure_ __attribute__ ((__pure__)) @@ -28,7 +30,9 @@ #define _public_ __attribute__ ((__visibility__("default"))) #define _hidden_ __attribute__ ((__visibility__("hidden"))) #define _weakref_(x) __attribute__((__weakref__(#x))) +#define _align_(x) __attribute__((__aligned__(x))) #define _alignas_(x) __attribute__((__aligned__(__alignof(x)))) +#define _alignptr_ __attribute__((__aligned__(sizeof(void*)))) #define _cleanup_(x) __attribute__((__cleanup__(x))) #if __GNUC__ >= 7 #define _fallthrough_ __attribute__((__fallthrough__)) |