Git development
 help / color / mirror / Atom feed
From: "Philip Oakley" <philipoakley@iee.org>
To: "Jeff King" <peff@peff.net>,
	"Ramsay Jones" <ramsay@ramsayjones.plus.com>
Cc: "Git List" <git@vger.kernel.org>, "Junio C Hamano" <gitster@pobox.com>
Subject: Re: [PATCH] remote.c: spell __attribute__ correctly
Date: Tue, 26 Apr 2016 14:19:05 +0100	[thread overview]
Message-ID: <05BBD86AE63E4FA0ADE63F05DBD834C0@PhilipOakley> (raw)
In-Reply-To: 571E96CE.80606@ramsayjones.plus.com

Thnx,
From: "Ramsay Jones" <ramsay@ramsayjones.plus.com>
> On 25/04/16 22:50, Philip Oakley wrote:
>> From: "Jeff King" <peff@peff.net>
>>> On Mon, Apr 25, 2016 at 05:10:30PM -0400, Jeff King wrote:
>>>
>>>> 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
>

  reply	other threads:[~2016-04-26 20:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-25 21:02 definition for _attribute() in remote.c Philip Oakley
2016-04-25 21:10 ` Jeff King
2016-04-25 21:15   ` [PATCH] remote.c: spell __attribute__ correctly Jeff King
2016-04-25 21:50     ` Philip Oakley
2016-04-25 22:14       ` Ramsay Jones
2016-04-26 13:19         ` Philip Oakley [this message]
2016-04-25 21:34   ` definition for _attribute() in remote.c Philip Oakley
2016-04-25 21:39     ` Jeff King

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=05BBD86AE63E4FA0ADE63F05DBD834C0@PhilipOakley \
    --to=philipoakley@iee.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=ramsay@ramsayjones.plus.com \
    /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