From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#27708: [PROPOSED] Simplify configuration of HAVE_GNUTLS3 etc. Date: Sat, 15 Jul 2017 19:33:40 +0300 Message-ID: <83shhxek2j.fsf@gnu.org> References: <1500135245-29120-1-git-send-email-eggert@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1500136458 14582 195.159.176.226 (15 Jul 2017 16:34:18 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 15 Jul 2017 16:34:18 +0000 (UTC) Cc: 27708@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 15 18:34:13 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWQ1E-0003Yo-E4 for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Jul 2017 18:34:12 +0200 Original-Received: from localhost ([::1]:42672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWQ1I-0001vt-GY for geb-bug-gnu-emacs@m.gmane.org; Sat, 15 Jul 2017 12:34:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43156) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWQ17-0001tf-3g for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 12:34:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWQ13-0003Lb-SV for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 12:34:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37871) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dWQ13-0003LV-PV for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 12:34:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dWQ13-0007Oy-Jm for bug-gnu-emacs@gnu.org; Sat, 15 Jul 2017 12:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 15 Jul 2017 16:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 27708 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 27708-submit@debbugs.gnu.org id=B27708.150013642628430 (code B ref 27708); Sat, 15 Jul 2017 16:34:01 +0000 Original-Received: (at 27708) by debbugs.gnu.org; 15 Jul 2017 16:33:46 +0000 Original-Received: from localhost ([127.0.0.1]:40548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWQ0o-0007OT-JK for submit@debbugs.gnu.org; Sat, 15 Jul 2017 12:33:46 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:52122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dWQ0n-0007OI-8I for 27708@debbugs.gnu.org; Sat, 15 Jul 2017 12:33:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dWQ0e-0003Cf-KO for 27708@debbugs.gnu.org; Sat, 15 Jul 2017 12:33:39 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:33021) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dWQ0e-0003CY-Hv; Sat, 15 Jul 2017 12:33:36 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2115 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1dWQ0d-00027P-Sh; Sat, 15 Jul 2017 12:33:36 -0400 In-reply-to: <1500135245-29120-1-git-send-email-eggert@cs.ucla.edu> (message from Paul Eggert on Sat, 15 Jul 2017 09:14:05 -0700) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:134593 Archived-At: > From: Paul Eggert > Date: Sat, 15 Jul 2017 09:14:05 -0700 > Cc: Paul Eggert > > diff --git a/src/gnutls.h b/src/gnutls.h > index 3ec86a8..19c1686 100644 > --- a/src/gnutls.h > +++ b/src/gnutls.h > @@ -23,8 +23,16 @@ along with GNU Emacs. If not, see . */ > #include > #include > > -#ifdef HAVE_GNUTLS3 > -#include > +#if 0x030000 <= GNUTLS_VERSION_NUMBER > +# define HAVE_GNUTLS3 > +# include > +#endif > + > +#if 0x030400 <= GNUTLS_VERSION_NUMBER > +# define HAVE_GNUTLS3_AEAD > +# define HAVE_GNUTLS3_CIPHER > +# define HAVE_GNUTLS3_DIGEST > +# define HAVE_GNUTLS3_HMAC > #endif If we want to support the new APIs only starting with GnuTLS 3.4.0, then this is a step in the right direction. But is that the intent? Most of the functions we need are available in much older versions, and others since 3.2.0. Only a few appeared in 3.4.0. So it might also make sense to make our code more fine-grained, not less, if we want to make as many of these APIs available on as many platforms as possible. But I'm not sure what was Ted's intent, and what we want as a project.