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 = YesPleaseWhat 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