Re: [PATCH 1/1] Update imap-send.c, fix incompatibilities with OpenSSL 1.1.x
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 7, 2020, 20:19 UTC
- Message-ID
- <xmqqpnfv3tq4.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <8c96c56a1818b066d4570873e00c52d42399e3c2.1578391376.git.gitgitgadget@gmail.com>
"Liam Huang via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: Liam Huang <Liam0205@users.noreply.github.com> > > Some APIs have been changed since OpenSSL 1.1.0, so fix incompatibilities with OpenSSL 1.1.x.
I wonder if the patch can be made a lot less noisy with something along this line
#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))
#endifwhich would allow you to reduce many #if/#else/#endif in the actual code.