summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2017-08-09 13:49:37 +0000
committerJunio C Hamano <gitster@pobox.com>2017-08-09 10:42:38 -0700
commitf93c0b11a7c4654bd0a2fc7b74849a778c204b83 (patch)
tree924528fe183d42590e03783f707d0bc62a5ee34b
parentbab28fe04b9c52da3b036bb69d8323bb6a536ded (diff)
downloadgit-f93c0b11a7c4654bd0a2fc7b74849a778c204b83.tar.gz
curl: remove ifdef'd code never used with curl >=7.19.4
As the LIBCURL_VERSION_NUM check at the top of http.h shows we require curl >= 7.19.4. This means we can remove previously added ifdef's needed to support older curl versions. The CURLAUTH_DIGEST_IE macro conditionally used since [1] was added in 7.19.3 (see CURLOPT_HTTPAUTH(3)). The CURLOPT_USE_SSL macro used since [2] was added in 7.16.4 (see CURLOPT_USE_SSL(3)). 1. 40a18fc77c ("http: add an "auto" mode for http.emptyauth", 2017-02-25) 2. 4bc444eb64 ("Support FTP-over-SSL/TLS for regular FTP", 2013-04-07) Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--http.c4
-rw-r--r--http.h9
2 files changed, 0 insertions, 13 deletions
diff --git a/http.c b/http.c
index 5280511c74..527bc56dc2 100644
--- a/http.c
+++ b/http.c
@@ -103,9 +103,7 @@ static int http_auth_methods_restricted;
/* Modes for which empty_auth cannot actually help us. */
static unsigned long empty_auth_useless =
CURLAUTH_BASIC
-#ifdef CURLAUTH_DIGEST_IE
| CURLAUTH_DIGEST_IE
-#endif
| CURLAUTH_DIGEST;
static struct curl_slist *pragma_header;
@@ -706,10 +704,8 @@ static CURL *get_curl_handle(void)
if (curl_ftp_no_epsv)
curl_easy_setopt(result, CURLOPT_FTP_USE_EPSV, 0);
-#ifdef CURLOPT_USE_SSL
if (curl_ssl_try)
curl_easy_setopt(result, CURLOPT_USE_SSL, CURLUSESSL_TRY);
-#endif
/*
* CURL also examines these variables as a fallback; but we need to query
diff --git a/http.h b/http.h
index da4d8589d8..c4e2e78b6b 100644
--- a/http.h
+++ b/http.h
@@ -12,15 +12,6 @@
#define DEFAULT_MAX_REQUESTS 5
-/*
- * CURLOPT_USE_SSL was known as CURLOPT_FTP_SSL up to 7.16.4,
- * and the constants were known as CURLFTPSSL_*
-*/
-#if !defined(CURLOPT_USE_SSL) && defined(CURLOPT_FTP_SSL)
-#define CURLOPT_USE_SSL CURLOPT_FTP_SSL
-#define CURLUSESSL_TRY CURLFTPSSL_TRY
-#endif
-
struct slot_results {
CURLcode curl_result;
long http_code;