mirror of https://github.com/libAthena/athena.git
Some handy macros
This commit is contained in:
parent
34d3bd6724
commit
50406520ba
|
@ -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)\
|
||||
|
|
Loading…
Reference in New Issue