From: Junio C Hamano <gitster@pobox.com>
To: "Randall S. Becker" <the.n.e.key@gmail.com>
Cc: git@vger.kernel.org,
"Randall S. Becker" <randall.becker@nexbridge.ca>,
"Randall S . Becker" <rsbecker@nexbridge.com>
Subject: Re: [PATCH v0 1/1] Teach git version --build-options about OpenSSL
Date: Thu, 20 Jun 2024 11:27:16 -0700 [thread overview]
Message-ID: <xmqq8qyzv5a3.fsf@gitster.g> (raw)
In-Reply-To: <20240619172421.33548-2-randall.becker@nexbridge.ca> (Randall S. Becker's message of "Wed, 19 Jun 2024 13:24:21 -0400")
"Randall S. Becker" <the.n.e.key@gmail.com> writes:
> This change uses the OpenSSL supplied OPENSSL_VERSION_TEXT #define supplied
> for this purpose by that project. If the #define is not present, the version
> is not reported.
>
> Signed-off-by: Randall S. Becker <rsbecker@nexbridge.com>
> ---
> help.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/help.c b/help.c
> index 1d057aa607..ce55aaa2c0 100644
> --- a/help.c
> +++ b/help.c
> @@ -757,6 +757,9 @@ void get_version_info(struct strbuf *buf, int show_build_options)
>
> if (fsmonitor_ipc__is_supported())
> strbuf_addstr(buf, "feature: fsmonitor--daemon\n");
> +#if defined OPENSSL_VERSION_TEXT
> + strbuf_addf(buf, "OpenSSL: %s\n", OPENSSL_VERSION_TEXT);
> +#endif
> }
> }
It is kind-a surprising that we do not need to play with any
Makefile macros for this implementation.
If some unknown version (either in the long past or in the future)
of OpenSSL does not define the constant, this is just compiled out
and that would be OK.
If some unknown version of OpenSSL does define it but not as a
string constant, it would break the build, e.g.,
#define OPENSSL_VERSION_TEXT 2 plus 4 is 6
We could stringify it ourselves, but that is probably not worth
worrying about.
Will queue. Thanks.
next prev parent reply other threads:[~2024-06-20 18:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-19 17:24 [PATCH v0 0/1] Teach git version --build-options about OpenSSL Randall S. Becker
2024-06-19 17:24 ` [PATCH v0 1/1] " Randall S. Becker
2024-06-20 18:27 ` Junio C Hamano [this message]
2024-06-20 18:35 ` Junio C Hamano
2024-06-20 18:48 ` Randall Becker
2024-06-20 22:37 ` rsbecker
2024-06-20 23:55 ` Junio C Hamano
2024-06-21 1:50 ` rsbecker
2024-06-21 16:18 ` Junio C Hamano
2024-06-20 18:36 ` Randall Becker
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=xmqq8qyzv5a3.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=randall.becker@nexbridge.ca \
--cc=rsbecker@nexbridge.com \
--cc=the.n.e.key@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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.