diff --git a/http.c b/http.c index d50ead0088cd55..21a2a72902a79a 100644 --- a/http.c +++ b/http.c @@ -420,6 +420,17 @@ static CURL *get_curl_handle(void) curl_easy_setopt(result, CURLOPT_PROXY, curl_http_proxy); #if LIBCURL_VERSION_NUM >= 0x070a07 curl_easy_setopt(result, CURLOPT_PROXYAUTH, CURLAUTH_ANY); +#endif +#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 } diff --git a/imap-send.c b/imap-send.c index d69887da5a8530..ddb01e114eb8e9 100644 --- a/imap-send.c +++ b/imap-send.c @@ -1414,11 +1414,15 @@ static CURL *setup_curl(struct imap_server_conf *srvc) curl_easy_setopt(curl, CURLOPT_PORT, server.port); if (server.auth_method) { +#if LIBCURL_VERSION_NUM < 0x072200 + warning("No LOGIN_OPTIONS support in this cURL version"); +#else struct strbuf auth = STRBUF_INIT; strbuf_addstr(&auth, "AUTH="); strbuf_addstr(&auth, server.auth_method); curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, auth.buf); strbuf_release(&auth); +#endif } if (!server.use_ssl) diff --git a/wrap-for-bin.sh b/wrap-for-bin.sh index 701d2339b9f501..a151c95d4c4c00 100644 --- a/wrap-for-bin.sh +++ b/wrap-for-bin.sh @@ -19,4 +19,11 @@ GIT_TEXTDOMAINDIR='@@BUILD_DIR@@/po/build/locale' PATH='@@BUILD_DIR@@/bin-wrappers:'"$PATH" export GIT_EXEC_PATH GITPERLLIB PATH GIT_TEXTDOMAINDIR +if test -n "$TEST_GDB_GIT" +then + exec gdb -args "${GIT_EXEC_PATH}/@@PROG@@" "$@" + echo "Could not run gdb -args ${GIT_EXEC_PATH}/@@PROG@@ $*" >&2 + exit 1 +fi + exec "${GIT_EXEC_PATH}/@@PROG@@" "$@"