summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2021-07-30 09:31:54 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-07-30 16:11:15 (GMT)
commit013c7e2b070f5b69d6585b0c18426a959f1bf739 (patch)
treec82e79c6ef3b55bf8cfbedb7ee7bd1190826e579 /http.h
parent1119a15b5c8521e75c412a129cd6318285cac773 (diff)
downloadgit-013c7e2b070f5b69d6585b0c18426a959f1bf739.zip
git-013c7e2b070f5b69d6585b0c18426a959f1bf739.tar.gz
git-013c7e2b070f5b69d6585b0c18426a959f1bf739.tar.bz2
http: drop support for curl < 7.16.0
In the last commit we dropped support for curl < 7.11.1, let's continue that and drop support for versions older than 7.16.0. This allows us to get rid of some now-obsolete #ifdefs. Choosing 7.16.0 is a somewhat arbitrary cutoff: 1. It came out in October of 2006, almost 15 years ago. Besides being a nice round number, around 10 years is a common end-of-life support period, even for conservative distributions. 2. That version introduced the curl_multi interface, which gives us a lot of bang for the buck in removing #ifdefs RHEL 5 came with curl 7.15.5[1] (released in August 2006). RHEL 5's extended life cycle program ended on 2020-11-30[1]. RHEL 6 comes with curl 7.19.7 (released in November 2009), and RHEL 7 comes with 7.29.0 (released in February 2013). 1. http://lore.kernel.org/git/873e1f31-2a96-5b72-2f20-a5816cad1b51@jupiterrise.com Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
-rw-r--r--http.h25
1 files changed, 1 insertions, 24 deletions
diff --git a/http.h b/http.h
index d2f8cc5..cb09262 100644
--- a/http.h
+++ b/http.h
@@ -10,31 +10,12 @@
#include "remote.h"
#include "url.h"
-/*
- * We detect based on the cURL version if multi-transfer is
- * usable in this implementation and define this symbol accordingly.
- * This shouldn't be set by the Makefile or by the user (e.g. via CFLAGS).
- */
-#undef USE_CURL_MULTI
-
-#if LIBCURL_VERSION_NUM >= 0x071000
-#define USE_CURL_MULTI
#define DEFAULT_MAX_REQUESTS 5
-#endif
-
-#if LIBCURL_VERSION_NUM >= 0x070c00
-#define curl_global_init(a) curl_global_init_mem(a, xmalloc, free, \
- xrealloc, xstrdup, xcalloc)
-#endif
-#if (LIBCURL_VERSION_NUM < 0x070c04) || (LIBCURL_VERSION_NUM == 0x071000)
+#if LIBCURL_VERSION_NUM == 0x071000
#define NO_CURL_EASY_DUPHANDLE
#endif
-#if LIBCURL_VERSION_NUM < 0x070c03
-#define NO_CURL_IOCTL
-#endif
-
/*
* CURLOPT_USE_SSL was known as CURLOPT_FTP_SSL up to 7.16.4,
* and the constants were known as CURLFTPSSL_*
@@ -72,9 +53,7 @@ struct buffer {
size_t fread_buffer(char *ptr, size_t eltsize, size_t nmemb, void *strbuf);
size_t fwrite_buffer(char *ptr, size_t eltsize, size_t nmemb, void *strbuf);
size_t fwrite_null(char *ptr, size_t eltsize, size_t nmemb, void *strbuf);
-#ifndef NO_CURL_IOCTL
curlioerr ioctl_buffer(CURL *handle, int cmd, void *clientp);
-#endif
/* Slot lifecycle functions */
struct active_request_slot *get_active_slot(void);
@@ -91,11 +70,9 @@ void finish_all_active_slots(void);
int run_one_slot(struct active_request_slot *slot,
struct slot_results *results);
-#ifdef USE_CURL_MULTI
void fill_active_slots(void);
void add_fill_function(void *data, int (*fill)(void *));
void step_active_slots(void);
-#endif
void http_init(struct remote *remote, const char *url,
int proactive_auth);