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

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.
Previous: David Aguilar
Message 2 of 2 in “cache.h: avoid deprecation warnings on OS X 10.8”
  1. cache.h: avoid deprecation warnings on OS X 10.8David Aguilar, May 11, 2013
  2. Eric SunshineMay 12, 2013

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.