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

Re: [PATCH] Un-static gitmkstemps

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 15, 2011, 16:05 UTC
Message-ID
<7vvcstpz8y.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1316089260-76049-1-git-send-email-brian@gernhardtsoftware.com>
Brian Gernhardt <brian@gernhardtsoftware.com> writes:
> It may not be used in most builds, but it's used via a #ifdef in
> git-compat-util.h  ...
Hmm, do you mean "#define", not "#ifdef", specifically, this:
    maint:git-compat-util.h:#define mkstemps gitmkstemps
> ... Also, making it static makes a -Wall compile fail
> since it's not used in the file without NO_MKSTEMPS.

Your alternative of not defining on builds without NO_MKSTEMPS is better, and probably even better yet, it would make sense to move the definition of git_mkstemps() out of wrapper.c and have it somewhere in compat/, just like the way in which compat/qsort.c defines git_qsort() that is used as a replacement for qsort() via #define on systems that lack it.

Previous: Brian Gernhardt
Message 2 of 2 in “Un-static gitmkstemps”
  1. Un-static gitmkstempsBrian Gernhardt, Sep 15, 2011
  2. Junio C HamanoSep 15, 2011

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.