From a391c8f0eef8573fd6b99e6cd264a5f2caa539cb Mon Sep 17 00:00:00 2001
From: Flavio Cruz <flaviocruz@gmail.com>
Date: Sun, 12 Feb 2023 17:14:23 -0500
Subject: Introduce complex_alignof to replace word_size

Remove the concept of word_size since it is meaningless in some
architectures. This is also done in preparation to possibly introduce
8-byte aligned messages.
Message-Id: <Y+lkv0uMo/3+hbCb@jupiter.tail36e24.ts.net>
---
 utils.h | 2 ++
 1 file changed, 2 insertions(+)

(limited to 'utils.h')

diff --git a/utils.h b/utils.h
index 4be4f4c..477ea74 100644
--- a/utils.h
+++ b/utils.h
@@ -39,6 +39,8 @@
   ({ __typeof__ (a) _a = (a); \
       __typeof__ (b) _b = (b); \
     _a > _b ? _b : _a; })
+#define ALIGN(x, alignment) \
+    ((x) + (alignment)-1) & ~((alignment)-1)
 
 typedef void	write_list_fn_t(FILE *file, const argument_t *arg);
 
-- 
cgit v1.2.3