summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Art Haas <ahaas@airmail.net>2006-09-19 07:20:19 -0500
committerLibravatar Junio C Hamano <junkio@cox.net>2006-09-20 07:53:43 -0700
commitc774b2dcf6c16a408757e9da1bf7c006528fc6a6 (patch)
tree867625fb6c08de83ef6f44e5f6762cbcc8f9886f
parentMerge branch 'sk/ftp' (diff)
downloadtgif-c774b2dcf6c16a408757e9da1bf7c006528fc6a6.tar.xz
Patch for http-fetch.c and older curl releases
Older curl releases do not define CURLE_HTTP_RETURNED_ERROR, they use CURLE_HTTP_NOT_FOUND instead. Newer curl releases keep the CURLE_HTTP_NOT_FOUND definition but using a -DCURL_NO_OLDIES preprocessor flag the old name will not be present in the 'curl.h' header. This patch makes our code written for newer releases of the curl library but allow compiling against an older curl (older than 0x070a03) by defining the missing CURLE_HTTP_RETURNED_ERROR as a synonym for CURLE_HTTP_NOT_FOUND. Signed-off-by: Art Haas <ahaas@airmail.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
-rw-r--r--http.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/http.h b/http.h
index 9ca16acec2..6e12e41688 100644
--- a/http.h
+++ b/http.h
@@ -22,6 +22,10 @@
#define NO_CURL_EASY_DUPHANDLE
#endif
+#if LIBCURL_VERSION_NUM < 0x070a03
+#define CURLE_HTTP_RETURNED_ERROR CURLE_HTTP_NOT_FOUND
+#endif
+
struct slot_results
{
CURLcode curl_result;