Re: [PATCH] ewah/bitmap: silence warning about MASK macro redefinition

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 3, 2015 at 12:51 AM, Jeff King <peff@xxxxxxxx> wrote:
> Subject: [PATCH] ewah: use less generic macro names
>
> The ewah/ewok.h header pollutes the global namespace with
> "BITS_IN_WORD", without any specific notion that we are
> talking about the bits in an eword_t. We can give this the
> more specific name "BITS_IN_EWORD".
>
> Likewise, ewah/bitmap.c uses the generic MASK and BLOCK
> macro names. These are local to the .c file, but we have the
> opposite problem: on PowerPC Mac OS X (10.5.8 "Leopard" with
> Xcode 3.1), system header /usr/include/ppc/param.h[1]

The [1] has no meaning anymore, so: s/\[1\]//

> pollutes the preprocessor namespace with a macro generically
> named MASK. We can give these macros more specific names, as
> well, to avoid this conflict.
>
> Reported-and-analyzed-by: Eric Sunshine <sunshine@xxxxxxxxxxxxxx>
> Signed-off-by: Jeff King <peff@xxxxxxxx>
> ---
> I'm also happy to split it into two patches, and make Eric the author on
> the MASK part.

I don't mind being an author of a patch, so splitting works for me,
however, I'm also fine with whatever you and Junio prefer. (And, in
retrospect, I agree that renaming the macros here is preferable over
the #undef approach.)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]