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

Re: definition for _attribute() in remote.c

From
Jeff King <peff@peff.net>
Date
Apr 25, 2016, 21:39 UTC
Message-ID
<20160425213926.GC11227@sigill.intra.peff.net>
In-Reply-To
<F23050BD4C62408D97A64B1D885007A8@PhilipOakley>
On Mon, Apr 25, 2016 at 10:34:27PM +0100, Philip Oakley wrote:
Show 16 quoted lines
> It's not the __attribute__ definition (a Gnu C ism), rather its the
> __attribute variant, which has a definition in regex_internal.h, and is used
> in the regex code. It's that one that's used in remote.c that I can't fathom
> (i.e. how it worked in normally)
> 
> regex_internal.h#L160-164
> #ifdef __GNUC__
> # define __attribute(arg) __attribute__ (arg)
> #else
> # define __attribute(arg)
> #endif
> 
> thus when the compilation get to remote.c#L1662 it fails to find that
> definition.
> 
> Should that line use the gnu extension name?

Yeah, sorry, see my followup response. We don't use "__attribute" at all ourselves. The reference you found is in compat code that we pulled in (so it does its own thing entirely), and the one in remote.c is just a typo/think-o that happened to work on gcc, et al.

-Peff
Previous: Philip Oakley
Message 8 of 8 in “definition for _attribute() in remote.c”
  1. Philip OakleyApr 25, 2016
  2. Jeff KingApr 25, 2016
  3. remote.c: spell __attribute__ correctlyJeff King, Apr 25, 2016
  4. Philip OakleyApr 25, 2016
  5. Ramsay JonesApr 25, 2016
  6. Philip OakleyApr 26, 2016
  7. Philip OakleyApr 25, 2016
  8. Jeff KingApr 25, 2016

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.