--- libgpg-error-1.9/src/init.c~	2010-08-14 15:04:52.378686134 +1000
+++ libgpg-error-1.9/src/init.c	2010-08-14 15:42:16.895650432 +1000
@@ -76,14 +76,13 @@
 gpg_err_init (void)
 {
 #ifdef HAVE_W32_SYSTEM
-# ifdef DLL_EXPORT
   /* We always have a constructor and thus this function is called
      automatically.  Due to the way the C init code of mingw works,
      the constructors are called before our DllMain function is
      called.  The problem with that is that the TLS has not been setup
      and w32-gettext.c requires TLS.  To solve this we do nothing here
      but call the actual init code from our DllMain.  */
-# else /*!DLL_EXPORT*/
+# ifdef DLL_EXPORT
   /* Note that if the TLS is actually used, we can't release the TLS
      as there is no way to know when a thread terminates (i.e. no
      thread-specific-atexit).  You are really better off to use the
@@ -98,7 +97,7 @@
         }
       real_init ();
     }
-# endif /*!DLL_EXPORT*/
+# endif /*DLL_EXPORT*/
 #else
   real_init ();
 #endif
@@ -117,7 +116,7 @@
 void
 gpg_err_deinit (int mode)
 {
-#if defined (HAVE_W32_SYSTEM) && !defined(DLL_EXPORT)
+#if defined (HAVE_W32_SYSTEM) && defined(DLL_EXPORT)
   struct tls_space_s *tls;
   
   tls = TlsGetValue (tls_index);
