chiark / gitweb /
sd-bus: remove unused call bus_kernel_create_monitor()
[elogind.git] / src / shared / macro.h
index 179b24c9838971d1609d1ce74d027f497ea55801..43fa3e556f33e2de9cd4b25dcede05152461763f 100644 (file)
@@ -149,6 +149,9 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
                 ((_A) > (_B)) ? (_A) : (_B),                            \
                 (void)0))
 
+/* takes two types and returns the size of the larger one */
+#define MAXSIZE(A, B) (sizeof(union _packed_ { typeof(A) a; typeof(B) b; }))
+
 #define MAX3(x,y,z)                                     \
         __extension__ ({                                \
                         const typeof(x) _c = MAX(x,y);  \