[svn] gpg-error - r250 - in trunk: . po src
svn author wk
cvs at cvs.gnupg.org
Thu Sep 16 20:44:34 CEST 2010
Author: wk
Date: 2010-09-16 20:44:32 +0200 (Thu, 16 Sep 2010)
New Revision: 250
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/po/cs.po
trunk/po/de.po
trunk/po/fr.po
trunk/po/it.po
trunk/po/libgpg-error.pot
trunk/po/nl.po
trunk/po/pl.po
trunk/po/ro.po
trunk/po/sv.po
trunk/po/vi.po
trunk/po/zh_CN.po
trunk/src/init.c
trunk/src/init.h
trunk/src/w32-gettext.c
Log:
Fix initialization of static libs
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-09-16 14:40:28 UTC (rev 249)
+++ trunk/ChangeLog 2010-09-16 18:44:32 UTC (rev 250)
@@ -1,3 +1,9 @@
+2010-09-16 Werner Koch <wk at g10code.com>
+
+ * src/w32-gettext.c (module_init): Do not set a constructur if not
+ build as DLL.
+ (_gpg_w32__init_gettext_module): New.
+
2010-09-16 gettextize <bug-gnu-gettext at gnu.org>
* configure.ac (AM_GNU_GETTEXT_VERSION): Bump to 0.17.
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2010-09-16 14:40:28 UTC (rev 249)
+++ trunk/NEWS 2010-09-16 18:44:32 UTC (rev 250)
@@ -1,6 +1,7 @@
Noteworthy changes in version 1.10
----------------------------------------------
+ * Using a static library on W32 does now work.
* Interface changes relative to the 1.9 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Modified: trunk/po/cs.po [not shown]
Modified: trunk/po/de.po [not shown]
Modified: trunk/po/fr.po [not shown]
Modified: trunk/po/it.po [not shown]
Modified: trunk/po/libgpg-error.pot
===================================================================
--- trunk/po/libgpg-error.pot 2010-09-16 14:40:28 UTC (rev 249)
+++ trunk/po/libgpg-error.pot 2010-09-16 18:44:32 UTC (rev 250)
@@ -6,9 +6,9 @@
#, fuzzy
msgid ""
msgstr ""
-"Project-Id-Version: libgpg-error 1.10-svn248\n"
+"Project-Id-Version: libgpg-error 1.10-svn249\n"
"Report-Msgid-Bugs-To: translations at gnupg.org\n"
-"POT-Creation-Date: 2010-09-16 14:55+0200\n"
+"POT-Creation-Date: 2010-09-16 16:34+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
Modified: trunk/po/nl.po [not shown]
Modified: trunk/po/pl.po [not shown]
Modified: trunk/po/ro.po [not shown]
Modified: trunk/po/sv.po [not shown]
Modified: trunk/po/vi.po [not shown]
Modified: trunk/po/zh_CN.po [not shown]
Modified: trunk/src/init.c
===================================================================
--- trunk/src/init.c 2010-09-16 14:40:28 UTC (rev 249)
+++ trunk/src/init.c 2010-09-16 18:44:32 UTC (rev 250)
@@ -96,6 +96,7 @@
/* No way to continue - commit suicide. */
abort ();
}
+ _gpg_w32__init_gettext_module ();
real_init ();
}
# endif /*!DLL_EXPORT*/
Modified: trunk/src/init.h
===================================================================
--- trunk/src/init.h 2010-09-16 14:40:28 UTC (rev 249)
+++ trunk/src/init.h 2010-09-16 18:44:32 UTC (rev 250)
@@ -60,6 +60,11 @@
struct tls_space_s *get_tls (void);
+/* Explicit constructor for w32-gettext.c */
+#ifndef DLL_EXPORT
+void _gpg_w32__init_gettext_module (void);
+#endif
+
#endif /*HAVE_W32_SYSTEM*/
#endif /*INIT_H*/
Modified: trunk/src/w32-gettext.c
===================================================================
--- trunk/src/w32-gettext.c 2010-09-16 14:40:28 UTC (rev 249)
+++ trunk/src/w32-gettext.c 2010-09-16 18:44:32 UTC (rev 250)
@@ -1146,15 +1146,34 @@
-/* Constructor for this module. Called from DllMain. */
+/* Constructor for this module. This can only be used if we are a
+ DLL. IF used as a static lib we can't control the process set; for
+ example it might be used with a main module which is not build with
+ mingw and thus does not know how to call the constructors. */
+#ifdef DLL_EXPORT
static void module_init (void) __attribute__ ((__constructor__));
+#endif
static void
module_init (void)
{
- InitializeCriticalSection (&domainlist_access_cs);
+ static int init_done;
+
+ if (!init_done)
+ {
+ InitializeCriticalSection (&domainlist_access_cs);
+ init_done = 1;
+ }
}
+#ifndef DLL_EXPORT
+void
+_gpg_w32__init_gettext_module (void)
+{
+ module_init ();
+}
+#endif
+
/* Free the domain data. */
static void
free_domain (struct loaded_domain *domain)
More information about the Gnupg-commits
mailing list