Git development
 help / color / mirror / Atom feed
From: Benoit Sigoure <tsunanet@gmail.com>
To: git@vger.kernel.org
Cc: Benoit Sigoure <tsunanet@gmail.com>
Subject: [PATCH] Undefine strlcpy if needed.
Date: Sat, 23 Aug 2014 21:35:30 -0700	[thread overview]
Message-ID: <1408854930-14322-1-git-send-email-tsunanet@gmail.com> (raw)
In-Reply-To: <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.

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
 #define strlcpy gitstrlcpy
 extern size_t gitstrlcpy(char *, const char *, size_t);
 #endif
-- 
1.9.2.460.gfb82504

  reply	other threads:[~2014-08-24  4:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-24  4:32 [PATCH] Undefine strlcpy if needed Benoit Sigoure
2014-08-24  4:35 ` Benoit Sigoure [this message]
2014-08-24 11:10   ` Ramsay Jones
2014-08-24 11:13     ` tsuna
2014-08-24 16:18       ` Ramsay Jones
2014-08-24 19:49         ` Torsten Bögershausen
2014-08-24 21:09           ` tsuna
2014-08-25  0:32             ` Ramsay Jones
2014-08-25  1:54               ` tsuna
2014-08-25 11:16                 ` Ramsay Jones

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1408854930-14322-1-git-send-email-tsunanet@gmail.com \
    --to=tsunanet@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox