<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    I've been looking into <a
      href="http://bugs.winehq.org/show_bug.cgi?id=27036">bug 27036</a>
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    , and it's due to the lack of thread safety by default in libgcrypt
    (in this case via libgnutls in secur32.dll).  To be thread safe,
    libgcrypt requires a call to gcry_control(GCRYCTL_SET_THREAD_CBS)
    before any libgcrypt initialization is done.  However, libgcrypt is
    used by a lot of different libs, one of which is being used by some
    other dll that's loading before secur32.dll.<br>
    <br>
    My question is, is it acceptable to do the gcry_control() call in
    ntdll's DllMain()?  The alternative seems to be tracking down every
    lib used by wine that uses libgcrypt and doing it in each of those
    dlls.  What's the best way to handle this?<br>
  </body>
</html>