From 50406520baeb169def9ff573108ae135ef561e34 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 3 Apr 2016 16:26:47 -1000 Subject: [PATCH] Some handy macros --- include/athena/Global.hpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/athena/Global.hpp b/include/athena/Global.hpp index 85b57d5..44ede8b 100644 --- a/include/athena/Global.hpp +++ b/include/athena/Global.hpp @@ -66,10 +66,14 @@ typedef struct stat64 stat64_t; #define BLOCKSZ 512 #endif +#define ROUND_UP_256(val) (((val) + 255) & ~255) #define ROUND_UP_32(val) (((val) + 31) & ~31) #define ROUND_UP_16(val) (((val) + 15) & ~15) #define ROUND_UP_4(val) (((val) + 3) & ~3) +#define _XSTR(s) _STR(s) +#define _STR(s) #s + #ifndef ENABLE_BITWISE_ENUM #define ENABLE_BITWISE_ENUM(type)\ inline type operator|(type a, type b)\