From: Jeff King <peff@peff.net>
To: Bernhard Reiter <ockham@raz.or.at>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: [PATCH] imap-send: avoid curl functions when not building curl support
Date: Mon, 10 Nov 2014 01:39:47 -0500 [thread overview]
Message-ID: <20141110063947.GA7894@peff.net> (raw)
Imap-send recently learned to conditionally compile against
and use curl for imap support. To use this feature, you must
both:
1. Compile with USE_CURL_FOR_IMAP_SEND
2. Specify --curl on the command line to enable it
It is OK (and even desirable) for the code checking --curl
to be compiled even if USE_CURL_FOR_IMAP_SEND is not in
effect; this lets us explain the situation to the user
(instead of saying "--curl? never heard of it").
However, the code which conditionally runs when --curl is
enabled must _not_ be compiled in this case. It references
functions which are neither declared nor defined, causing
the compiler to complain.
Signed-off-by: Jeff King <peff@peff.net>
---
On top of br/imap-send-via-libcurl. I needed this to compile 'pu' with
NO_CURL (which I don't usually do, but was testing on a minimal box). I
expect it can just be squashed in to the next re-roll.
Since we were talking about testing in another thread, Junio, I wonder
if it is worth having you compile your integration results against a
couple different configs (e.g., NO_CURL). Obviously that will make
things slower if you don't throw more CPU power at it, but that seems
like a problem that can be solved with build servers or similar.
imap-send.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/imap-send.c b/imap-send.c
index ad4ac22..e0e1f09 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1542,8 +1542,10 @@ int main(int argc, char **argv)
if (server.tunnel)
return append_msgs_to_imap(&server, &all_msgs, total);
+#ifdef USE_CURL_FOR_IMAP_SEND
if (use_curl)
return curl_append_msgs_to_imap(&server, &all_msgs, total);
+#endif
return append_msgs_to_imap(&server, &all_msgs, total);
}
--
2.1.2.596.g7379948
next reply other threads:[~2014-11-10 6:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 6:39 Jeff King [this message]
2014-11-10 7:16 ` [PATCH] imap-send: avoid curl functions when not building curl support Jeff King
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=20141110063947.GA7894@peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ockham@raz.or.at \
/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;
as well as URLs for NNTP newsgroup(s).