1 #ifndef GIT_CURL_COMPAT_H
2 #define GIT_CURL_COMPAT_H
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
11 * The oldest supported version of curl is documented in the "INSTALL"
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/).
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.
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
27 * Keep any symbols in date order of when their support was
28 * introduced, oldest first, in the official version of cURL library.
32 * Versions before curl 7.66.0 (September 2019) required manually setting the
33 * transfer-encoding for a streaming POST; after that this is handled
36 #if LIBCURL_VERSION_NUM < 0x074200
37 #define GIT_CURL_NEED_TRANSFER_ENCODING_HEADER
41 * CURLOPT_PROTOCOLS_STR and CURLOPT_REDIR_PROTOCOLS_STR were added in 7.85.0,
42 * released in August 2022.
44 #if LIBCURL_VERSION_NUM >= 0x075500
45 #define GIT_CURL_HAVE_CURLOPT_PROTOCOLS_STR 1