git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] support older versions of libcurl

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jul 28, 2005, 14:49 UTC
Message-ID
<Pine.LNX.4.58.0507281648390.25783@wgmdd8.biozentrum.uni-wuerzburg.de>

Some newer features of libcurl are used which are not strictly necessary for http-pull. Use them only if libcurl is new enough to know about them.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 http-pull.c |    6 ++++++
 1 files changed, 6 insertions
diff --git a/http-pull.c b/http-pull.c
--- a/http-pull.c
+++ b/http-pull.c
@@ -171,19 +171,25 @@ int main(int argc, char **argv)
 	commit_id = argv[arg];
 	url = argv[arg + 1];

+#if LIBCURL_VERSION_NUM >= 0x070800
 	curl_global_init(CURL_GLOBAL_ALL);
+#endif

 	curl = curl_easy_init();

 	curl_ssl_verify = gitenv("GIT_SSL_NO_VERIFY") ? 0 : 1;
 	curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, curl_ssl_verify);
+#if LIBCURL_VERSION_NUM >= 0x070907
 	curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
+#endif

 	base = url;

 	if (pull(commit_id))
 		return 1;

+#if LIBCURL_VERSION_NUM >= 0x070704
 	curl_global_cleanup();
+#endif
 	return 0;
 }
Next: Junio C Hamano
Message 1 of 3 in “support older versions of libcurl”
  1. support older versions of libcurlJohannes Schindelin, Jul 28, 2005
  2. Junio C HamanoJul 29, 2005
  3. Johannes SchindelinJul 29, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.