mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-30 16:41:05 +08:00
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:
parent
def81d5c71
commit
25e2b40ac2
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user