Subject: Re: bug#50507: New function in Emacs GnuTLS implementation

From: Eli Zaretskii <[email-masked]>
Date: Tue, 27 Sep 2022 09:29:27 +0300

> From: Nikolaos Chatzikonstantinou <[email-masked]>
> Date: Mon, 26 Sep 2022 17:39:09 -0400
> Cc: Lars Ingebrigtsen <[email-masked]>, [email-masked], Eli Zaretskii <[email-masked]>
> 
> > In any case, if youʼre going to replace _file with _file2, you should
> > describe the new constraints on the arguments. e.g. Maybe having pass
> > as nil is OK, but then you need to say that, or maybe you need to fall
> > back to _file if :pass is not specified.
> 
> Okay, will do. The first version of the function exists since 0.4.0
> but the second appeared "recently" in 3.2.0 (released on June
> 2013). Should I put some preprocessor #if checks?

Yes, we already have those in gnutls.c.  Example:

  # if GNUTLS_VERSION_NUMBER >= 0x030014
  #  define HAVE_GNUTLS_X509_SYSTEM_TRUST
  # endif

> How would the docstring be affected? Instead of duplicating the
> string (can't put #if inside its body, it's already in a macro),
> perhaps I should write that the feature is "only supported with
> GnuTLS 3.2.0 and above")

You don't have to mention the GnuTLS version explicitly, you can say
something more vague, like "supported by recent enough GnuTLS".