Re: [PATCH 4/7] parse_color: refactor color storage
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Dec 9, 2014, 20:56 UTC
- Message-ID
- <CAPig+cRBxN4arhdW87d6EmM_=CNP3qQv3v1NmA4B6gMBDVn=0g@mail.gmail.com>
- In-Reply-To
- <54875825.7060008@kdbg.org>
On Tue, Dec 9, 2014 at 3:14 PM, Johannes Sixt <j6t@kdbg.org> wrote:
Show 7 quoted lines
> Am 20.11.2014 um 16:17 schrieb Jeff King: >> +#define COLOR_FOREGROUND '3' >> +#define COLOR_BACKGROUND '4' > > This (COLOR_BACKGROUND) causes an ugly redefinition warning on Windows, > because we inherit a definition from a Windows header. How would you > like it fixed? A different name or #undef in front of it?
One way this sort of problem was handled in the past was the sanitize the preprocessor namespace [1].
[1]: https://github.com/git/git/blob/master/compat/mingw.h#L80