From: Eric Sunshine <sunshine@sunshineco.com>
To: "Torsten Bögershausen" <tboegi@web.de>
Cc: David Aguilar <davvid@gmail.com>,
Junio C Hamano <gitster@pobox.com>,
Git List <git@vger.kernel.org>,
Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [PATCH v5 1/2] cache.h: eliminate SHA-1 deprecation warnings on Mac OS X
Date: Fri, 17 May 2013 02:18:37 -0400 [thread overview]
Message-ID: <CAPig+cTHh7iEY0+rReQ2LC94CsX-_aKdMLiVnL0ZF-FtKL6DaQ@mail.gmail.com> (raw)
In-Reply-To: <5193CC6B.50909@web.de>
On Wed, May 15, 2013 at 1:56 PM, Torsten Bögershausen <tboegi@web.de> wrote:
> On 2013-05-15 09.11, David Aguilar wrote:
>> + ifndef NO_APPLE_COMMON_CRYPTO
>> + APPLE_COMMON_CRYPTO = YesPlease
>> + endif
>> NO_REGEX = YesPlease
>> PTHREAD_LIBS =
>> endif
>> @@ -1389,10 +1396,16 @@ ifdef PPC_SHA1
>> LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o
>> LIB_H += ppc/sha1.h
>> else
>> +ifdef APPLE_COMMON_CRYPTO
>> + BASIC_CFLAGS += -DCOMMON_DIGEST_FOR_OPENSSL
>> + SHA1_HEADER = <CommonCrypto/CommonDigest.h>
>
> Would it make sense to replace APPLE_COMMON_CRYPTO
> with COMMON_DIGEST_FOR_OPENSSL ?
>
> In the spirit of other Makefile-defines becoming Compiler defines,
> a random picked example:
> ifdef NO_STRTOULL
> COMPAT_CFLAGS += -DNO_STRTOULL
> endif
Not necessarily. Unlike NO_STRTOULL and cousins,
COMMON_DIGEST_FOR_OPENSSL is not a Git build tweak; it is merely a
(public) implementation detail of the Apple header [1] to magically
associate OpenSSL digest functions with CommonCrypto counterparts.
It's not the only such macro recognized by the Apple headers. For
instance, COMMON_DIGEST_FOR_RFC_1321 magically associates legacy MD5
digest functions with CommonCrypto counterparts.
Further, as Junio noted elsewhere, David is using CommonCrypto for
HMAC replacements, not just for digest replacements, so a Makefile
knob with DIGEST in its name is not really appropriate. More
generally, David would like to find CommonCrypto replacements for all
the OpenSSL functionality, so a Makefile knob named after DIGEST is
too specific.
These considerations motivated the original suggestion for a single
Git Makefile knob to enable/disable, as a unit, all CommonCrypto
replacements. Such a knob would naturally have COMMON_CRYPTO as part
of its name.
[1]: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include/CommonCrypto/CommonDigest.h
-- ES
next prev parent reply other threads:[~2013-05-17 6:18 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-15 7:11 [PATCH v5 1/2] cache.h: eliminate SHA-1 deprecation warnings on Mac OS X David Aguilar
2013-05-15 7:11 ` [PATCH v5 2/2] imap-send: eliminate HMAC " David Aguilar
2013-05-15 17:56 ` [PATCH v5 1/2] cache.h: eliminate SHA-1 " Torsten Bögershausen
2013-05-17 6:18 ` Eric Sunshine [this message]
2013-05-17 8:21 ` David Aguilar
2013-05-17 16:53 ` Junio C Hamano
2013-05-17 17:20 ` David Aguilar
2013-05-17 17:29 ` Eric Sunshine
2013-05-17 17:57 ` Junio C Hamano
2013-05-18 0:38 ` David Aguilar
2013-05-19 6:26 ` Junio C Hamano
2013-05-19 21:51 ` David Aguilar
2013-05-17 17:40 ` Eric Sunshine
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=CAPig+cTHh7iEY0+rReQ2LC94CsX-_aKdMLiVnL0ZF-FtKL6DaQ@mail.gmail.com \
--to=sunshine@sunshineco.com \
--cc=davvid@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=jrnieder@gmail.com \
--cc=tboegi@web.de \
/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;
as well as URLs for NNTP newsgroup(s).