diff options
Diffstat (limited to 'source/include/byteorder.h')
-rw-r--r-- | source/include/byteorder.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/include/byteorder.h b/source/include/byteorder.h index d5dadb44acf..b270627b7f5 100644 --- a/source/include/byteorder.h +++ b/source/include/byteorder.h @@ -274,4 +274,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) ((p) + ((4 - (PTR_DIFF((p), (base)) & 3)) & 3)) +#define ALIGN2(p,base) ((p) + ((2 - (PTR_DIFF((p), (base)) & 1)) & 1)) + #endif /* _BYTEORDER_H */ |