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

Re: [PATCH 1/3] Makefile: Fix APPLE_COMMON_CRYPTO with BLK_SHA1

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 5, 2013, 17:52 UTC
Message-ID
<7v4nb4kosp.fsf@alter.siamese.dyndns.org>
In-Reply-To
<1375718364-13824-2-git-send-email-brian@gernhardtsoftware.com>
Brian Gernhardt <brian@gernhardtsoftware.com> writes:
Show 31 quoted lines
> It used to be that APPLE_COMMON_CRYPTO did nothing when BLK_SHA1 was
> set.  But APPLE_COMMON_CRYPTO is now used for more than just SHA1 (see
> 3ef2bca) so make sure that the appropriate libraries are always set.
>
> Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>
> ---
>  Makefile | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/Makefile b/Makefile
> index 82f2e22..7051956 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -1182,6 +1182,9 @@ ifdef NEEDS_SSL_WITH_CRYPTO
>  else
>  	LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto
>  endif
> +ifdef APPLE_COMMON_CRYPTO
> +	LIB_4_CRYPTO += -framework Security -framework CoreFoundation
> +endif
>  endif
>  ifdef NEEDS_LIBICONV
>  	ifdef ICONVDIR
> @@ -1413,7 +1416,6 @@ ifdef PPC_SHA1
>  	LIB_H += ppc/sha1.h
>  else
>  ifdef APPLE_COMMON_CRYPTO
> -	LIB_4_CRYPTO += -framework Security -framework CoreFoundation
>  	COMPAT_CFLAGS += -DCOMMON_DIGEST_FOR_OPENSSL
>  	SHA1_HEADER = <CommonCrypto/CommonDigest.h>
>  else
Hmph.

So the people previously tested this must have built imap-send without blk-sha1, which not just linked with these libs but also included the <CommonCrypto/CommonDigest.h> header file and defined the -DCOMMON_DIGEST_FOR_OPENSSL preprocessor macro. Building with blk-sha1 would not have worked for them.

Now we always link with these libraries, even when building with blk-sha1. Do the COMPAT_CFLAGS and SHA1_HEADER pieces only needed when using the SHA1 digest implementation from CommonCrypto and nothing imap-send uses?

Previous: Jeremy Huddleston SequoiaNext: David Aguilar
Message 4 of 12 in “Fixes for OS X”
  1. 0/3 Fixes for OS XBrian Gernhardt, Aug 5, 2013
  2. 1/3 Makefile: Fix APPLE_COMMON_CRYPTO with BLK_SHA1Brian Gernhardt, Aug 5, 2013
  3. Jeremy Huddleston SequoiaAug 5, 2013
  4. Junio C HamanoAug 5, 2013
  5. David AguilarAug 6, 2013
  6. Junio C HamanoAug 6, 2013
  7. 2/3 OS X: Fix redeclaration of die warningBrian Gernhardt, Aug 5, 2013
  8. Jeremy Huddleston SequoiaAug 5, 2013
  9. Junio C HamanoAug 5, 2013
  10. David AguilarAug 6, 2013
  11. 3/3 t5551: Remove header from curl cookie fileBrian Gernhardt, Aug 5, 2013
  12. Dave BorowitzAug 6, 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.