Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2021-07-30 12:31:53 +0300
committerJunio C Hamano <gitster@pobox.com>2021-07-30 19:11:15 +0300
commit1119a15b5c8521e75c412a129cd6318285cac773 (patch)
tree5eb6bf241db6b5e6653c35e7769f74694055ab56 /http.h
parentebf3c04b262aa27fbb97f8a0156c2347fecafafb (diff)
http: drop support for curl < 7.11.1
Drop support for this ancient version of curl and simplify the code by allowing us get rid of some "#ifdef"'s. Git will not build with vanilla curl older than 7.11.1 due our use of CURLOPT_POSTFIELDSIZE in 37ee680d9b (http.postbuffer: allow full range of ssize_t values, 2017-04-11). This field was introduced in curl 7.11.1. We could solve these compilation problems with more #ifdefs, but it's not worth the trouble. Version 7.11.1 came out in March of 2004, over 17 years ago. Let's declare that too old and drop any existing ifdefs that go further back. One obvious benefit is that we'll have fewer conditional bits cluttering the code. This patch drops all #ifdefs that reference older versions (note that curl's preprocessor macros are in hex, so we're looking for 070b01, not 071101). 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.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/http.h b/http.h
index bf3d1270ad..d2f8cc5661 100644
--- a/http.h
+++ b/http.h
@@ -22,13 +22,7 @@
#define DEFAULT_MAX_REQUESTS 5
#endif
-#if LIBCURL_VERSION_NUM < 0x070704
-#define curl_global_cleanup() do { /* nothing */ } while (0)
-#endif
-
-#if LIBCURL_VERSION_NUM < 0x070800
-#define curl_global_init(a) do { /* nothing */ } while (0)
-#elif LIBCURL_VERSION_NUM >= 0x070c00
+#if LIBCURL_VERSION_NUM >= 0x070c00
#define curl_global_init(a) curl_global_init_mem(a, xmalloc, free, \
xrealloc, xstrdup, xcalloc)
#endif
@@ -37,10 +31,6 @@
#define NO_CURL_EASY_DUPHANDLE
#endif
-#if LIBCURL_VERSION_NUM < 0x070a03
-#define CURLE_HTTP_RETURNED_ERROR CURLE_HTTP_NOT_FOUND
-#endif
-
#if LIBCURL_VERSION_NUM < 0x070c03
#define NO_CURL_IOCTL
#endif