Merge branch 'dl/format-patch-doc-test-cleanup'
[gitweb.git] / http.h
diff --git a/http.h b/http.h
index 32156bf7f1e52b7113041dbf5d130ba0cc0fa382..5e0ad724f92f3c708d2b330bb689f6eef6bb8de4 100644 (file)
--- a/http.h
+++ b/http.h
 #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)
@@ -104,7 +108,7 @@ void step_active_slots(void);
 #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);
 
@@ -147,10 +151,10 @@ void normalize_curl_result(CURLcode *result, long http_code, char *errorstr,
 
 /* 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 {
@@ -208,7 +212,7 @@ int http_fetch_ref(const char *base, struct ref *ref);
 
 /* 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;
@@ -234,7 +238,7 @@ struct http_object_request {
        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;