summaryrefslogtreecommitdiff
path: root/source3/include/byteorder.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include/byteorder.h')
-rw-r--r--source3/include/byteorder.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/include/byteorder.h b/source3/include/byteorder.h
index 59ae4979fd..b376a8964c 100644
--- a/source3/include/byteorder.h
+++ b/source3/include/byteorder.h
@@ -262,4 +262,8 @@ it also defines lots of intermediate macros, just ignore those :-)
DEBUG(5,("%s%04x %s: %08x\n", \
tab_depth(depth), base, string, outbuf)); }
+/* Alignment macros. */
+#define ALIGN4(p,base) ((4 - (PTR_DIFF((q), (base)) % 4)) & ~3)
+#define ALIGN2(p,base) ((2 - (PTR_DIFF((q), (base)) % 2)) & ~1)
+
#endif /* _BYTEORDER_H */