summaryrefslogtreecommitdiff
path: root/src/basic/macro.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-12-03 13:10:09 +0100
committerLennart Poettering <lennart@poettering.net>2018-12-03 13:28:26 +0100
commitd752090f3efebe6d71e5baf994f694f6dc9bd43c (patch)
tree9204c93e22531cb7a32467a2fb3c3609bfdbc51c /src/basic/macro.h
parentd34dae1817f589014bca224230bfd5bb81dfc6a6 (diff)
downloadsystemd-d752090f3efebe6d71e5baf994f694f6dc9bd43c.tar.gz
macro: add macros for a couple of more gcc attributes we use
Diffstat (limited to 'src/basic/macro.h')
-rw-r--r--src/basic/macro.h4
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__))