From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH 5/4] curl: remove ifdef'd code never used with curl >=7.19.4
Date: Wed, 9 Aug 2017 13:49:37 +0000 [thread overview]
Message-ID: <20170809134937.10725-1-avarab@gmail.com> (raw)
In-Reply-To: <20170809133844.3h7plxm6nzoheckv@sigill.intra.peff.net>
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>
---
On Wed, Aug 9, 2017 at 3:38 PM, Jeff King <peff@peff.net> wrote:
> On Wed, Aug 09, 2017 at 03:14:22PM +0200, Ævar Arnfjörð Bjarmason wrote:
>
>> This whole series looks good to me. As I commented on in the thread you
>> referenced in 0/4 I think this is the right trade-off, and people like
>> me who occasionally compile git on older systems can just easily package
>> a newer curl as well if we need it.
>>
>> My reading of the curl history/docs is that you should squash this into
>> this last patch. It's code that's now dead since we require
>> 7.19.4.
>>
>> CURLAUTH_DIGEST_IE was added in 7.19.3, and as a comment this squash
>> removes indicates CURLOPT_USE_SSL hasn't been needed since 7.16.4:
>> https://curl.haxx.se/libcurl/c/CURLOPT_USE_SSL.html
>
> Thanks. Do you mind formatting this as a patch on top instead of a
> squash? I think it's sufficiently subtle that it should be separate from
> the main cleanup, which is just dropping our own internal #ifdefs.
No problem. Here it is. Intended to be placed after your 4/4 since the
commit message references the new error message in http.h.
http.c | 4 ----
http.h | 9 ---------
2 files changed, 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 29acfe8c55..66d2d3c539 100644
--- a/http.h
+++ b/http.h
@@ -16,15 +16,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;
--
2.14.0.rc1.383.gd1ce394fe2
next prev parent reply other threads:[~2017-08-09 13:49 UTC|newest]
Thread overview: 173+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-09 12:00 [PATCH 0/4] dropping support for older curl Jeff King
2017-08-09 12:01 ` [PATCH 1/4] http: drop support for curl < 7.11.1 Jeff King
2017-08-09 12:01 ` [PATCH 2/4] http: drop support for curl < 7.16.0 Jeff King
2017-08-09 17:29 ` Stefan Beller
2017-08-09 21:13 ` Jeff King
2017-08-09 17:40 ` Junio C Hamano
2017-08-09 18:03 ` Nicolas Morey-Chaisemartin
2017-08-09 21:17 ` Jeff King
2017-08-09 21:29 ` Nicolas Morey-Chaisemartin
2017-08-09 21:49 ` Jeff King
2017-08-09 21:15 ` Jeff King
2017-08-09 12:02 ` [PATCH 3/4] http: drop support for curl < 7.19.4 Jeff King
2017-08-09 13:14 ` Ævar Arnfjörð Bjarmason
2017-08-09 13:38 ` Jeff King
2017-08-09 13:49 ` Ævar Arnfjörð Bjarmason [this message]
2017-08-09 17:34 ` Stefan Beller
2017-08-09 21:19 ` Jeff King
2017-08-10 12:36 ` Mischa POSLAWSKY
2017-08-10 17:34 ` Jeff King
2017-08-09 12:02 ` [PATCH 4/4] http: #error on too-old curl Jeff King
2017-08-09 17:37 ` Stefan Beller
2017-08-09 21:42 ` [PATCH 0/4] dropping support for older curl Johannes Schindelin
2017-08-09 21:47 ` Jeff King
2017-08-10 9:01 ` Tom G. Christensen
2017-08-10 9:36 ` Johannes Schindelin
2017-08-10 21:33 ` Jeff King
2017-08-10 22:17 ` Junio C Hamano
2017-08-10 23:09 ` Jeff King
2017-08-11 0:17 ` Jeff King
[not found] ` <CAHVLzcnnrABmkYNg31Aq99NgBbyuCKEM60pHGygyjXbjmaUEYQ@mail.gmail.com>
2017-08-14 21:50 ` Johannes Schindelin
2017-08-10 20:33 ` Tom G. Christensen
2017-08-10 21:32 ` Jeff King
2017-08-10 22:23 ` Tom G. Christensen
2017-08-10 22:54 ` Jeff King
2017-08-10 23:17 ` Tom G. Christensen
2017-08-10 23:23 ` Jeff King
2017-08-10 23:36 ` Tom G. Christensen
2017-08-11 16:37 ` [PATCH 0/2] http: handle curl with vendor backports Tom G. Christensen
2017-08-11 22:15 ` Junio C Hamano
2017-08-12 6:20 ` Tom G. Christensen
2017-08-20 8:47 ` Jeff King
2017-08-20 16:28 ` Junio C Hamano
2017-08-23 15:41 ` Jeff King
2017-08-11 16:37 ` [PATCH 1/2] http: Fix handling of missing CURLPROTO_* Tom G. Christensen
2017-08-12 0:30 ` Junio C Hamano
2017-08-12 9:04 ` Tom G. Christensen
2017-08-20 8:59 ` Jeff King
2017-08-11 16:37 ` [PATCH 2/2] http: use a feature check to enable GSSAPI delegation control Tom G. Christensen
2017-08-09 23:39 ` [PATCH 0/4] dropping support for older curl Ævar Arnfjörð Bjarmason
[not found] ` <87zib8g8ub.fsf@gmail.com>
2017-08-10 10:04 ` Dropping support for older perl Tom G. Christensen
2021-07-21 22:22 ` [PATCH v2 0/5] drop support for ancient curl Ævar Arnfjörð Bjarmason
2021-07-21 22:22 ` [PATCH v2 1/5] http: drop support for curl < 7.11.1 Ævar Arnfjörð Bjarmason
2021-07-21 22:56 ` Junio C Hamano
2021-07-21 22:22 ` [PATCH v2 2/5] http: drop support for curl < 7.16.0 Ævar Arnfjörð Bjarmason
2021-07-21 22:22 ` [PATCH v2 3/5] http: drop support for curl < 7.19.4 Ævar Arnfjörð Bjarmason
2021-07-21 23:05 ` Junio C Hamano
2021-07-21 22:22 ` [PATCH v2 4/5] http: drop support for curl < 7.19.3 and < 7.16.4 (again) Ævar Arnfjörð Bjarmason
2021-07-21 23:17 ` Junio C Hamano
2021-07-21 22:22 ` [PATCH v2 5/5] http: rename CURLOPT_FILE to CURLOPT_WRITEDATA Ævar Arnfjörð Bjarmason
2021-07-21 23:19 ` Junio C Hamano
2021-07-21 22:39 ` [PATCH v2 0/5] drop support for ancient curl Junio C Hamano
2021-07-21 22:56 ` brian m. carlson
2021-07-22 7:09 ` Ævar Arnfjörð Bjarmason
2021-07-22 22:56 ` brian m. carlson
2021-07-23 7:17 ` Ævar Arnfjörð Bjarmason
2021-07-22 6:27 ` Bagas Sanjaya
2021-07-23 10:16 ` Jeff King
2021-07-23 16:21 ` Junio C Hamano
2021-07-23 16:49 ` Randall S. Becker
2021-07-24 1:19 ` Jeff King
2021-07-30 9:31 ` [PATCH v3 0/7] drop support for ancient curl, improve version checks Ævar Arnfjörð Bjarmason
2021-07-30 9:31 ` [PATCH v3 1/7] http: drop support for curl < 7.11.1 Ævar Arnfjörð Bjarmason
2021-07-30 9:31 ` [PATCH v3 2/7] http: drop support for curl < 7.16.0 Ævar Arnfjörð Bjarmason
2021-07-30 9:31 ` [PATCH v3 3/7] http: drop support for curl < 7.19.4 Ævar Arnfjörð Bjarmason
2021-07-30 9:31 ` [PATCH v3 4/7] http: drop support for curl < 7.19.3 and <= 7.16.4 (or <7.17.0) (again) Ævar Arnfjörð Bjarmason
2021-07-30 16:18 ` Junio C Hamano
2021-07-30 9:31 ` [PATCH v3 5/7] http: drop support for curl < 7.18.0 (again) Ævar Arnfjörð Bjarmason
2021-07-30 16:22 ` Junio C Hamano
2021-07-30 9:31 ` [PATCH v3 6/7] http: rename CURLOPT_FILE to CURLOPT_WRITEDATA Ævar Arnfjörð Bjarmason
2021-07-30 9:31 ` [PATCH v3 7/7] http: centralize the accounting of libcurl dependencies Ævar Arnfjörð Bjarmason
2021-07-30 16:47 ` Junio C Hamano
2021-07-30 17:59 ` [PATCH v4 0/5] drop support for ancient curl Ævar Arnfjörð Bjarmason
2021-07-30 17:59 ` [PATCH v4 1/5] http: drop support for curl < 7.11.1 Ævar Arnfjörð Bjarmason
2021-07-30 17:59 ` [PATCH v4 2/5] http: drop support for curl < 7.16.0 Ævar Arnfjörð Bjarmason
2021-09-10 22:28 ` Andrei Rybak
2021-09-11 14:32 ` Jeff King
2021-09-11 21:39 ` Junio C Hamano
2021-09-11 21:58 ` Jeff King
2021-07-30 17:59 ` [PATCH v4 3/5] http: drop support for curl < 7.19.4 Ævar Arnfjörð Bjarmason
2021-07-30 17:59 ` [PATCH v4 4/5] http: drop support for curl < 7.19.3 and < 7.17.0 (again) Ævar Arnfjörð Bjarmason
2021-07-30 17:59 ` [PATCH v4 5/5] http: rename CURLOPT_FILE to CURLOPT_WRITEDATA Ævar Arnfjörð Bjarmason
2021-07-30 19:03 ` [PATCH v4 0/5] drop support for ancient curl Junio C Hamano
2021-07-30 19:50 ` Junio C Hamano
2021-07-30 22:49 ` Junio C Hamano
2021-09-08 15:31 ` [PATCH 0/5] post-v2.33 "drop support for ancient curl" follow-up Ævar Arnfjörð Bjarmason
2021-09-08 15:31 ` [PATCH 1/5] http: drop support for curl < 7.18.0 (again) Ævar Arnfjörð Bjarmason
2021-09-09 22:58 ` Junio C Hamano
2021-09-08 15:31 ` [PATCH 2/5] http: correct curl version check for CURLOPT_PINNEDPUBLICKEY Ævar Arnfjörð Bjarmason
2021-09-08 19:22 ` Jeff King
2021-09-09 23:12 ` Junio C Hamano
2021-09-10 14:19 ` Jeff King
2021-09-10 14:30 ` Jeff King
2021-09-10 14:37 ` Ævar Arnfjörð Bjarmason
2021-09-10 15:28 ` Jeff King
2021-09-10 15:45 ` Daniel Stenberg
2021-09-10 19:41 ` Ævar Arnfjörð Bjarmason
2021-09-10 21:57 ` Daniel Stenberg
2021-09-08 15:31 ` [PATCH 3/5] http: correct version check for CURL_HTTP_VERSION_2_0 Ævar Arnfjörð Bjarmason
2021-09-08 19:27 ` Jeff King
2021-09-08 15:31 ` [PATCH 4/5] http: centralize the accounting of libcurl dependencies Ævar Arnfjörð Bjarmason
2021-09-08 19:31 ` Jeff King
2021-09-09 17:40 ` Junio C Hamano
2021-09-09 19:26 ` Jeff King
2021-09-08 15:31 ` [PATCH 5/5] http: don't hardcode the value of CURL_SOCKOPT_OK Ævar Arnfjörð Bjarmason
2021-09-09 23:15 ` Junio C Hamano
2021-09-09 23:22 ` Junio C Hamano
2021-09-08 19:32 ` [PATCH 0/5] post-v2.33 "drop support for ancient curl" follow-up Jeff King
2021-09-10 11:04 ` [PATCH v2 0/8] " Ævar Arnfjörð Bjarmason
2021-09-10 11:04 ` [PATCH v2 1/8] INSTALL: don't mention the "curl" executable at all Ævar Arnfjörð Bjarmason
2021-09-10 14:53 ` Jeff King
2021-09-10 11:04 ` [PATCH v2 2/8] INSTALL: mention that we need libcurl 7.19.4 or newer to build Ævar Arnfjörð Bjarmason
2021-09-10 14:54 ` Jeff King
2021-09-10 16:56 ` Junio C Hamano
2021-09-10 17:46 ` Jeff King
2021-09-10 11:04 ` [PATCH v2 3/8] Makefile: drop support for curl < 7.9.8 (again) Ævar Arnfjörð Bjarmason
2021-09-10 15:04 ` Jeff King
2021-09-10 11:04 ` [PATCH v2 4/8] http: drop support for curl < 7.18.0 (again) Ævar Arnfjörð Bjarmason
2021-09-10 11:04 ` [PATCH v2 5/8] http: correct version check for CURL_HTTP_VERSION_2 Ævar Arnfjörð Bjarmason
2021-09-10 15:09 ` Jeff King
2021-09-10 15:20 ` Daniel Stenberg
2021-09-10 15:41 ` Jeff King
2021-09-10 17:19 ` Ævar Arnfjörð Bjarmason
2021-09-10 11:04 ` [PATCH v2 6/8] http: correct curl version check for CURLOPT_PINNEDPUBLICKEY Ævar Arnfjörð Bjarmason
2021-09-10 17:00 ` Junio C Hamano
2021-09-10 11:04 ` [PATCH v2 7/8] http: centralize the accounting of libcurl dependencies Ævar Arnfjörð Bjarmason
2021-09-10 15:15 ` Jeff King
2021-09-10 11:04 ` [PATCH v2 8/8] http: don't hardcode the value of CURL_SOCKOPT_OK Ævar Arnfjörð Bjarmason
2021-09-10 15:17 ` Jeff King
2021-09-10 14:37 ` [PATCH v2 0/8] post-v2.33 "drop support for ancient curl" follow-up Jeff King
2021-09-10 15:08 ` Ævar Arnfjörð Bjarmason
2021-09-10 15:20 ` Jeff King
2021-09-10 16:52 ` Junio C Hamano
2021-09-10 17:06 ` Randall S. Becker
2021-09-10 17:42 ` Ævar Arnfjörð Bjarmason
2021-09-10 17:14 ` Junio C Hamano
2021-09-10 17:32 ` Junio C Hamano
2021-09-10 19:05 ` Konstantin Ryabitsev
2021-09-10 19:49 ` Junio C Hamano
2021-09-10 17:47 ` Ævar Arnfjörð Bjarmason
2021-09-11 9:34 ` [PATCH v3 0/9] " Ævar Arnfjörð Bjarmason
2021-09-11 9:34 ` [PATCH v3 1/9] INSTALL: don't mention the "curl" executable at all Ævar Arnfjörð Bjarmason
2021-09-11 9:34 ` [PATCH v3 2/9] INSTALL: reword and copy-edit the "libcurl" section Ævar Arnfjörð Bjarmason
2021-09-11 9:34 ` [PATCH v3 3/9] INSTALL: mention that we need libcurl 7.19.4 or newer to build Ævar Arnfjörð Bjarmason
2021-09-11 9:34 ` [PATCH v3 4/9] Makefile: drop support for curl < 7.9.8 (again) Ævar Arnfjörð Bjarmason
2021-09-11 9:34 ` [PATCH v3 5/9] http: drop support for curl < 7.18.0 (again) Ævar Arnfjörð Bjarmason
2021-09-11 9:34 ` [PATCH v3 6/9] http: correct version check for CURL_HTTP_VERSION_2 Ævar Arnfjörð Bjarmason
2021-09-11 9:34 ` [PATCH v3 7/9] http: correct curl version check for CURLOPT_PINNEDPUBLICKEY Ævar Arnfjörð Bjarmason
2021-09-11 9:34 ` [PATCH v3 8/9] http: centralize the accounting of libcurl dependencies Ævar Arnfjörð Bjarmason
2021-09-11 9:34 ` [PATCH v3 9/9] http: don't hardcode the value of CURL_SOCKOPT_OK Ævar Arnfjörð Bjarmason
2021-09-11 14:46 ` [PATCH v3 0/9] post-v2.33 "drop support for ancient curl" follow-up Jeff King
2021-09-12 19:01 ` Junio C Hamano
2021-09-13 14:51 ` [PATCH v4 " Ævar Arnfjörð Bjarmason
2021-09-13 14:51 ` [PATCH v4 1/9] INSTALL: don't mention the "curl" executable at all Ævar Arnfjörð Bjarmason
2021-09-13 14:51 ` [PATCH v4 2/9] INSTALL: reword and copy-edit the "libcurl" section Ævar Arnfjörð Bjarmason
2021-09-13 14:51 ` [PATCH v4 3/9] INSTALL: mention that we need libcurl 7.19.4 or newer to build Ævar Arnfjörð Bjarmason
2021-09-13 14:51 ` [PATCH v4 4/9] Makefile: drop support for curl < 7.9.8 (again) Ævar Arnfjörð Bjarmason
2021-09-13 14:51 ` [PATCH v4 5/9] http: drop support for curl < 7.18.0 (again) Ævar Arnfjörð Bjarmason
2021-09-13 14:51 ` [PATCH v4 6/9] http: correct version check for CURL_HTTP_VERSION_2 Ævar Arnfjörð Bjarmason
2021-09-13 14:51 ` [PATCH v4 7/9] http: correct curl version check for CURLOPT_PINNEDPUBLICKEY Ævar Arnfjörð Bjarmason
2021-09-13 14:51 ` [PATCH v4 8/9] http: centralize the accounting of libcurl dependencies Ævar Arnfjörð Bjarmason
2021-09-13 14:51 ` [PATCH v4 9/9] http: don't hardcode the value of CURL_SOCKOPT_OK Ævar Arnfjörð Bjarmason
2021-09-13 17:02 ` [PATCH v4 0/9] post-v2.33 "drop support for ancient curl" follow-up Jeff King
2021-09-13 17:41 ` Junio C Hamano
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=20170809134937.10725-1-avarab@gmail.com \
--to=avarab@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).