#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
+#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)
#endif
void http_init(struct remote *remote, const char *url,
- int proactive_auth);
+ int proactive_auth);
void http_cleanup(void);
struct curl_slist *http_copy_default_headers(void);
/* Helpers for modifying and creating URLs */
void append_remote_object_url(struct strbuf *buf, const char *url,
- const char *hex,
- int only_two_digit_prefix);
+ const char *hex,
+ int only_two_digit_prefix);
char *get_remote_object_url(const char *url, const char *hex,
- int only_two_digit_prefix);
+ int only_two_digit_prefix);
/* Options for http_get_*() */
struct http_get_options {
/* Helpers for fetching packs */
int http_get_info_packs(const char *base_url,
- struct packed_git **packs_head);
+ struct packed_git **packs_head);
struct http_pack_request {
char *url;
long http_code;
struct object_id oid;
struct object_id real_oid;
- git_SHA_CTX c;
+ git_hash_ctx c;
git_zstream stream;
int zret;
int rename;