summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2016-02-05 11:30:11 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2016-02-05 11:30:11 -0800
commit25e2b40ac2db6663086f98bcba534e8dbb02dd34 (patch)
tree730932adae4eedbd25e227b8ee48972299d89ca1
parentdef81d5c71838aa1510340540c2efb4501180d0a (diff)
downloadnasm-25e2b40ac2db6663086f98bcba534e8dbb02dd34.tar.gz
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>
-rw-r--r--nasmlib.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/nasmlib.h b/nasmlib.h
index 52eadd87..0d4d21a9 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)