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

[PATCH] Undefine strlcpy if needed.

From
Benoit Sigoure <tsunanet@gmail.com>
Date
Aug 24, 2014, 04:32 UTC
Message-ID
<1408854741-13956-1-git-send-email-tsunanet@gmail.com>
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.
---
 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
 #define strlcpy gitstrlcpy
 extern size_t gitstrlcpy(char *, const char *, size_t);
 #endif
-- 
1.9.2.460.gfb82504
Next: Benoit Sigoure
Message 1 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.