Re: [PATCH] cache.h: avoid deprecation warnings on OS X 10.8
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 12, 2013, 17:20 UTC
- Message-ID
- <CAPig+cRsBay2tobNEMTujMR4q7xs-Fbq_3V=WQaw40KWAXwdLg@mail.gmail.com>
- In-Reply-To
- <1368239010-60894-1-git-send-email-davvid@gmail.com>
On Fri, May 10, 2013 at 10:23 PM, David Aguilar <davvid@gmail.com> wrote:
Show 7 quoted lines
> Mac OS X Mountain Lion prints warnings when building git: > > warning: 'SHA1_Init' is deprecated > (declared at /usr/include/openssl/sha.h:121) > > Silence the warnings by using the Common Digest SHA-1 > functions for SHA1_Init(), SHA1_Update(), and SHA1_Final().
On Lion, with this patch, I see diagnostics such as:
warning: implicit declaration of function 'CC_SHA1_Init'
If I #include <CommonCrypto/CommonDigest.h>, the "implicit declaration" warning is resolved, but a host of other warnings about incompatible pointer types crop up.
(This is a bare Lion installation with latest XCode and "Command Line Tools" package. No MacPorts, no Homebrew.)
Show 7 quoted lines
> Add a COMMON_DIGEST_SHA1 knob to the Makefile to allow > choosing this implementation and define it by default on Darwin. > > Signed-off-by: David Aguilar <davvid@gmail.com> > --- > This implements the suggestion from John Keeping instead > of blindly setting NO_OPENSSL on Darwin.