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

Re: [PATCH] config: do not use C function names as struct members

From
LFLukas Fleischer <git@cryptocrack.de>
Date
Aug 27, 2013, 00:56 UTC
Message-ID
<20130827005601.GA14679@blizzard>
In-Reply-To
<20130826215718.GB6219@sigill.intra.peff.net>
On Mon, Aug 26, 2013 at 05:57:18PM -0400, Jeff King wrote:
Show 16 quoted lines
> On Mon, Aug 26, 2013 at 04:59:01PM -0400, Jeff King wrote:
> 
> > Hmm. I wonder if fgetc is a macro in uclibc? Just grepping their
> > stdio.h, it looks like that is a possibility.
> > 
> > I think they are probably wrong to do so (but I'd have to check the
> > standard). However, the cleaner workaround would probably be to call the
> > fgetc struct member something else.
> 
> Nope, it's allowed. I think we should do the patch below:
> 
> -- >8 --
> Subject: config: do not use C function names as struct members
> [...]
> 
> Instead, we can simply use non-colliding names.
Yes, this sounds like a better idea to me. So, FWIW, +1 from me.
Show 7 quoted lines
> 
> Signed-off-by: Jeff King <peff@peff.net>
> ---
>  config.c | 32 ++++++++++++++++----------------
>  1 file changed, 16 insertions(+), 16 deletions(-)
> 
> [...]
Previous: Jeff KingNext: Junio C Hamano
Message 7 of 9 in “Issue with compiling git 1.8.4 under uclibc with gcc 4.6.3”
  1. LanceAug 26, 2013
  2. Lukas FleischerAug 26, 2013
  3. LanceAug 26, 2013
  4. Lukas FleischerAug 26, 2013
  5. Jeff KingAug 26, 2013
  6. config: do not use C function names as struct membersJeff King, Aug 26, 2013
  7. Lukas FleischerAug 27, 2013
  8. Junio C HamanoAug 27, 2013
  9. Andreas SchwabAug 26, 2013

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.