[svn] gpg-error - r245 - in trunk: . po src
svn author wk
cvs at cvs.gnupg.org
Wed Jul 21 10:00:11 CEST 2010
Author: wk
Date: 2010-07-21 10:00:09 +0200 (Wed, 21 Jul 2010)
New Revision: 245
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/configure.ac
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/err-codes.h.in
trunk/src/gpg-error.def.in
trunk/src/gpg-error.h.in
trunk/src/init.c
Log:
Add gpg_err_deinit
Prepare a new release.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2010-06-29 17:12:30 UTC (rev 244)
+++ trunk/ChangeLog 2010-07-21 08:00:09 UTC (rev 245)
@@ -1,3 +1,21 @@
+2010-07-21 Werner Koch <wk at g10code.com>
+
+ Release 1.9.
+
+ * configure.ac: Set LT version to C7/A7/R0.
+
+2010-07-20 Werner Koch <wk at g10code.com>
+
+ * src/init.c (DllMain) [!DLL_EXPORT]: Do not build.
+ (gpg_err_init) [W32][!DLL_EXPORT]: Init TLS.
+ (gpg_err_deinit): New.
+ * src/gpg-error.def.in: Add gpg_err_deinit.
+ * src/gpg-error.h.in: Add gpg_err_deinit.
+
+2010-07-05 Werner Koch <wk at g10code.com>
+
+ * src/err-codes.h.in (GPG_ERR_TOO_MANY, GPG_ERR_LIMIT_REACHED): New.
+
2010-06-18 Werner Koch <wk at g10code.com>
* src/err-codes.h.in (GPG_ERR_MISSING_KEY): New.
Modified: trunk/NEWS
===================================================================
--- trunk/NEWS 2010-06-29 17:12:30 UTC (rev 244)
+++ trunk/NEWS 2010-07-21 08:00:09 UTC (rev 245)
@@ -1,10 +1,16 @@
-Noteworthy changes in version 1.9
+Noteworthy changes in version 1.9 (2010-07-21)
----------------------------------------------
+ * New function gpg_err_deinit.
+ * Fix building of static lib under W32.
+
* Interface changes relative to the 1.8 release:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GPG_ERR_MISSING_KEY NEW.
+ GPG_ERR_TOO_MANY NEW.
+ GPG_ERR_LIMIT_REACHED NEW.
+ gpg_err_deinit NEW.
Noteworthy changes in version 1.8 (2010-05-06)
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2010-06-29 17:12:30 UTC (rev 244)
+++ trunk/configure.ac 2010-07-21 08:00:09 UTC (rev 245)
@@ -25,7 +25,7 @@
# Set my_issvn to "yes" for non-released code. Remember to run an
# "svn up" and "autogen.sh" right before creating a distribution.
m4_define([my_version], [1.9])
-m4_define([my_issvn], [yes])
+m4_define([my_issvn], [no])
m4_define([svn_revision], m4_esyscmd([printf "%d" $(svn info 2>/dev/null \
| sed -n '/^Revision:/ s/[^0-9]//gp'|head -1)]))
@@ -38,8 +38,8 @@
# (Interfaces added: AGE++)
# (Interfaces removed: AGE=0)
# Note that added error codes don't constitute an interface change.
-LIBGPG_ERROR_LT_CURRENT=6
-LIBGPG_ERROR_LT_AGE=6
+LIBGPG_ERROR_LT_CURRENT=7
+LIBGPG_ERROR_LT_AGE=7
LIBGPG_ERROR_LT_REVISION=0
AC_SUBST(LIBGPG_ERROR_LT_CURRENT)
AC_SUBST(LIBGPG_ERROR_LT_AGE)
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-06-29 17:12:30 UTC (rev 244)
+++ trunk/po/libgpg-error.pot 2010-07-21 08:00:09 UTC (rev 245)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: translations at gnupg.org\n"
-"POT-Creation-Date: 2010-01-21 12:09+0100\n"
+"POT-Creation-Date: 2010-07-20 18:05+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"
@@ -825,238 +825,250 @@
msgstr ""
#: src/err-codes.h:209
+msgid "Missing key"
+msgstr ""
+
+#: src/err-codes.h:210
+msgid "Too many objects"
+msgstr ""
+
+#: src/err-codes.h:211
+msgid "Limit reached"
+msgstr ""
+
+#: src/err-codes.h:212
msgid "Operation not yet finished"
msgstr ""
-#: src/err-codes.h:210
+#: src/err-codes.h:213
msgid "Buffer too short"
msgstr ""
-#: src/err-codes.h:211
+#: src/err-codes.h:214
msgid "Invalid length specifier in S-expression"
msgstr ""
-#: src/err-codes.h:212
+#: src/err-codes.h:215
msgid "String too long in S-expression"
msgstr ""
-#: src/err-codes.h:213
+#: src/err-codes.h:216
msgid "Unmatched parentheses in S-expression"
msgstr ""
-#: src/err-codes.h:214
+#: src/err-codes.h:217
msgid "S-expression not canonical"
msgstr ""
-#: src/err-codes.h:215
+#: src/err-codes.h:218
msgid "Bad character in S-expression"
msgstr ""
-#: src/err-codes.h:216
+#: src/err-codes.h:219
msgid "Bad quotation in S-expression"
msgstr ""
-#: src/err-codes.h:217
+#: src/err-codes.h:220
msgid "Zero prefix in S-expression"
msgstr ""
-#: src/err-codes.h:218
+#: src/err-codes.h:221
msgid "Nested display hints in S-expression"
msgstr ""
-#: src/err-codes.h:219
+#: src/err-codes.h:222
msgid "Unmatched display hints"
msgstr ""
-#: src/err-codes.h:220
+#: src/err-codes.h:223
msgid "Unexpected reserved punctuation in S-expression"
msgstr ""
-#: src/err-codes.h:221
+#: src/err-codes.h:224
msgid "Bad hexadecimal character in S-expression"
msgstr ""
-#: src/err-codes.h:222
+#: src/err-codes.h:225
msgid "Odd hexadecimal numbers in S-expression"
msgstr ""
-#: src/err-codes.h:223
+#: src/err-codes.h:226
msgid "Bad octal character in S-expression"
msgstr ""
-#: src/err-codes.h:224
+#: src/err-codes.h:227
msgid "General IPC error"
msgstr ""
-#: src/err-codes.h:225
+#: src/err-codes.h:228
msgid "IPC accept call failed"
msgstr ""
-#: src/err-codes.h:226
+#: src/err-codes.h:229
msgid "IPC connect call failed"
msgstr ""
-#: src/err-codes.h:227
+#: src/err-codes.h:230
msgid "Invalid IPC response"
msgstr ""
-#: src/err-codes.h:228
+#: src/err-codes.h:231
msgid "Invalid value passed to IPC"
msgstr ""
-#: src/err-codes.h:229
+#: src/err-codes.h:232
msgid "Incomplete line passed to IPC"
msgstr ""
-#: src/err-codes.h:230
+#: src/err-codes.h:233
msgid "Line passed to IPC too long"
msgstr ""
-#: src/err-codes.h:231
+#: src/err-codes.h:234
msgid "Nested IPC commands"
msgstr ""
-#: src/err-codes.h:232
+#: src/err-codes.h:235
msgid "No data callback in IPC"
msgstr ""
-#: src/err-codes.h:233
+#: src/err-codes.h:236
msgid "No inquire callback in IPC"
msgstr ""
-#: src/err-codes.h:234
+#: src/err-codes.h:237
msgid "Not an IPC server"
msgstr ""
-#: src/err-codes.h:235
+#: src/err-codes.h:238
msgid "Not an IPC client"
msgstr ""
-#: src/err-codes.h:236
+#: src/err-codes.h:239
msgid "Problem starting IPC server"
msgstr ""
-#: src/err-codes.h:237
+#: src/err-codes.h:240
msgid "IPC read error"
msgstr ""
-#: src/err-codes.h:238
+#: src/err-codes.h:241
msgid "IPC write error"
msgstr ""
-#: src/err-codes.h:239
+#: src/err-codes.h:242
msgid "Too much data for IPC layer"
msgstr ""
-#: src/err-codes.h:240
+#: src/err-codes.h:243
msgid "Unexpected IPC command"
msgstr ""
-#: src/err-codes.h:241
+#: src/err-codes.h:244
msgid "Unknown IPC command"
msgstr ""
-#: src/err-codes.h:242
+#: src/err-codes.h:245
msgid "IPC syntax error"
msgstr ""
-#: src/err-codes.h:243
+#: src/err-codes.h:246
msgid "IPC call has been cancelled"
msgstr ""
-#: src/err-codes.h:244
+#: src/err-codes.h:247
msgid "No input source for IPC"
msgstr ""
-#: src/err-codes.h:245
+#: src/err-codes.h:248
msgid "No output source for IPC"
msgstr ""
-#: src/err-codes.h:246
+#: src/err-codes.h:249
msgid "IPC parameter error"
msgstr ""
-#: src/err-codes.h:247
+#: src/err-codes.h:250
msgid "Unknown IPC inquire"
msgstr ""
-#: src/err-codes.h:248
+#: src/err-codes.h:251
msgid "User defined error code 1"
msgstr ""
-#: src/err-codes.h:249
+#: src/err-codes.h:252
msgid "User defined error code 2"
msgstr ""
-#: src/err-codes.h:250
+#: src/err-codes.h:253
msgid "User defined error code 3"
msgstr ""
-#: src/err-codes.h:251
+#: src/err-codes.h:254
msgid "User defined error code 4"
msgstr ""
-#: src/err-codes.h:252
+#: src/err-codes.h:255
msgid "User defined error code 5"
msgstr ""
-#: src/err-codes.h:253
+#: src/err-codes.h:256
msgid "User defined error code 6"
msgstr ""
-#: src/err-codes.h:254
+#: src/err-codes.h:257
msgid "User defined error code 7"
msgstr ""
-#: src/err-codes.h:255
+#: src/err-codes.h:258
msgid "User defined error code 8"
msgstr ""
-#: src/err-codes.h:256
+#: src/err-codes.h:259
msgid "User defined error code 9"
msgstr ""
-#: src/err-codes.h:257
+#: src/err-codes.h:260
msgid "User defined error code 10"
msgstr ""
-#: src/err-codes.h:258
+#: src/err-codes.h:261
msgid "User defined error code 11"
msgstr ""
-#: src/err-codes.h:259
+#: src/err-codes.h:262
msgid "User defined error code 12"
msgstr ""
-#: src/err-codes.h:260
+#: src/err-codes.h:263
msgid "User defined error code 13"
msgstr ""
-#: src/err-codes.h:261
+#: src/err-codes.h:264
msgid "User defined error code 14"
msgstr ""
-#: src/err-codes.h:262
+#: src/err-codes.h:265
msgid "User defined error code 15"
msgstr ""
-#: src/err-codes.h:263
+#: src/err-codes.h:266
msgid "User defined error code 16"
msgstr ""
-#: src/err-codes.h:264
+#: src/err-codes.h:267
msgid "System error w/o errno"
msgstr ""
-#: src/err-codes.h:265
+#: src/err-codes.h:268
msgid "Unknown system error"
msgstr ""
-#: src/err-codes.h:266
+#: src/err-codes.h:269
msgid "End of file"
msgstr ""
-#: src/err-codes.h:267
+#: src/err-codes.h:270
msgid "Unknown error code"
msgstr ""
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/err-codes.h.in
===================================================================
--- trunk/src/err-codes.h.in 2010-06-29 17:12:30 UTC (rev 244)
+++ trunk/src/err-codes.h.in 2010-07-21 08:00:09 UTC (rev 245)
@@ -211,7 +211,9 @@
179 GPG_ERR_NOT_ENABLED Not enabled
180 GPG_ERR_NO_ENGINE No crypto engine
181 GPG_ERR_MISSING_KEY Missing key
-# 182 to 198 are free to be used.
+182 GPG_ERR_TOO_MANY Too many objects
+183 GPG_ERR_LIMIT_REACHED Limit reached
+# 184 to 198 are free to be used.
199 GPG_ERR_UNFINISHED Operation not yet finished
200 GPG_ERR_BUFFER_TOO_SHORT Buffer too short
Modified: trunk/src/gpg-error.def.in
===================================================================
--- trunk/src/gpg-error.def.in 2010-06-29 17:12:30 UTC (rev 244)
+++ trunk/src/gpg-error.def.in 2010-07-21 08:00:09 UTC (rev 245)
@@ -26,3 +26,4 @@
_gpg_w32_gettext_localename @16
_gpg_w32_gettext_use_utf8 @17
#endif
+ gpg_err_deinit @18
Modified: trunk/src/gpg-error.h.in
===================================================================
--- trunk/src/gpg-error.h.in 2010-06-29 17:12:30 UTC (rev 244)
+++ trunk/src/gpg-error.h.in 2010-07-21 08:00:09 UTC (rev 245)
@@ -152,6 +152,10 @@
#define GPG_ERR_INITIALIZED 1
#endif
+/* See the source on how to use the deinit function; it is usually not
+ required. */
+void gpg_err_deinit (int mode);
+
/* Constructor and accessor functions. */
Modified: trunk/src/init.c
===================================================================
--- trunk/src/init.c 2010-06-29 17:12:30 UTC (rev 244)
+++ trunk/src/init.c 2010-07-21 08:00:09 UTC (rev 245)
@@ -40,8 +40,10 @@
#if HAVE_W32_SYSTEM
-static int tls_index; /* Index for the TLS functions. */
+#include <windows.h>
+static int tls_index = TLS_OUT_OF_INDEXES; /* Index for the TLS functions. */
+
static char *get_locale_dir (void);
static void drop_locale_dir (char *locale_dir);
@@ -74,12 +76,29 @@
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*/
+ /* 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
+ DLL! */
+ if (tls_index == TLS_OUT_OF_INDEXES)
+ {
+ tls_index = TlsAlloc ();
+ if (tls_index == TLS_OUT_OF_INDEXES)
+ {
+ /* No way to continue - commit suicide. */
+ abort ();
+ }
+ real_init ();
+ }
+# endif /*!DLL_EXPORT*/
#else
real_init ();
#endif
@@ -87,11 +106,41 @@
}
+/* Deinitialize libgpg-error. This function is only used in special
+ circumstances. No gpg-error function should be used after this
+ function has been called. A value of 0 passed for MODE
+ deinitializes the entire libgpg-error, a value of 1 releases
+ resources allocated for the current thread and only that thread may
+ not anymore access libgpg-error after such a call. Under Windows
+ this function may be called from the DllMain function of a DLL
+ which statically links to libgpg-error. */
+void
+gpg_err_deinit (int mode)
+{
+#if defined (HAVE_W32_SYSTEM) && !defined(DLL_EXPORT)
+ struct tls_space_s *tls;
+
+ tls = TlsGetValue (tls_index);
+ if (tls)
+ {
+ TlsSetValue (tls_index, NULL);
+ LocalFree (tls);
+ }
+
+ if (mode == 0)
+ {
+ TlsFree (tls_index);
+ tls_index = TLS_OUT_OF_INDEXES;
+ }
+#else
+ (void)mode;
+#endif
+}
+
+
#ifdef HAVE_W32_SYSTEM
-#include <windows.h>
-
/* Return a malloced string encoded in UTF-8 from the wide char input
string STRING. Caller must free this value. Returns NULL on
failure. Caller may use GetLastError to get the actual error
@@ -292,6 +341,7 @@
/* Entry point called by the DLL loader. */
+#ifdef DLL_EXPORT
int WINAPI
DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved)
{
@@ -336,8 +386,8 @@
return TRUE;
}
+#endif /*DLL_EXPORT*/
-
#else /*!HAVE_W32_SYSTEM*/
void
More information about the Gnupg-commits
mailing list