imap-send: use curl by default when possible
authorNicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
Thu, 14 Sep 2017 07:52:11 +0000 (09:52 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Sep 2017 04:46:19 +0000 (13:46 +0900)
Set curl as the runtime default when it is available.
When linked against older curl versions (< 7_34_0) or without curl,
use the legacy imap implementation.

The goal is to validate feature parity between the legacy and
the curl implementation, deprecate the legacy implementation
later on and in the long term, hopefully drop it altogether.

Signed-off-by: Nicolas Morey-Chaisemartin <nicolas@morey-chaisemartin.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
imap-send.c
index dd203da8315e64bec8a27f3c0892b14661bc0f6b..8c785f3ca20c52266d7f99ca0d306a324756ede8 100644 (file)
@@ -35,11 +35,11 @@ typedef void *SSL;
 #include "http.h"
 #endif
 
-#if defined(USE_CURL_FOR_IMAP_SEND) && defined(NO_OPENSSL)
-/* only available option */
+#if defined(USE_CURL_FOR_IMAP_SEND)
+/* Always default to curl if it's available. */
 #define USE_CURL_DEFAULT 1
 #else
-/* strictly opt in */
+/* We don't have curl, so continue to use the historical implementation */
 #define USE_CURL_DEFAULT 0
 #endif