From: Lennart Poettering Date: Mon, 3 Dec 2018 12:10:09 +0000 (+0100) Subject: macro: add macros for a couple of more gcc attributes we use X-Git-Tag: v240~148^2~10 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d752090f3efebe6d71e5baf994f694f6dc9bd43c;p=thirdparty%2Fsystemd.git macro: add macros for a couple of more gcc attributes we use --- diff --git a/src/basic/macro.h b/src/basic/macro.h index f54f13e4fe4..4e37bed9caa 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__))