git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: Philip Oakley <philipoakley@iee.org>
Cc: Git List <git@vger.kernel.org>
Subject: Re: definition for _attribute() in remote.c
Date: Mon, 25 Apr 2016 17:10:30 -0400	[thread overview]
Message-ID: <20160425211030.GA10309@sigill.intra.peff.net> (raw)
In-Reply-To: <D7C0C4062A7242B6912E56480CBB06F4@PhilipOakley>

On Mon, Apr 25, 2016 at 10:02:38PM +0100, Philip Oakley wrote:

> I'm looking at getting Git for Windows to compile via Visual Studio
> (https://github.com/git-for-windows/git/pull/256).
> 
> However the use of __attribute() in remote.c at L1662
> (https://github.com/git-for-windows/git/blob/master/remote.c#L1662) has got
> me confused in that I can't see how the regular definition of __attribute()
> is #included in this case. A definition is given in
> git\compat\regex\regex_internal.h but doesn't appear to be on remote.c's
> include path.
> 
> The line was introduced by 3a429d0 (remote.c: report specific errors from
> branch_get_upstream, 2015-05-21) which appears to be later than the previous
> MSVC testers had looked at.

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__?

-Peff

  reply	other threads:[~2016-04-25 21:10 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 [this message]
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
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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=20160425211030.GA10309@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=philipoakley@iee.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).