From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] support older versions of libcurl
Date: Thu, 28 Jul 2005 19:24:13 -0700 [thread overview]
Message-ID: <7vll3qqrhu.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: Pine.LNX.4.58.0507281648390.25783@wgmdd8.biozentrum.uni-wuerzburg.de
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 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.
Do you need to check against that many versions? Especially
cleanup and init not depending on the same version number looks
really suspicious.
Assuming that the answer is still yes, how about doing things
this way instead?
---
diff --git a/http-pull.c b/http-pull.c
--- a/http-pull.c
+++ b/http-pull.c
@@ -6,6 +6,16 @@
#include <curl/curl.h>
#include <curl/easy.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)
+#endif
+#if LIBCURL_VERSION_NUM < 0x070907
+#define curl_easy_setopt(a, b, c) do { /* nothing */ } while(0)
+#endif
+
static CURL *curl;
static char *base;
next prev parent reply other threads:[~2005-07-29 2:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-28 14:49 [PATCH] support older versions of libcurl Johannes Schindelin
2005-07-29 2:24 ` Junio C Hamano [this message]
2005-07-29 10:23 ` Johannes Schindelin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7vll3qqrhu.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox