From: Junio C Hamano <gitster@pobox.com>
To: Nirmal Khedkar <nirmalhk7@gmail.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, git@vger.kernel.org
Subject: Re: Facing error in git-imap-send while compiling Git
Date: Tue, 21 Jan 2020 10:11:33 -0800 [thread overview]
Message-ID: <xmqqa76gbrxm.fsf@gitster-ct.c.googlers.com> (raw)
In-Reply-To: <CAFFaXsxLd8duDPTE1H-zJiYnTVSB3pHCfBV+08Y4jLvCWR9kNw@mail.gmail.com> (Nirmal Khedkar's message of "Tue, 21 Jan 2020 17:20:28 +0530")
Nirmal Khedkar <nirmalhk7@gmail.com> writes:
> the same errors. Here's my diff, in case I have been making mistakes
> all along.
>
>
> ---
> diff --git a/imap-send.c b/imap-send.c
> index 6c54d8c29d..73ed3bc287 100644
> --- a/imap-send.c
> +++ b/imap-send.c
> @@ -42,6 +42,12 @@ typedef void *SSL;
> #define USE_CURL_DEFAULT 0
> #endif
>
> +#if OPENSSL_VERSION_NUMBER < 0x10100000L
> + #define OPENSSL_sk_num(x) sk_GENERAL_NAME_num(x)
> + #define OPENSSL_sk_value(x,y) sk_GENERAL_NAME_value((x),(y))
> + #define OPENSSL_sk_pop_free(x,y) sk_GENERAL_NAME_pop_free((x),(y))
> +#endif
> +
> static int verbosity;
> static int use_curl = USE_CURL_DEFAULT;
>
> @@ -59,6 +65,8 @@ static struct option imap_send_options[] = {
> #define DRV_BOX_BAD -2
> #define DRV_STORE_BAD -3
> ---
If the above is the whole change, then I do not think it would
work. In the thread I referred you to, I was responding to a patch
that has repetitive
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
call_this_original_function();
+#else
+ call_this_new_function();
+#endif
and I was merely suggesting to reduce the patch noise by #define'ing
a compatibility macro to allow us use new names in the code regardless
of the version (i.e. OPENSSL_sk_*() may not be available in older
version, which used to call them sk_*()---the solution is to pretend
we have OPENSSL_sk_*() by defining them in terms of sk_*() we do have).
There was a hunk (or perhaps two) in the patch I was responding to
that is different from the mere function renaming. That part is not
there in the above patch you pasted, and needs to be kept, I think.
next prev parent reply other threads:[~2020-01-21 18:11 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-16 19:20 Facing error in git-imap-send while compiling Git Nirmal Khedkar
2020-01-16 22:51 ` Junio C Hamano
2020-01-17 12:42 ` Nirmal Khedkar
2020-01-17 13:35 ` Johannes Schindelin
2020-01-20 19:12 ` Nirmal Khedkar
2020-01-20 21:35 ` Johannes Schindelin
2020-01-21 11:50 ` Nirmal Khedkar
2020-01-21 18:11 ` Junio C Hamano [this message]
2020-01-21 21:09 ` Johannes Schindelin
2020-01-22 19:20 ` Junio C Hamano
2020-01-30 20:26 ` Nirmal Khedkar
2020-01-30 23:03 ` Beat Bolli
2020-02-01 21:35 ` Johannes Schindelin
2020-02-15 14:00 ` Nirmal Khedkar
-- strict thread matches above, loose matches on Subject: below --
2020-02-17 9:30 Abhishek Kumar
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqa76gbrxm.fsf@gitster-ct.c.googlers.com \
--to=gitster@pobox.com \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=nirmalhk7@gmail.com \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).