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

Re: [PATCH] Undefine strlcpy if needed.

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Aug 24, 2014, 11:10 UTC
Message-ID
<53F9C818.8020607@ramsay1.demon.co.uk>
In-Reply-To
<1408854930-14322-1-git-send-email-tsunanet@gmail.com>
On 24/08/14 05:35, Benoit Sigoure wrote:
Show 23 quoted lines
> On OS X, strlcpy is already #define'd, which causes warnings
> in all the files that include `git-compat-util.h'.  Note that
> this only occurs when building without running ./configure.
> 
> Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
> ---
> 
> Resending with the SOB line I forgot.
> 
>  git-compat-util.h | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/git-compat-util.h b/git-compat-util.h
> index f587749..8c001e2 100644
> --- a/git-compat-util.h
> +++ b/git-compat-util.h
> @@ -495,6 +495,9 @@ extern char *gitstrcasestr(const char *haystack, const char *needle);
>  #endif
>  
>  #ifdef NO_STRLCPY
> +#ifdef strlcpy
> +#undef strlcpy
> +#endif
If strlcpy is #defined, then presumably NO_STRLCPY should not be set, no?
>  #define strlcpy gitstrlcpy
>  extern size_t gitstrlcpy(char *, const char *, size_t);
>  #endif
> 
Hmm, which version of OS X are we talking about?
config.mak.uname contains this:
        ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
                NO_STRLCPY = YesPlease
What does ./configure put in config.mak.autogen for NO_STRLCPY?

(sorry, I don't have access to any version of OS X, so I can't offer much help on this).

ATB, Ramsay Jones

Previous: Benoit SigoureNext: tsuna
Message 3 of 10 in “Undefine strlcpy if needed.”
  1. Undefine strlcpy if needed.Benoit Sigoure, Aug 24, 2014
  2. Undefine strlcpy if needed.Benoit Sigoure, Aug 24, 2014
  3. Ramsay JonesAug 24, 2014
  4. tsunaAug 24, 2014
  5. Ramsay JonesAug 24, 2014
  6. Torsten BögershausenAug 24, 2014
  7. tsunaAug 24, 2014
  8. Ramsay JonesAug 25, 2014
  9. tsunaAug 25, 2014
  10. Ramsay JonesAug 25, 2014

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.