emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] GnuTLS support on Woe32


From: Juanma Barranquero
Subject: Re: [PATCH] GnuTLS support on Woe32
Date: Tue, 3 May 2011 21:35:35 +0200

2011/5/3 Ted Zlatanov <address@hidden>:

> 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> +  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?

The cases are:
  found = nil  ; the value has not yet been cached, let's try to load
the library
  found = (gnutls . t)  ; library already loaded
  found = (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 
> (Qgnutls_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.

    Juanma



reply via email to

[Prev in Thread] Current Thread [Next in Thread]