Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/git-curl-compat.h # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / git-curl-compat.h` 85 lines ยท 2465 bytes Raw Blame History 1 #ifndef GIT_CURL_COMPAT_H 2 #define GIT_CURL_COMPAT_H 3 #include 4 5 /** 6 * This header centralizes the declaration of our libcurl dependencies 7 * to make it easy to discover the oldest versions we support, and to 8 * inform decisions about removing support for older libcurl in the 9 * future. 10 * 11 * The oldest supported version of curl is documented in the "INSTALL" 12 * document. 13 * 14 * The source of truth for what versions have which symbols is 15 * https://github.com/curl/curl/blob/master/docs/libcurl/symbols-in-versions; 16 * the release dates are taken from curl.git (at 17 * https://github.com/curl/curl/). 18 * 19 * For each X symbol we need from curl we define our own 20 * GIT_CURL_HAVE_X. If multiple similar symbols with the same prefix 21 * were defined in the same version we pick one and check for that name. 22 * 23 * We may also define a missing CURL_* symbol to its known value, if 24 * doing so is sufficient to add support for it to older versions that 25 * don't have it. 26 * 27 * Keep any symbols in date order of when their support was 28 * introduced, oldest first, in the official version of cURL library. 29 */ 30 31 /** 32 * curl_url() interface added in 7.62.0 (October 2018) 33 */ 34 #if LIBCURL_VERSION_NUM >= 0x073e00 35 #define GIT_CURL_HAVE_CURL_URL 36 #endif 37 38 /** 39 * Versions before curl 7.66.0 (September 2019) required manually setting the 40 * transfer-encoding for a streaming POST; after that this is handled 41 * automatically. 42 */ 43 #if LIBCURL_VERSION_NUM < 0x074200 44 #define GIT_CURL_NEED_TRANSFER_ENCODING_HEADER 45 #endif 46 47 /** 48 * CURLINFO_RETRY_AFTER was added in 7.66.0, released in September 2019. 49 * It allows curl to automatically parse Retry-After headers. 50 */ 51 #if LIBCURL_VERSION_NUM >= 0x074200 52 #define GIT_CURL_HAVE_CURLINFO_RETRY_AFTER 1 53 #endif 54 55 /** 56 * CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR were added in 7.85.0, 57 * released in August 2022. 58 */ 59 #if LIBCURL_VERSION_NUM >= 0x075500 60 #define GIT_CURL_HAVE_CURLOPT_PROTOCOLS_STR 1 61 #endif 62 63 /** 64 * curl_global_trace() was added in 8.3.0, released September 2023. 65 */ 66 #if LIBCURL_VERSION_NUM >= 0x080300 67 #define GIT_CURL_HAVE_GLOBAL_TRACE 1 68 #endif 69 70 /** 71 * CURLOPT_TCP_KEEPCNT was added in 8.9.0, released in July, 2024. 72 */ 73 #if LIBCURL_VERSION_NUM >= 0x080900 74 #define GIT_CURL_HAVE_CURLOPT_TCP_KEEPCNT 75 #endif 76 77 /** 78 * CURLOPT_UPLOAD_FLAGS and CURLULFLAG_* were added in 8.13.0, 79 * released in April 2025. 80 */ 81 #if LIBCURL_VERSION_NUM >= 0x080D00 82 #define GIT_CURL_HAVE_CURLOPT_UPLOAD_FLAGS 83 #endif 84 85 #endif