From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] GnuTLS support on Woe32 Date: Tue, 3 May 2011 21:35:35 +0200 Message-ID: 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> <87d3jzc0ct.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1304451390 12791 80.91.229.12 (3 May 2011 19:36:30 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 May 2011 19:36:30 +0000 (UTC) Cc: emacs-devel@gnu.org To: Ted Zlatanov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue May 03 21:36: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 1QHLOO-0007mg-6t for ged-emacs-devel@m.gmane.org; Tue, 03 May 2011 21:36:20 +0200 Original-Received: from localhost ([::1]:39023 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHLON-0005dU-OB for ged-emacs-devel@m.gmane.org; Tue, 03 May 2011 15:36:19 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:41049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHLOL-0005dP-0L for emacs-devel@gnu.org; Tue, 03 May 2011 15:36:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHLOJ-0005L1-UN for emacs-devel@gnu.org; Tue, 03 May 2011 15:36:16 -0400 Original-Received: from mail-gw0-f41.google.com ([74.125.83.41]:52637) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHLOJ-0005Kx-Mk for emacs-devel@gnu.org; Tue, 03 May 2011 15:36:15 -0400 Original-Received: by gwaa12 with SMTP id a12so197025gwa.0 for ; Tue, 03 May 2011 12:36:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type:content-transfer-encoding; bh=INXh+EgvQowO/p/p2ljdv6o8sMf/jBHFoP7YofjYHBA=; b=iFdt1zq0kGyzoPUMcO2EaM1vAvB4OxN2wSXBKoDtnmnI3+LAYYsYT/Z2CrVRFce2Mr zP6ODrpQz2SSGx4JpDquf0itIY0yIqBwy8idxz8JrvEhlfNjRNKDdbvwatO4CevzMSwR JQaBC9zksLsVELTIqfYSpg0NRXHvk5zwHJ7kA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=a5KCuf0d8yLHvZmGtGfV6BglI1xmFnw7huIY3c50gWXdzbQZLS1Talog/BtiJvvJz/ tpwryGHbwZVDeh+fkRX4BwxGvoviZoDmgRIm68tUosCinv9vQqRoANLnH0mz2zPzDfwd jYY37fsvCIiYmMwPDQgDC6reuxN1lIY+djuiQ= Original-Received: by 10.146.167.7 with SMTP id p7mr201403yae.38.1304451375329; Tue, 03 May 2011 12:36:15 -0700 (PDT) Original-Received: by 10.147.182.5 with HTTP; Tue, 3 May 2011 12:35:35 -0700 (PDT) In-Reply-To: <87d3jzc0ct.fsf@lifelogs.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.83.41 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:139069 Archived-At: 2011/5/3 Ted Zlatanov : > It seems like we have to keep the list of imported functions up to date > and remember to always use the fn_NAME version. Don't worry, as soon as you forget to declare one function, the Windows port will complain during linking. > > JB> + =C2=A0Lisp_Object found =3D Fassq (Qgnutls_dll, Vlibrary_cache); > JB> + =C2=A0if (CONSP (found)) > JB> + =C2=A0 =C2=A0return XCDR (found); > JB> + =C2=A0else > JB> + =C2=A0 =C2=A0{ > JB> + =C2=A0 =C2=A0 =C2=A0Lisp_Object status; > JB> + =C2=A0 =C2=A0 =C2=A0status =3D init_gnutls_functions (Vdynamic_libr= ary_alist) ? Qt : Qnil; > JB> + =C2=A0 =C2=A0 =C2=A0Vlibrary_cache =3D Fcons (Fcons (Qgnutls_dll, s= tatus), Vlibrary_cache); > JB> + =C2=A0 =C2=A0 =C2=A0return status; > JB> + =C2=A0 =C2=A0} > > Can `found' ever be true but not a cons? The cases are: found =3D nil ; the value has not yet been cached, let's try to load the library found =3D (gnutls . t) ; library already loaded found =3D (gnutls . nil) ; library already searched for and not found > Should we redo the > initialization in that case? The idea is to never retry loading, because looking for the .DLLs can be slow (for example, network latencies). > 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 (Qgnutl= s_dll)); Aha, thanks. > 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. It's more or less a copy of what's already done in image.c. =C2=A0 =C2=A0 Juanma