nasmlib.h: remove system definitions of ALIGN and ALIGN_MASK

Apparently some BSD flavors define these macros in a system header
file; this includes MacOS X.  Assume we can just #undef them without
causing any additional issues; otherwise we may need to rename them.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
H. Peter Anvin 2016-02-05 11:30:11 -08:00
parent def81d5c71
commit 25e2b40ac2

View File

@ -258,6 +258,8 @@ void standard_extension(char *inname, char *outname, char *extension);
/*
* Power of 2 align helpers
*/
#undef ALIGN_MASK /* Some BSD flavors define these in system headers */
#undef ALIGN
#define ALIGN_MASK(v, mask) (((v) + (mask)) & ~(mask))
#define ALIGN(v, a) ALIGN_MASK(v, (a) - 1)
#define IS_ALIGNED(v, a) (((v) & ((a) - 1)) == 0)