{"thread":{"id":"34614","subject":"[PATCH 1/3] Makefile: Fix APPLE_COMMON_CRYPTO with BLK_SHA1","startedAt":"2013-08-05T15:59:21Z","lastAt":"2013-08-06T17:24:53Z","messageCount":12,"participants":["Brian Gernhardt","Jeremy Huddleston Sequoia","Junio C Hamano","Dave Borowitz","David Aguilar"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"224592","messageId":"1375718364-13824-1-git-send-email-brian@gernhardtsoftware.com","threadId":"34614","inReplyTo":null,"subject":"[PATCH 0/3] Fixes for OS X","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2013-08-05T15:59:21Z","receivedAt":"2013-08-05T15:59:21Z","isPatch":true,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"A few changes recently broke my build on Mac 10.8, possibly because I have a\nmore strict set of warnings/errors enabled.  The first two handle minor\nproblems with the use of APPLE_COMMON_CRYPTO, which was expanded for use in\nimap-send but had a couple of problems.\n\nThe last is likely due to curl version skew between Dave Borowitz and myself.\n(see 912b2ac).\n\nThere are a few notes on the patches indicating where I was less than sure\nabout my solutions.\n\nBrian Gernhardt (3):\n  Makefile: Fix APPLE_COMMON_CRYPTO with BLK_SHA1\n  OS X: Fix redeclaration of die warning\n  t5551: Remove header from curl cookie file\n\n Makefile              |  4 +++-\n git-compat-util.h     | 20 ++++++++++----------\n t/t5551-http-fetch.sh |  6 ++----\n 3 files changed, 15 insertions(+), 15 deletions(-)\n\n-- \n1.8.4.rc1.384.g0976a17.dirty\n"},{"id":"224589","messageId":"1375718364-13824-2-git-send-email-brian@gernhardtsoftware.com","threadId":"34614","inReplyTo":"1375718364-13824-1-git-send-email-brian@gernhardtsoftware.com","subject":"[PATCH 1/3] Makefile: Fix APPLE_COMMON_CRYPTO with BLK_SHA1","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2013-08-05T15:59:22Z","receivedAt":"2013-08-05T15:59:22Z","isPatch":true,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"It used to be that APPLE_COMMON_CRYPTO did nothing when BLK_SHA1 was\nset.  But APPLE_COMMON_CRYPTO is now used for more than just SHA1 (see\n3ef2bca) so make sure that the appropriate libraries are always set.\n\nSigned-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n---\n Makefile | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex 82f2e22..7051956 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1182,6 +1182,9 @@ ifdef NEEDS_SSL_WITH_CRYPTO\n else\n \tLIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto\n endif\n+ifdef APPLE_COMMON_CRYPTO\n+\tLIB_4_CRYPTO += -framework Security -framework CoreFoundation\n+endif\n endif\n ifdef NEEDS_LIBICONV\n \tifdef ICONVDIR\n@@ -1413,7 +1416,6 @@ ifdef PPC_SHA1\n \tLIB_H += ppc/sha1.h\n else\n ifdef APPLE_COMMON_CRYPTO\n-\tLIB_4_CRYPTO += -framework Security -framework CoreFoundation\n \tCOMPAT_CFLAGS += -DCOMMON_DIGEST_FOR_OPENSSL\n \tSHA1_HEADER = <CommonCrypto/CommonDigest.h>\n else\n-- \n1.8.4.rc1.384.g0976a17.dirty\n"},{"id":"224590","messageId":"1375718364-13824-3-git-send-email-brian@gernhardtsoftware.com","threadId":"34614","inReplyTo":"1375718364-13824-1-git-send-email-brian@gernhardtsoftware.com","subject":"[PATCH 2/3] OS X: Fix redeclaration of die warning","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2013-08-05T15:59:23Z","receivedAt":"2013-08-05T15:59:23Z","isPatch":true,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"compat/apple-common-crypto.h uses die() in one of its macros, but was\nincluded in git-compat-util.h before the definition of die.\n\nFix by simply moving the relevant block after the die/error/warning\ndeclarations.\n\nSigned-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n---\n\n Not sure if this is the best place to move it to, but it's the earliest it can\n be in the file without causing errors.  (Namely that clang has to guess what\n die() means in apple-common-crypto.h and guesses differently than the actual\n definition.)\n\n git-compat-util.h | 20 ++++++++++----------\n 1 file changed, 10 insertions(+), 10 deletions(-)\n\ndiff --git a/git-compat-util.h b/git-compat-util.h\nindex af5f6bb..d60e28d 100644\n--- a/git-compat-util.h\n+++ b/git-compat-util.h\n@@ -129,16 +129,6 @@\n #include <poll.h>\n #endif\n \n-#ifndef NO_OPENSSL\n-#ifdef APPLE_COMMON_CRYPTO\n-#include \"compat/apple-common-crypto.h\"\n-#else\n-#include <openssl/evp.h>\n-#include <openssl/hmac.h>\n-#endif /* APPLE_COMMON_CRYPTO */\n-#include <openssl/x509v3.h>\n-#endif /* NO_OPENSSL */\n-\n #if defined(__MINGW32__)\n /* pull in Windows compatibility stuff */\n #include \"compat/mingw.h\"\n@@ -340,6 +330,16 @@ extern NORETURN void die_errno(const char *err, ...) __attribute__((format (prin\n extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));\n extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));\n \n+#ifndef NO_OPENSSL\n+#ifdef APPLE_COMMON_CRYPTO\n+#include \"compat/apple-common-crypto.h\"\n+#else\n+#include <openssl/evp.h>\n+#include <openssl/hmac.h>\n+#endif /* APPLE_COMMON_CRYPTO */\n+#include <openssl/x509v3.h>\n+#endif /* NO_OPENSSL */\n+\n /*\n  * Let callers be aware of the constant return value; this can help\n  * gcc with -Wuninitialized analysis. We restrict this trick to gcc, though,\n-- \n1.8.4.rc1.384.g0976a17.dirty\n"},{"id":"224591","messageId":"1375718364-13824-4-git-send-email-brian@gernhardtsoftware.com","threadId":"34614","inReplyTo":"1375718364-13824-1-git-send-email-brian@gernhardtsoftware.com","subject":"[PATCH 3/3] t5551: Remove header from curl cookie file","fromName":"Brian Gernhardt","fromEmail":"brian@gernhardtsoftware.com","sentAt":"2013-08-05T15:59:24Z","receivedAt":"2013-08-05T15:59:24Z","isPatch":true,"sender":{"key":"brian@gernhardtsoftware.com","avatar":"https://avatars.githubusercontent.com/u/133455?v=4"},"body":"The URL included in the header appears to vary from curl version to\ncurl version.  Since we only care about the final few lines, only test\nthem.  However, make sure the blank line after the header is still\nincluded to make sure there are no extra cookie lines.\n\nSigned-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n---\n\n I suppose a sed invocation to strip out the URL or comments might be better,\n but this seemed simpler.\n\n t/t5551-http-fetch.sh | 6 ++----\n 1 file changed, 2 insertions(+), 4 deletions(-)\n\ndiff --git a/t/t5551-http-fetch.sh b/t/t5551-http-fetch.sh\nindex 287d22b..8196af1 100755\n--- a/t/t5551-http-fetch.sh\n+++ b/t/t5551-http-fetch.sh\n@@ -191,9 +191,6 @@ cat >cookies.txt <<EOF\n 127.0.0.1\tFALSE\t/smart_cookies/\tFALSE\t0\tothername\tothervalue\n EOF\n cat >expect_cookies.txt <<EOF\n-# Netscape HTTP Cookie File\n-# http://curl.haxx.se/docs/http-cookies.html\n-# This file was generated by libcurl! Edit at your own risk.\n \n 127.0.0.1\tFALSE\t/smart_cookies/\tFALSE\t0\tothername\tothervalue\n 127.0.0.1\tFALSE\t/smart_cookies/repo.git/info/\tFALSE\t0\tname\tvalue\n@@ -202,7 +199,8 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set\n \tgit config http.cookiefile cookies.txt &&\n \tgit config http.savecookies true &&\n \tgit ls-remote $HTTPD_URL/smart_cookies/repo.git master &&\n-\ttest_cmp expect_cookies.txt cookies.txt\n+\ttail -3 cookies.txt > cookies_tail.txt\n+\ttest_cmp expect_cookies.txt cookies_tail.txt\n '\n \n test -n \"$GIT_TEST_LONG\" && test_set_prereq EXPENSIVE\n-- \n1.8.4.rc1.384.g0976a17.dirty\n"},{"id":"224596","messageId":"43C3B9F4-9E43-4BE0-B683-8AF6E2E46EC6@apple.com","threadId":"34614","inReplyTo":"1375718364-13824-2-git-send-email-brian@gernhardtsoftware.com","subject":"Re: [PATCH 1/3] Makefile: Fix APPLE_COMMON_CRYPTO with BLK_SHA1","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2013-08-05T16:16:43Z","receivedAt":"2013-08-05T16:16:43Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"Thanks Brian,\n\nReviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n\nOn Aug 5, 2013, at 8:59, Brian Gernhardt <brian@gernhardtsoftware.com> wrote:\n\n> It used to be that APPLE_COMMON_CRYPTO did nothing when BLK_SHA1 was\n> set.  But APPLE_COMMON_CRYPTO is now used for more than just SHA1 (see\n> 3ef2bca) so make sure that the appropriate libraries are always set.\n> \n> Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n> ---\n> Makefile | 4 +++-\n> 1 file changed, 3 insertions(+), 1 deletion(-)\n> \n> diff --git a/Makefile b/Makefile\n> index 82f2e22..7051956 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -1182,6 +1182,9 @@ ifdef NEEDS_SSL_WITH_CRYPTO\n> else\n> \tLIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto\n> endif\n> +ifdef APPLE_COMMON_CRYPTO\n> +\tLIB_4_CRYPTO += -framework Security -framework CoreFoundation\n> +endif\n> endif\n> ifdef NEEDS_LIBICONV\n> \tifdef ICONVDIR\n> @@ -1413,7 +1416,6 @@ ifdef PPC_SHA1\n> \tLIB_H += ppc/sha1.h\n> else\n> ifdef APPLE_COMMON_CRYPTO\n> -\tLIB_4_CRYPTO += -framework Security -framework CoreFoundation\n> \tCOMPAT_CFLAGS += -DCOMMON_DIGEST_FOR_OPENSSL\n> \tSHA1_HEADER = <CommonCrypto/CommonDigest.h>\n> else\n> -- \n> 1.8.4.rc1.384.g0976a17.dirty\n> \n\n"},{"id":"224595","messageId":"64E52D7E-518B-47B4-A048-22BF326ACEF7@apple.com","threadId":"34614","inReplyTo":"1375718364-13824-3-git-send-email-brian@gernhardtsoftware.com","subject":"Re: [PATCH 2/3] OS X: Fix redeclaration of die warning","fromName":"Jeremy Huddleston Sequoia","fromEmail":"jeremyhu@apple.com","sentAt":"2013-08-05T16:17:03Z","receivedAt":"2013-08-05T16:17:03Z","isPatch":true,"sender":{"key":"jeremyhu@apple.com","avatar":"https://avatars.githubusercontent.com/u/1258676?v=4"},"body":"Thanks Brian,\n\nReviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>\n\nOn Aug 5, 2013, at 8:59, Brian Gernhardt <brian@gernhardtsoftware.com> wrote:\n\n> compat/apple-common-crypto.h uses die() in one of its macros, but was\n> included in git-compat-util.h before the definition of die.\n> \n> Fix by simply moving the relevant block after the die/error/warning\n> declarations.\n> \n> Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n> ---\n> \n> Not sure if this is the best place to move it to, but it's the earliest it can\n> be in the file without causing errors.  (Namely that clang has to guess what\n> die() means in apple-common-crypto.h and guesses differently than the actual\n> definition.)\n> \n> git-compat-util.h | 20 ++++++++++----------\n> 1 file changed, 10 insertions(+), 10 deletions(-)\n> \n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index af5f6bb..d60e28d 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -129,16 +129,6 @@\n> #include <poll.h>\n> #endif\n> \n> -#ifndef NO_OPENSSL\n> -#ifdef APPLE_COMMON_CRYPTO\n> -#include \"compat/apple-common-crypto.h\"\n> -#else\n> -#include <openssl/evp.h>\n> -#include <openssl/hmac.h>\n> -#endif /* APPLE_COMMON_CRYPTO */\n> -#include <openssl/x509v3.h>\n> -#endif /* NO_OPENSSL */\n> -\n> #if defined(__MINGW32__)\n> /* pull in Windows compatibility stuff */\n> #include \"compat/mingw.h\"\n> @@ -340,6 +330,16 @@ extern NORETURN void die_errno(const char *err, ...) __attribute__((format (prin\n> extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));\n> extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));\n> \n> +#ifndef NO_OPENSSL\n> +#ifdef APPLE_COMMON_CRYPTO\n> +#include \"compat/apple-common-crypto.h\"\n> +#else\n> +#include <openssl/evp.h>\n> +#include <openssl/hmac.h>\n> +#endif /* APPLE_COMMON_CRYPTO */\n> +#include <openssl/x509v3.h>\n> +#endif /* NO_OPENSSL */\n> +\n> /*\n>  * Let callers be aware of the constant return value; this can help\n>  * gcc with -Wuninitialized analysis. We restrict this trick to gcc, though,\n> -- \n> 1.8.4.rc1.384.g0976a17.dirty\n> \n\n"},{"id":"224609","messageId":"7v4nb4kosp.fsf@alter.siamese.dyndns.org","threadId":"34614","inReplyTo":"1375718364-13824-2-git-send-email-brian@gernhardtsoftware.com","subject":"Re: [PATCH 1/3] Makefile: Fix APPLE_COMMON_CRYPTO with BLK_SHA1","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-08-05T17:52:54Z","receivedAt":"2013-08-05T17:52:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brian Gernhardt <brian@gernhardtsoftware.com> writes:\n\n> It used to be that APPLE_COMMON_CRYPTO did nothing when BLK_SHA1 was\n> set.  But APPLE_COMMON_CRYPTO is now used for more than just SHA1 (see\n> 3ef2bca) so make sure that the appropriate libraries are always set.\n>\n> Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n> ---\n>  Makefile | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n>\n> diff --git a/Makefile b/Makefile\n> index 82f2e22..7051956 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -1182,6 +1182,9 @@ ifdef NEEDS_SSL_WITH_CRYPTO\n>  else\n>  \tLIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto\n>  endif\n> +ifdef APPLE_COMMON_CRYPTO\n> +\tLIB_4_CRYPTO += -framework Security -framework CoreFoundation\n> +endif\n>  endif\n>  ifdef NEEDS_LIBICONV\n>  \tifdef ICONVDIR\n> @@ -1413,7 +1416,6 @@ ifdef PPC_SHA1\n>  \tLIB_H += ppc/sha1.h\n>  else\n>  ifdef APPLE_COMMON_CRYPTO\n> -\tLIB_4_CRYPTO += -framework Security -framework CoreFoundation\n>  \tCOMPAT_CFLAGS += -DCOMMON_DIGEST_FOR_OPENSSL\n>  \tSHA1_HEADER = <CommonCrypto/CommonDigest.h>\n>  else\n\nHmph.\n\nSo the people previously tested this must have built imap-send\nwithout blk-sha1, which not just linked with these libs but also\nincluded the <CommonCrypto/CommonDigest.h> header file and defined\nthe -DCOMMON_DIGEST_FOR_OPENSSL preprocessor macro.  Building with\nblk-sha1 would not have worked for them.\n\nNow we always link with these libraries, even when building with\nblk-sha1.  Do the COMPAT_CFLAGS and SHA1_HEADER pieces only needed\nwhen using the SHA1 digest implementation from CommonCrypto and\nnothing imap-send uses?\n"},{"id":"224610","messageId":"7vwqo0j9us.fsf@alter.siamese.dyndns.org","threadId":"34614","inReplyTo":"1375718364-13824-3-git-send-email-brian@gernhardtsoftware.com","subject":"Re: [PATCH 2/3] OS X: Fix redeclaration of die warning","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-08-05T18:00:59Z","receivedAt":"2013-08-05T18:00:59Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Brian Gernhardt <brian@gernhardtsoftware.com> writes:\n\n> compat/apple-common-crypto.h uses die() in one of its macros, but was\n> included in git-compat-util.h before the definition of die.\n>\n> Fix by simply moving the relevant block after the die/error/warning\n> declarations.\n\nPuzzled.  What needs fixing???\n\nAhh, that one is not just making #define macros, but defining static\ninline functions.\n\nI wonder if they need to be static inlines to be duplicated at each\ncall sites in the first place.  Wouldn't it be better to create a\ncompat/something.c file to be linked with?\n\n> Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n> ---\n>\n>  Not sure if this is the best place to move it to, but it's the earliest it can\n>  be in the file without causing errors.  (Namely that clang has to guess what\n>  die() means in apple-common-crypto.h and guesses differently than the actual\n>  definition.)\n>\n>  git-compat-util.h | 20 ++++++++++----------\n>  1 file changed, 10 insertions(+), 10 deletions(-)\n>\n> diff --git a/git-compat-util.h b/git-compat-util.h\n> index af5f6bb..d60e28d 100644\n> --- a/git-compat-util.h\n> +++ b/git-compat-util.h\n> @@ -129,16 +129,6 @@\n>  #include <poll.h>\n>  #endif\n>  \n> -#ifndef NO_OPENSSL\n> -#ifdef APPLE_COMMON_CRYPTO\n> -#include \"compat/apple-common-crypto.h\"\n> -#else\n> -#include <openssl/evp.h>\n> -#include <openssl/hmac.h>\n> -#endif /* APPLE_COMMON_CRYPTO */\n> -#include <openssl/x509v3.h>\n> -#endif /* NO_OPENSSL */\n> -\n>  #if defined(__MINGW32__)\n>  /* pull in Windows compatibility stuff */\n>  #include \"compat/mingw.h\"\n> @@ -340,6 +330,16 @@ extern NORETURN void die_errno(const char *err, ...) __attribute__((format (prin\n>  extern int error(const char *err, ...) __attribute__((format (printf, 1, 2)));\n>  extern void warning(const char *err, ...) __attribute__((format (printf, 1, 2)));\n>  \n> +#ifndef NO_OPENSSL\n> +#ifdef APPLE_COMMON_CRYPTO\n> +#include \"compat/apple-common-crypto.h\"\n> +#else\n> +#include <openssl/evp.h>\n> +#include <openssl/hmac.h>\n> +#endif /* APPLE_COMMON_CRYPTO */\n> +#include <openssl/x509v3.h>\n> +#endif /* NO_OPENSSL */\n> +\n>  /*\n>   * Let callers be aware of the constant return value; this can help\n>   * gcc with -Wuninitialized analysis. We restrict this trick to gcc, though,\n"},{"id":"224634","messageId":"CAD0k6qS7_W6iG5zCOLiEtxdMV3ujAApgDykM_fnL0qiROoUv0A@mail.gmail.com","threadId":"34614","inReplyTo":"1375718364-13824-4-git-send-email-brian@gernhardtsoftware.com","subject":"Re: [PATCH 3/3] t5551: Remove header from curl cookie file","fromName":"Dave Borowitz","fromEmail":"dborowitz@google.com","sentAt":"2013-08-06T00:29:03Z","receivedAt":"2013-08-06T00:29:03Z","isPatch":true,"sender":{"key":"dborowitz@google.com","avatar":"https://avatars.githubusercontent.com/u/194927?v=4"},"body":"On Mon, Aug 5, 2013 at 8:59 AM, Brian Gernhardt\n<brian@gernhardtsoftware.com> wrote:\n>\n> The URL included in the header appears to vary from curl version to\n> curl version.  Since we only care about the final few lines, only test\n> them.  However, make sure the blank line after the header is still\n> included to make sure there are no extra cookie lines.\n>\n> Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n> ---\n>\n>  I suppose a sed invocation to strip out the URL or comments might be better,\n>  but this seemed simpler.\n>\n>  t/t5551-http-fetch.sh | 6 ++----\n>  1 file changed, 2 insertions(+), 4 deletions(-)\n>\n> diff --git a/t/t5551-http-fetch.sh b/t/t5551-http-fetch.sh\n> index 287d22b..8196af1 100755\n> --- a/t/t5551-http-fetch.sh\n> +++ b/t/t5551-http-fetch.sh\n> @@ -191,9 +191,6 @@ cat >cookies.txt <<EOF\n>  127.0.0.1      FALSE   /smart_cookies/ FALSE   0       othername       othervalue\n>  EOF\n>  cat >expect_cookies.txt <<EOF\n> -# Netscape HTTP Cookie File\n> -# http://curl.haxx.se/docs/http-cookies.html\n> -# This file was generated by libcurl! Edit at your own risk.\n>\n>  127.0.0.1      FALSE   /smart_cookies/ FALSE   0       othername       othervalue\n>  127.0.0.1      FALSE   /smart_cookies/repo.git/info/   FALSE   0       name    value\n> @@ -202,7 +199,8 @@ test_expect_success 'cookies stored in http.cookiefile when http.savecookies set\n>         git config http.cookiefile cookies.txt &&\n>         git config http.savecookies true &&\n>         git ls-remote $HTTPD_URL/smart_cookies/repo.git master &&\n> -       test_cmp expect_cookies.txt cookies.txt\n> +       tail -3 cookies.txt > cookies_tail.txt\n\nWould it make more sense to ignore comments entirely? I.e. instead of\ntaking the tail, pipe through sed 's/#.*//'.\n\nThanks for catching this by the way; you can probably guess that I\nonly checked with a single curl version.\n\n>\n> +       test_cmp expect_cookies.txt cookies_tail.txt\n>  '\n>\n>  test -n \"$GIT_TEST_LONG\" && test_set_prereq EXPENSIVE\n> --\n> 1.8.4.rc1.384.g0976a17.dirty\n>\n"},{"id":"224658","messageId":"CAJDDKr7FHs0sKH9_r=QG9hs1Rp1_QgvqXyaiTkVLFVq0xMr8=A@mail.gmail.com","threadId":"34614","inReplyTo":"7v4nb4kosp.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 1/3] Makefile: Fix APPLE_COMMON_CRYPTO with BLK_SHA1","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-08-06T11:25:43Z","receivedAt":"2013-08-06T11:25:43Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Mon, Aug 5, 2013 at 10:52 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Brian Gernhardt <brian@gernhardtsoftware.com> writes:\n>\n>> It used to be that APPLE_COMMON_CRYPTO did nothing when BLK_SHA1 was\n>> set.  But APPLE_COMMON_CRYPTO is now used for more than just SHA1 (see\n>> 3ef2bca) so make sure that the appropriate libraries are always set.\n>>\n>> Signed-off-by: Brian Gernhardt <brian@gernhardtsoftware.com>\n>> ---\n>>  Makefile | 4 +++-\n>>  1 file changed, 3 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/Makefile b/Makefile\n>> index 82f2e22..7051956 100644\n>> --- a/Makefile\n>> +++ b/Makefile\n>> @@ -1182,6 +1182,9 @@ ifdef NEEDS_SSL_WITH_CRYPTO\n>>  else\n>>       LIB_4_CRYPTO = $(OPENSSL_LINK) -lcrypto\n>>  endif\n>> +ifdef APPLE_COMMON_CRYPTO\n>> +     LIB_4_CRYPTO += -framework Security -framework CoreFoundation\n>> +endif\n>>  endif\n>>  ifdef NEEDS_LIBICONV\n>>       ifdef ICONVDIR\n>> @@ -1413,7 +1416,6 @@ ifdef PPC_SHA1\n>>       LIB_H += ppc/sha1.h\n>>  else\n>>  ifdef APPLE_COMMON_CRYPTO\n>> -     LIB_4_CRYPTO += -framework Security -framework CoreFoundation\n>>       COMPAT_CFLAGS += -DCOMMON_DIGEST_FOR_OPENSSL\n>>       SHA1_HEADER = <CommonCrypto/CommonDigest.h>\n>>  else\n>\n> Hmph.\n>\n> So the people previously tested this must have built imap-send\n> without blk-sha1, which not just linked with these libs but also\n> included the <CommonCrypto/CommonDigest.h> header file and defined\n> the -DCOMMON_DIGEST_FOR_OPENSSL preprocessor macro.  Building with\n> blk-sha1 would not have worked for them.\n> Now we always link with these libraries, even when building with\n> blk-sha1.  Do the COMPAT_CFLAGS and SHA1_HEADER pieces only needed\n> when using the SHA1 digest implementation from CommonCrypto and\n> nothing imap-send uses?\n\nLIB_4_CRYPTO is used by imap-send only, and these libraries are needed\nfor the base64 git_CC_EVP_(Encode|Decode), so unconditionally adding\nthese libraries there is correct.\n\nCOMPAT_CFLAGS and SHA1_HEADER enable the common crypto SHA1 only.\nBLK_SHA1 provides its own SHA1 so they're not needed there.\n\nI tested the tip of da/darwin (pu) w/ and w/out BLK_SHA1.\n\nTested-by: David Aguilar <davvid@gmail.com>\n-- \nDavid\n"},{"id":"224659","messageId":"CAJDDKr5_SU_yyWCyOHtP2nTYVe48e8-JOvR0hG5=WJjLBkOHWw@mail.gmail.com","threadId":"34614","inReplyTo":"7vwqo0j9us.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 2/3] OS X: Fix redeclaration of die warning","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-08-06T11:30:35Z","receivedAt":"2013-08-06T11:30:35Z","isPatch":true,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Mon, Aug 5, 2013 at 11:00 AM, Junio C Hamano <gitster@pobox.com> wrote:\n> Brian Gernhardt <brian@gernhardtsoftware.com> writes:\n>\n>> compat/apple-common-crypto.h uses die() in one of its macros, but was\n>> included in git-compat-util.h before the definition of die.\n>>\n>> Fix by simply moving the relevant block after the die/error/warning\n>> declarations.\n>\n> Puzzled.  What needs fixing???\n>\n> Ahh, that one is not just making #define macros, but defining static\n> inline functions.\n>\n> I wonder if they need to be static inlines to be duplicated at each\n> call sites in the first place.  Wouldn't it be better to create a\n> compat/something.c file to be linked with?\n\nIMO it's not worth it right now because there's only a single call\nsite (imap-send).  The moment another call site is introduced then\ncompat/apple-common-crypto.c would be the natural home for it.\n-- \nDavid\n"},{"id":"224689","messageId":"7va9kuhguy.fsf@alter.siamese.dyndns.org","threadId":"34614","inReplyTo":"CAJDDKr7FHs0sKH9_r=QG9hs1Rp1_QgvqXyaiTkVLFVq0xMr8=A@mail.gmail.com","subject":"Re: [PATCH 1/3] Makefile: Fix APPLE_COMMON_CRYPTO with BLK_SHA1","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-08-06T17:24:53Z","receivedAt":"2013-08-06T17:24:53Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"David Aguilar <davvid@gmail.com> writes:\n\n> I tested the tip of da/darwin (pu) w/ and w/out BLK_SHA1.\n>\n> Tested-by: David Aguilar <davvid@gmail.com>\n\nThanks.\n"}]}