git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>, Git List <git@vger.kernel.org>
Subject: Re: [PATCH] ewah/bitmap: silence warning about MASK macro redefinition
Date: Wed, 3 Jun 2015 02:28:10 -0400	[thread overview]
Message-ID: <CAPig+cR3Xt5FNSYbDPhW=m5aEOMq8mCLRSe+mjYfVvdS0R382A@mail.gmail.com> (raw)
In-Reply-To: <20150603045117.GC15989@peff.net>

On Wed, Jun 3, 2015 at 12:51 AM, Jeff King <peff@peff.net> 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@sunshineco.com>
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> 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.)

  reply	other threads:[~2015-06-03  6:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-02 21:47 [PATCH] ewah/bitmap: silence warning about MASK macro redefinition Eric Sunshine
2015-06-02 22:15 ` Junio C Hamano
2015-06-03  4:51   ` Jeff King
2015-06-03  6:28     ` Eric Sunshine [this message]
2015-06-03  6:38       ` Jeff King
2015-06-03  6:39         ` [PATCH 1/2] " Jeff King
2015-06-03  6:46           ` Eric Sunshine
2015-06-03  6:39         ` [PATCH 2/2] ewah: use less generic macro name Jeff King
2015-06-03  6:51           ` Eric Sunshine
2015-06-03  6:50       ` [PATCH] ewah/bitmap: silence warning about MASK macro redefinition Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPig+cR3Xt5FNSYbDPhW=m5aEOMq8mCLRSe+mjYfVvdS0R382A@mail.gmail.com' \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).