Merge branch 'dt/http-range'
authorJeff King <peff@peff.net>
Tue, 1 Dec 2015 23:54:28 +0000 (18:54 -0500)
committerJeff King <peff@peff.net>
Tue, 1 Dec 2015 23:54:28 +0000 (18:54 -0500)
Portability fix for a topic already in 'master'.

* dt/http-range:
http: fix some printf format warnings

1  2 
http.c
diff --combined http.c
index 553d85674acac02856eac0fa19cf880993405e1b,2532976b8ea4e8070df5d6c126a5cb728956326d..7d4cb2d4483524ce7b5b02cd324424f0c740ad02
--- 1/http.c
--- 2/http.c
+++ b/http.c
@@@ -214,10 -214,10 +214,10 @@@ static int http_options(const char *var
  #endif
  #if LIBCURL_VERSION_NUM >= 0x070908
        if (!strcmp("http.sslcapath", var))
 -              return git_config_string(&ssl_capath, var, value);
 +              return git_config_pathname(&ssl_capath, var, value);
  #endif
        if (!strcmp("http.sslcainfo", var))
 -              return git_config_string(&ssl_cainfo, var, value);
 +              return git_config_pathname(&ssl_cainfo, var, value);
        if (!strcmp("http.sslcertpasswordprotected", var)) {
                ssl_cert_password_required = git_config_bool(var, value);
                return 0;
@@@ -464,17 -464,6 +464,17 @@@ static CURL *get_curl_handle(void
  
        if (curl_http_proxy) {
                curl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy);
 +#if LIBCURL_VERSION_NUM >= 0x071800
 +              if (starts_with(curl_http_proxy, "socks5"))
 +                      curl_easy_setopt(result,
 +                              CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
 +              else if (starts_with(curl_http_proxy, "socks4a"))
 +                      curl_easy_setopt(result,
 +                              CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4A);
 +              else if (starts_with(curl_http_proxy, "socks"))
 +                      curl_easy_setopt(result,
 +                              CURLOPT_PROXYTYPE, CURLPROXY_SOCKS4);
 +#endif
        }
  #if LIBCURL_VERSION_NUM >= 0x070a07
        curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY);
@@@ -1628,8 -1617,8 +1628,8 @@@ struct http_pack_request *new_http_pack
        if (prev_posn>0) {
                if (http_is_verbose)
                        fprintf(stderr,
-                               "Resuming fetch of pack %s at byte %ld\n",
-                               sha1_to_hex(target->sha1), prev_posn);
+                               "Resuming fetch of pack %s at byte %"PRIuMAX"\n",
+                               sha1_to_hex(target->sha1), (uintmax_t)prev_posn);
                http_opt_request_remainder(preq->slot->curl, prev_posn);
        }
  
@@@ -1783,8 -1772,8 +1783,8 @@@ struct http_object_request *new_http_ob
        if (prev_posn>0) {
                if (http_is_verbose)
                        fprintf(stderr,
-                               "Resuming fetch of object %s at byte %ld\n",
-                               hex, prev_posn);
+                               "Resuming fetch of object %s at byte %"PRIuMAX"\n",
+                               hex, (uintmax_t)prev_posn);
                http_opt_request_remainder(freq->slot->curl, prev_posn);
        }