From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] GnuTLS support on Woe32 Date: Tue, 03 May 2011 09:41:54 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87d3jzc0ct.fsf@lifelogs.com> References: <87ipvwl1nx.wl%claudio.bley@gmail.com> <87lj05svwh.fsf@lifelogs.com> <87bp11imgb.wl%claudio.bley@gmail.com> <8739mc5nes.fsf@lifelogs.com> <87ipuubao6.fsf@lifelogs.com> <87fwpjfkkz.fsf@lifelogs.com> <87bp072fb1.fsf@lifelogs.com> <874o5vimm5.fsf@lifelogs.com> <87zknjmcyk.fsf@lifelogs.com> <87sjta2zvp.fsf@lifelogs.com> <87liyzglkh.fsf@lifelogs.com> <4DB77682.1070605@gmail.com> <8762q04ba1.fsf@lifelogs.com> <87hb9dufao.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1304433748 28932 80.91.229.12 (3 May 2011 14:42:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 May 2011 14:42:28 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 03 16:42:25 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QHGnr-0004Eh-5j for ged-emacs-devel@m.gmane.org; Tue, 03 May 2011 16:42:19 +0200 Original-Received: from localhost ([::1]:54503 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHGnq-0004R2-Ob for ged-emacs-devel@m.gmane.org; Tue, 03 May 2011 10:42:18 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33686) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHGnn-0004Qw-AK for emacs-devel@gnu.org; Tue, 03 May 2011 10:42:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHGnm-0008RN-8m for emacs-devel@gnu.org; Tue, 03 May 2011 10:42:15 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:43368) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHGnl-0008Qx-UM for emacs-devel@gnu.org; Tue, 03 May 2011 10:42:14 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QHGnk-00049o-7k for emacs-devel@gnu.org; Tue, 03 May 2011 16:42:12 +0200 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 May 2011 16:42:12 +0200 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 03 May 2011 16:42:12 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 49 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:p4DgjZCSM+hchC2kEZEcK1nAv7k= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:139051 Archived-At: On Tue, 3 May 2011 04:27:55 +0200 Juanma Barranquero wrote: JB> 2011/5/2 Ted Zlatanov : >> So we just need to modify `emacs_gnutls_global_init' to load and check >> the GnuTLS library JB> emacs_gnutls_global_init is called too late, after JB> gnutls_global_set_log_function and gnutls_global_set_log_level have JB> been called. I've chosen to call Fgnutls_available_p at the start of JB> Fgnutls_boot. OK. JB> Please take a look at the attached patch, which is a rough cut; it JB> lacks any documentation (no ChangeLog entries) and I'm not really sure JB> what am I doing with the errors :-) Also, I haven't added GNUTLS_LOG JB> calls; feel free to suggest them as appropriate. It seems like we have to keep the list of imported functions up to date and remember to always use the fn_NAME version. Is there a way to automate that with a macro like CALL_GNUTLS_FUNCTION(NAME, args) or with a .h file? The way you have it is pretty easy to forget and it's hard to grep for it. JB> + Lisp_Object found = Fassq (Qgnutls_dll, Vlibrary_cache); JB> + if (CONSP (found)) JB> + return XCDR (found); JB> + else JB> + { JB> + Lisp_Object status; JB> + status = init_gnutls_functions (Vdynamic_library_alist) ? Qt : Qnil; JB> + Vlibrary_cache = Fcons (Fcons (Qgnutls_dll, status), Vlibrary_cache); JB> + return status; JB> + } Can `found' ever be true but not a cons? Should we redo the initialization in that case? The else block above should log things at level 1, I think, since it's a rare event and important to know: CHECK_STRING (Qgnutls_dll); GNUTLS_LOG2 (1, max_log_level, "loading the GnuTLS DLL: ", SSDATA (Qgnutls_dll)); Otherwise it looks OK to me, though I don't know the W32 side at all so I can't comment on the w32.* changes. Ted