From: nasm-bot f. H. P. A. <hp...@li...> - 2016-02-11 22:48:16
|
Commit-ID: 25e2b40ac2db6663086f98bcba534e8dbb02dd34 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=25e2b40ac2db6663086f98bcba534e8dbb02dd34 Author: H. Peter Anvin <hp...@li...> AuthorDate: Fri, 5 Feb 2016 11:30:11 -0800 Committer: H. Peter Anvin <hp...@li...> CommitDate: Fri, 5 Feb 2016 11:30:11 -0800 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 <hp...@li...> --- nasmlib.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nasmlib.h b/nasmlib.h index 52eadd8..0d4d21a 100644 --- a/nasmlib.h +++ b/nasmlib.h @@ -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) |