git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 04/14] msvc: Fix macro redefinition warnings

From
Sebastian Schuberth <sschuberth@gmail.com>
Date
Dec 8, 2010, 10:32 UTC
Message-ID
<AANLkTimpj31CSzaxH4ZuYdADvtV4KSwfk04eGSRYSLFH@mail.gmail.com>
In-Reply-To
<4CFECBB8.2070900@ramsay1.demon.co.uk>
On Wed, Dec 8, 2010 at 01:05, Ramsay Jones <ramsay@ramsay1.demon.co.uk> wrote:
> Johannes Sixt wrote:
Show 12 quoted lines
>> Instead of removing the macros, wouldn't we be much safer with just
>>
>> #ifndef S_IWUSR
>>
>> ? ...
>
> Er... no.
>
> Commit 4091bfc (which added these macros) does not provide any motivation
> for the change, and I'm having a hard time trying to imagine a useful
> purpose for this part of the commit. (I'm not saying there isn't one - just
> that I can't see it :-P )

Sorry for not finding the time to respond to the thread in [1] about two months ago where this issue about my commit was first raised. While it's true that my commit message does not contain any detailed information about its motivation, it says the defines were "missing", suggesting a compile error. Indeed, I remember that back then my msysgit working tree did not compile with MSVC if I didn't have these defines (and I vaguely remember that this was caused by MSVC using different a header file than MinGW, or in a different order, or something similar).

However, I'm not able to reproduce this anymore. I checked out 4091bfc^ and 4091bfc, and both compile file with MSVC for me now, the latter just giving a lot of the mentioned macro redefinition warnings. Maybe this was caused my me using older MSVC project files with a newer code base ... I probably should have run contrib/buildsystems/generate again.

After defining LF_FACESIZE and TMPF_TRUETYPE in winansi.c, and INTMAX_MAX in git-compat-util.h, I was also able to compile the v1.7.3.2.msysgit.0 tag with MSVC. If I revert 4091bfc on top of it, it still compiles fine for me.

> So, once again, I see no reason to keep them ... Unless you know otherwise.

I agree to remove the lines and vote in favor of Ramsay's patch. Feel free to add me as Signed-off-by or Acked-by.

[1] http://thread.gmane.org/gmane.comp.version-control.git/158144/focus=158409
-- 
Sebastian Schuberth
Previous: Ramsay JonesNext: Johannes Sixt
Message 4 of 5 in “msvc: Fix macro redefinition warnings”
  1. 04/14 msvc: Fix macro redefinition warningsRamsay Jones, Dec 4, 2010
  2. Johannes SixtDec 4, 2010
  3. Ramsay JonesDec 8, 2010
  4. Sebastian SchuberthDec 8, 2010
  5. Johannes SixtDec 8, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.