Thread (8 messages) flat view 8 messages, 3 authors, 2016-06-16

Re: [PATCH] remote.c: spell __attribute__ correctly

From: Philip Oakley <hidden>
Date: 2016-06-16 02:19:00

Thnx,
From: "Ramsay Jones" <redacted>
On 25/04/16 22:50, Philip Oakley wrote:
quoted
From: "Jeff King" <redacted>
quoted
On Mon, Apr 25, 2016 at 05:10:30PM -0400, Jeff King wrote:
quoted
It should be handled in git-compat-util.h, which is included by 
cache.h,
which is included by remote.c.

There we have:

  #ifndef __GNUC__
  #ifndef __attribute__
  #define __attribute__(x)
  #endif
  #endif

which should make it a noop on compilers which don't know about it. Is
VS (or another file) setting __GNUC__?
Of course it helps if we spell the name right...
Indeed! ;-)

Not that it matters, but the above #define in git-compat-util.h is not
the relevant definition - msvc will not see it.
Ah, I see that that block is further guarded with other if/elif/else clauses 
so that it's not seen if _MSC_VER is defined.

git-compat-util.h#L400-411
However, it does see
the #define on line 12 of compat/msvc.h. :-D

ATB,
Ramsay Jones
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help