From cvs at cvs.gnupg.org Tue Jun 18 10:54:41 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 18 Jun 2013 10:54:41 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.4.2-2-gf2eeccb Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via f2eeccbdfaf855a81abb92abe5ab4c702712bac7 (commit) from 5df596d6ec62c304db9b988b17fcbbed126855b4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f2eeccbdfaf855a81abb92abe5ab4c702712bac7 Author: Werner Koch Date: Tue Jun 18 10:27:46 2013 +0200 Add function gpgme_signers_count. * src/signers.c (gpgme_signers_count): New. * src/libgpgme.vers, src/gpgme.def: Add as external symbol. * src/gpgme.h.in: Add prototype. diff --git a/NEWS b/NEWS index 3b8fea3..55c8660 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ Noteworthy changes in version 1.4.3 (unreleased) ------------------------------------------------ + * Interface changes relative to the 1.4.2 release: + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + gpgme_signers_count NEW. + Noteworthy changes in version 1.4.2 (2013-05-28) ------------------------------------------------ diff --git a/doc/gpgme.texi b/doc/gpgme.texi index 217dc13..1a19370 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -4785,6 +4785,11 @@ list of signers in the context @var{ctx}. Calling this function acquires an additional reference for the key. @end deftypefun + at deftypefun @w{unsigned int} gpgme_signers_count (@w{const gpgme_ctx_t @var{ctx}}) +The function @code{gpgme_signers_count} returns the number of signer keys in +the context @var{ctx}. + at end deftypefun + @deftypefun gpgme_key_t gpgme_signers_enum (@w{const gpgme_ctx_t @var{ctx}}, @w{int @var{seq}}) The function @code{gpgme_signers_enum} returns the @var{seq}th key in the list of signers in the context @var{ctx}. An additional reference diff --git a/src/gpgme.def b/src/gpgme.def index 3a6e0e3..7610d37 100644 --- a/src/gpgme.def +++ b/src/gpgme.def @@ -209,5 +209,7 @@ EXPORTS gpgme_set_pinentry_mode @158 gpgme_get_pinentry_mode @159 + gpgme_signers_count @160 + ; END diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 11780d1..f644a50 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -934,6 +934,9 @@ void gpgme_signers_clear (gpgme_ctx_t ctx); /* Add KEY to list of signers in CTX. */ gpgme_error_t gpgme_signers_add (gpgme_ctx_t ctx, const gpgme_key_t key); +/* Return the number of signers in CTX. */ +unsigned int gpgme_signers_count (const gpgme_ctx_t ctx); + /* Return the SEQth signer's key in CTX. */ gpgme_key_t gpgme_signers_enum (const gpgme_ctx_t ctx, int seq); diff --git a/src/libgpgme.vers b/src/libgpgme.vers index 358b63c..0b2e89d 100644 --- a/src/libgpgme.vers +++ b/src/libgpgme.vers @@ -143,6 +143,7 @@ GPGME_1.0 { gpgme_set_textmode; gpgme_signers_add; gpgme_signers_clear; + gpgme_signers_count; gpgme_signers_enum; gpgme_key_ref; diff --git a/src/signers.c b/src/signers.c index 88f923c..f43fafc 100644 --- a/src/signers.c +++ b/src/signers.c @@ -93,6 +93,14 @@ gpgme_signers_add (gpgme_ctx_t ctx, const gpgme_key_t key) } +/* Return the number of signers in CTX. */ +unsigned int +gpgme_signers_count (const gpgme_ctx_t ctx) +{ + return ctx? ctx->signers_len : 0; +} + + /* Return the SEQth signer's key in CTX with one reference. */ gpgme_key_t gpgme_signers_enum (const gpgme_ctx_t ctx, int seq) ----------------------------------------------------------------------- Summary of changes: NEWS | 4 ++++ doc/gpgme.texi | 5 +++++ src/gpgme.def | 2 ++ src/gpgme.h.in | 3 +++ src/libgpgme.vers | 1 + src/signers.c | 8 ++++++++ 6 files changed, 23 insertions(+), 0 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Tue Jun 18 11:11:48 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Tue, 18 Jun 2013 11:11:48 +0200 Subject: [git] GPGME - branch, master, updated. gpgme-1.4.2-3-gff84d8d Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnuPG Made Easy". The branch, master has been updated via ff84d8d8945f3cb1fd045457282aa98070c9c58b (commit) from f2eeccbdfaf855a81abb92abe5ab4c702712bac7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit ff84d8d8945f3cb1fd045457282aa98070c9c58b Author: Werner Koch Date: Tue Jun 18 10:46:04 2013 +0200 doc: Fix variable name. -- GnuPG-bug-id: 1507 diff --git a/doc/gpgme.texi b/doc/gpgme.texi index 1a19370..08e2f0f 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -4993,7 +4993,7 @@ ciphertext created is determined by the @acronym{ASCII} armor (or, if that is not set, by the encoding specified for @var{cipher}) and the text mode attributes set for the context @var{ctx}. - at var{key} must be a @code{NULL}-terminated array of keys. The user + at var{recp} must be a @code{NULL}-terminated array of keys. The user must keep references for all keys during the whole duration of the call (but see @code{gpgme_op_encrypt_start} for the requirements with the asynchronous variant). ----------------------------------------------------------------------- Summary of changes: doc/gpgme.texi | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- GnuPG Made Easy http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 19 13:50:47 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 19 Jun 2013 13:50:47 +0200 Subject: [git] GpgEX - branch, master, updated. gpgex-0.9.7-13-gb21cad8 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnupG extension for the Windows Explorer". The branch, master has been updated via b21cad89a4a6de617d5020bed340cdfa7d0636d2 (commit) via 753447ce04b4aa26da5e38a4edc298ce17463878 (commit) via 45206d1760f99292f816e1b4db2feff5a8bb123d (commit) via e47dc1654d87ed75bd6e7dbb8db306155cfc1cc2 (commit) via 36820f660aa08006795d45c5b314062d853bac6c (commit) via 1ad1ca8dd2720936173ea90daa15573bf659f7d8 (commit) via 64c3912b3c77c5474496dba41e3c7f70599fa18d (commit) via c247b1ca815b68eca41be52f084cd8523a5cba39 (commit) via b9fa91597284f349dc238c68d3cbef1ad87071f2 (commit) via fa830d7a50a3d16b16b7e6ab9099d5bd48dbabab (commit) via ca35b9dfa43fa023f41f5510507b210060057386 (commit) via bcd9a56a9f018838f2dbaa3617a148e1853e58a7 (commit) via 6448129f58b84cf1742e87422489ae8fbc0f3b9f (commit) from f8ff671dbcdfdaa53695d6aa7a50ffb10adbe519 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b21cad89a4a6de617d5020bed340cdfa7d0636d2 Author: Werner Koch Date: Wed Jun 19 12:38:12 2013 +0200 Fix for changed definition of GetCommandString. * src/gpgex.h (IContextMenu3): Change first arg of GetCommandString to INT_PTR. * src/gpgex.cc (GetCommandString): Ditto. Cast it in the trace call. -- With W64 IContextMenu::GetCommandString changed from UINT to UINT_PTR to accomodate for it being a pointer internally. diff --git a/src/gpgex.cc b/src/gpgex.cc index 8837127..3125a25 100644 --- a/src/gpgex.cc +++ b/src/gpgex.cc @@ -387,7 +387,7 @@ gpgex_t::QueryContextMenu (HMENU hMenu, UINT indexMenu, UINT idCmdFirst, to return a wide character string. */ STDMETHODIMP -gpgex_t::GetCommandString (UINT idCommand, UINT uFlags, LPUINT lpReserved, +gpgex_t::GetCommandString (UINT_PTR idCommand, UINT uFlags, LPUINT lpReserved, LPSTR pszName, UINT uMaxNameLen) { const char *txt; @@ -395,7 +395,8 @@ gpgex_t::GetCommandString (UINT idCommand, UINT uFlags, LPUINT lpReserved, TRACE_BEG5 (DEBUG_CONTEXT_MENU, "gpgex_t::GetCommandString", this, "idCommand=%u, uFlags=%x, lpReserved=%lu, pszName=%p, " "uMaxNameLen=%u", - idCommand, uFlags, lpReserved, pszName, uMaxNameLen); + (unsigned int)(idCommand & 0xffffffff), + uFlags, lpReserved, pszName, uMaxNameLen); if (! (uFlags & GCS_HELPTEXT)) return TRACE_RES (E_INVALIDARG); diff --git a/src/gpgex.h b/src/gpgex.h index b2c64d2..6402dce 100644 --- a/src/gpgex.h +++ b/src/gpgex.h @@ -134,7 +134,8 @@ class gpgex_t : public IShellExtInit, public IContextMenu3 /* IContextMenu methods. */ STDMETHODIMP QueryContextMenu (HMENU hMenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags); - STDMETHODIMP GetCommandString (UINT idCommand, UINT uFlags, LPUINT lpReserved, + STDMETHODIMP GetCommandString (UINT_PTR idCommand, + UINT uFlags, LPUINT lpReserved, LPSTR pszName, UINT uMaxNameLen); STDMETHODIMP InvokeCommand (LPCMINVOKECOMMANDINFO lpcmi); commit 753447ce04b4aa26da5e38a4edc298ce17463878 Author: Werner Koch Date: Wed Jun 19 12:25:08 2013 +0200 Adjust sending of window-id for W64. * src/client.cc (send_options): Send window-id only if it firs into 32 bit. diff --git a/src/client.cc b/src/client.cc index 91c4123..3f17de3 100644 --- a/src/client.cc +++ b/src/client.cc @@ -231,8 +231,17 @@ send_options (assuan_context_t ctx, HWND hwnd, pid_t *r_pid) if (! rc && hwnd) { - snprintf (numbuf, sizeof (numbuf), "%lx", (unsigned long) hwnd); - rc = send_one_option (ctx, "window-id", numbuf); + /* We hope that HWND is limited to 32 bit. If not a 32 bit + UI-server would not be able to do anything with this + window-id. */ + uintptr_t tmp = (uintptr_t)hwnd; + + if (tmp & ~0xffffffff) + { + /* HWND fits into 32 bit - send it. */ + snprintf (numbuf, sizeof (numbuf), "%lx", (unsigned long)tmp); + rc = send_one_option (ctx, "window-id", numbuf); + } } return TRACE_GPGERR (rc); commit 45206d1760f99292f816e1b4db2feff5a8bb123d Author: Werner Koch Date: Wed Jun 19 12:24:18 2013 +0200 Fix compiler warning for W64. * src/debug.h (TRACE): Improve cast for W64. diff --git a/src/debug.h b/src/debug.h index 602b185..04a8cd1 100644 --- a/src/debug.h +++ b/src/debug.h @@ -119,7 +119,7 @@ void _gpgex_debug (unsigned int flags, const char *format, ...); #define TRACE(lvl, name, tag) \ (_gpgex_debug (lvl, "%s (%s=0x%x): call\n", \ - name, STRINGIFY (tag), (void *) tag), 0) + name, STRINGIFY (tag), (void *)(uintptr_t)tag), 0) #define TRACE0(lvl, name, tag, fmt) \ (_gpgex_debug (lvl, "%s (%s=0x%x): call: " fmt "\n", \ name, STRINGIFY (tag), (void *) tag), 0) commit e47dc1654d87ed75bd6e7dbb8db306155cfc1cc2 Author: Werner Koch Date: Wed Jun 19 12:02:34 2013 +0200 Remove trailing white space from more files. -- diff --git a/src/exechelp.c b/src/exechelp.c index 1db5d74..47e3e27 100644 --- a/src/exechelp.c +++ b/src/exechelp.c @@ -44,7 +44,7 @@ gpg_error_t gpgex_spawn_detached (const char *cmdline) { SECURITY_ATTRIBUTES sec_attr; - PROCESS_INFORMATION pi = + PROCESS_INFORMATION pi = { NULL, /* Returns process handle. */ 0, /* Returns primary thread handle. */ @@ -61,7 +61,7 @@ gpgex_spawn_detached (const char *cmdline) memset (&sec_attr, 0, sizeof sec_attr); sec_attr.nLength = sizeof sec_attr; sec_attr.bInheritHandle = FALSE; - + /* Start the process. Note that we can't run the PREEXEC function because this would change our own environment. */ memset (&si, 0, sizeof si); @@ -89,9 +89,9 @@ gpgex_spawn_detached (const char *cmdline) (void) TRACE_LOG1 ("CreateProcess failed: %i\n", GetLastError ()); return gpg_error (GPG_ERR_GENERAL); } - + /* Process has been created suspended; resume it now. */ - CloseHandle (pi.hThread); + CloseHandle (pi.hThread); CloseHandle (pi.hProcess); return 0; diff --git a/src/registry.c b/src/registry.c index 24238c3..4b23006 100644 --- a/src/registry.c +++ b/src/registry.c @@ -5,9 +5,9 @@ GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License - as published by the Free Software Foundation; either version 2.1 + as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU @@ -203,7 +203,7 @@ standard_homedir (void) if (!dir) { char path[MAX_PATH]; - + /* It might be better to use LOCAL_APPDATA because this is defined as "non roaming" and thus more likely to be kept locally. For private keys this is desired. However, given @@ -211,8 +211,8 @@ standard_homedir (void) using a system roaming services might be better than to let them do it manually. A security conscious user will anyway use the registry entry to have better control. */ - if (w32_shgetfolderpath (NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE, - NULL, 0, path) >= 0) + if (w32_shgetfolderpath (NULL, CSIDL_APPDATA|CSIDL_FLAG_CREATE, + NULL, 0, path) >= 0) { char *tmp = malloc (strlen (path) + 6 + 1); @@ -223,7 +223,7 @@ standard_homedir (void) strcat (tmp, "\\gnupg"); dir = tmp; - + /* Try to create the directory if it does not yet exists. */ if (access (dir, F_OK)) CreateDirectory (dir, NULL); @@ -245,7 +245,7 @@ default_homedir (void) if (!dir || !*dir) { static char *saved_dir; - + if (!saved_dir) { if (!dir || !*dir) @@ -262,7 +262,7 @@ default_homedir (void) if (tmp) saved_dir = tmp; } - + if (!saved_dir) saved_dir = standard_homedir (); } diff --git a/src/w32-gettext.c b/src/w32-gettext.c index c343bb7..952d2df 100644 --- a/src/w32-gettext.c +++ b/src/w32-gettext.c @@ -3,17 +3,17 @@ Copyright (C) 2005 g10 Code GmbH This file is part of libgpg-error. - + libgpg-error is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + libgpg-error is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with libgpg-error; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA @@ -740,7 +740,7 @@ _nl_locale_name (int category, const char *categoryname) On some systems this can be done by the 'setlocale' function itself. */ # if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL retval = setlocale (category, NULL); -# else +# else /* Setting of LC_ALL overwrites all other. */ retval = getenv ("LC_ALL"); if (retval == NULL || retval[0] == '\0') @@ -1292,7 +1292,7 @@ free_domain (struct loaded_domain *domain) free (domain); } - + /* The gettext implementation; support functions. */ static struct loaded_domain * load_domain (const char *filename) @@ -1304,7 +1304,7 @@ load_domain (const char *filename) struct loaded_domain *domain = NULL; size_t to_read; char *read_ptr; - + fp = fopen (filename, "rb"); if (!fp) return NULL; @@ -1359,12 +1359,12 @@ load_domain (const char *filename) } domain->data = (char *) data; domain->must_swap = data->magic != MAGIC; - + /* Fill in the information about the available tables. */ switch (SWAPIT (domain->must_swap, data->revision)) { case 0: - + domain->nstrings = SWAPIT (domain->must_swap, data->nstrings); domain->orig_tab = (struct string_desc *) ((char *) data + SWAPIT (domain->must_swap, data->orig_tab_offset)); @@ -1497,7 +1497,7 @@ wchar_to_utf8 (const wchar_t *string) result = malloc (n + 1); if (!result) return NULL; - + n = WideCharToMultiByte (CP_UTF8, 0, string, -1, result, n, NULL, NULL); if (n < 0) { @@ -1536,7 +1536,7 @@ utf8_to_native (const char *string) char * native_to_utf8 (const char *string) { - char *result; + char *result; wchar_t *wstring; wstring = native_to_wchar (string); @@ -1560,7 +1560,7 @@ get_string (struct loaded_domain *domain, u32 idx) char *p; p = domain->data + SWAPIT (domain->must_swap, domain->trans_tab[idx].offset); - if (!domain->mapped[idx]) + if (!domain->mapped[idx]) { size_t plen, buflen; char *buf; @@ -1592,7 +1592,7 @@ get_string (struct loaded_domain *domain, u32 idx) } free (buf); } - else if (domain->mapped[idx] == 2) + else if (domain->mapped[idx] == 2) { /* We need to get the string from the overflow_space. */ for (os=domain->overflow_space; os; os = os->next) @@ -1697,7 +1697,7 @@ gettext (const char *msgid) struct loaded_domain *domain; size_t act = 0; size_t top, bottom; - + if (!(domain = the_domain)) goto not_found; @@ -1722,7 +1722,7 @@ gettext (const char *msgid) + SWAPIT (domain->must_swap, domain->orig_tab[nstr - 1].offset))) return get_string (domain, nstr - 1); - + for(;;) { if (idx >= domain->hash_size - incr) commit 36820f660aa08006795d45c5b314062d853bac6c Author: Werner Koch Date: Wed Jun 19 12:00:45 2013 +0200 Fix a few compiler warnings. * src/registry.c (read_w32_registry_string): Cast an arg to LPBYTE to avoid signed/unsigned warning. * src/gpgex-class.cc (init): Remove var result - it is not checked. * src/client.cc (default_uiserver_cmdline): Rewrite alloced/non-alloced string code. diff --git a/src/client.cc b/src/client.cc index 7271d3a..91c4123 100644 --- a/src/client.cc +++ b/src/client.cc @@ -75,16 +75,17 @@ default_uiserver_cmdline (void) "Install Directory"); if (dir) { - char *uiserver = NULL; - int uiserver_malloced = 1; - - uiserver = read_w32_registry_string (NULL, REGKEY, "UI Server"); - if (! uiserver) + char *uiserver_buffer = NULL; + const char *uiserver; + + uiserver_buffer = read_w32_registry_string (NULL, + REGKEY, "UI Server"); + if (uiserver_buffer) + uiserver = uiserver_buffer; + else { string fname; - uiserver_malloced = 0; - try { fname = ((string) dir) + "\\" + "kleopatra.exe"; } catch (...) {} @@ -98,8 +99,7 @@ default_uiserver_cmdline (void) try { name = ((string) dir) + "\\" + uiserver; } catch (...) {} - if (uiserver_malloced) - free (uiserver); + free (uiserver_buffer); free ((void *) dir); } } diff --git a/src/gpgex-class.cc b/src/gpgex-class.cc index ffac30e..72f0cd6 100644 --- a/src/gpgex-class.cc +++ b/src/gpgex-class.cc @@ -43,7 +43,6 @@ CLSID CLSID_gpgex = CLSID_GPGEX; void gpgex_class::init (void) { - DWORD result; char key[MAX_PATH]; char value[MAX_PATH]; HKEY key_handle = 0; @@ -61,7 +60,7 @@ gpgex_class::init (void) /* The InprocServer32 key holds the path to the server component. */ strcpy (key, "CLSID\\{" CLSID_GPGEX_STR "}\\InprocServer32"); RegCreateKey (HKEY_CLASSES_ROOT, key, &key_handle); - result = GetModuleFileName (gpgex_server::instance, value, MAX_PATH); + GetModuleFileName (gpgex_server::instance, value, MAX_PATH); RegSetValueEx (key_handle, 0, 0, REG_SZ, (BYTE *) value, strlen (value) + 1); /* We also need a threading model. */ strcpy (key, "ThreadingModel"); diff --git a/src/registry.c b/src/registry.c index 1f97248..24238c3 100644 --- a/src/registry.c +++ b/src/registry.c @@ -141,7 +141,7 @@ read_w32_registry_string (const char *root, const char *dir, const char *name) result = malloc( (n1=nbytes+1) ); if( !result ) goto leave; - if( RegQueryValueEx( key_handle, name, 0, &type, result, &n1 ) ) { + if( RegQueryValueEx( key_handle, name, 0, &type, (LPBYTE)result, &n1 ) ) { free(result); result = NULL; goto leave; } commit 1ad1ca8dd2720936173ea90daa15573bf659f7d8 Author: Werner Koch Date: Wed Jun 19 11:57:30 2013 +0200 Fix warnings about winsock2.h inclusion. * src/client.cc, src/main.cc: Include winsock2.h before windows.h diff --git a/src/client.cc b/src/client.cc index f09cda0..7271d3a 100644 --- a/src/client.cc +++ b/src/client.cc @@ -29,6 +29,7 @@ using std::vector; using std::string; +#include #include #include diff --git a/src/main.cc b/src/main.cc index aec4bd4..d4fa460 100644 --- a/src/main.cc +++ b/src/main.cc @@ -23,6 +23,7 @@ #include #include +#include #include #include commit 64c3912b3c77c5474496dba41e3c7f70599fa18d Author: Werner Koch Date: Wed Jun 19 11:47:37 2013 +0200 Remove trailing white space. -- diff --git a/src/Makefile.am b/src/Makefile.am index 17d95f6..ec36b7f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ # Makefile.am - main makefile for dialogs part of GpgEX # Copyright (C) 2005, 2007 g10 Code GmbH -# +# # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. diff --git a/src/bitmaps.cc b/src/bitmaps.cc index 689aa15..4928412 100644 --- a/src/bitmaps.cc +++ b/src/bitmaps.cc @@ -1,18 +1,18 @@ /* bitmaps.cc - gpgex bitmap implementation Copyright (C) 2007 g10 Code GmbH - + This file is part of GpgEX. - + GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA @@ -54,7 +54,7 @@ gpgex_bitmaps_t::gpgex_bitmaps_t (void) automatically. */ int width = GetSystemMetrics (SM_CXMENUCHECK); int height = GetSystemMetrics (SM_CYMENUCHECK); - + /* All our images are square, so take the minimum and look for the biggest available size that fits in there. */ int max_size = (width < height) ? width : height; @@ -65,7 +65,7 @@ gpgex_bitmaps_t::gpgex_bitmaps_t (void) this->size = this->available_sizes[i]; else break; - + (void) TRACE3 (DEBUG_INIT, "gpgex_bitmaps_t::gpgex_bitmaps_t", this, "GetSystemMetrics: %ix%i (using %i)", width, height, this->size); @@ -87,7 +87,7 @@ HBITMAP gpgex_bitmaps_t::load_bitmap (string name) else (void) TRACE1 (DEBUG_INIT, "gpgex_bitmaps_t::load_bitmap", this, "loaded image %s", out.str().c_str()); - + /* FIXME: Create cache of images. */ return bmap; } diff --git a/src/bitmaps.h b/src/bitmaps.h index 69a23cc..40115a9 100644 --- a/src/bitmaps.h +++ b/src/bitmaps.h @@ -2,17 +2,17 @@ Copyright (C) 2007 g10 Code GmbH This file is part of GpgEX. - + GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA diff --git a/src/client.cc b/src/client.cc index 80982e5..f09cda0 100644 --- a/src/client.cc +++ b/src/client.cc @@ -1,18 +1,18 @@ /* client.cc - gpgex assuan client implementation Copyright (C) 2007, 2008 g10 Code GmbH - + This file is part of GpgEX. - + GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA @@ -48,7 +48,7 @@ default_socket_name (void) if (name.size () == 0) { char *dir = NULL; - + dir = default_homedir (); if (dir) { @@ -76,14 +76,14 @@ default_uiserver_cmdline (void) { char *uiserver = NULL; int uiserver_malloced = 1; - + uiserver = read_w32_registry_string (NULL, REGKEY, "UI Server"); if (! uiserver) { string fname; uiserver_malloced = 0; - + try { fname = ((string) dir) + "\\" + "kleopatra.exe"; } catch (...) {} @@ -181,7 +181,7 @@ send_one_option (assuan_context_t ctx, const char *name, const char *value) if (! value || ! *value) err = 0; /* Avoid sending empty strings. */ - else + else { snprintf (buffer, sizeof (buffer), "OPTION %s=%s", name, value); err = assuan_transact (ctx, buffer, NULL, NULL, NULL, NULL, NULL, NULL); @@ -307,7 +307,7 @@ client_t::call_assuan (const char *cmd, vector &filenames) int rc = 0; assuan_context_t ctx = NULL; string msg; - + TRACE_BEG2 (DEBUG_ASSUAN, "client_t::call_assuan", this, "%s on %u files", cmd, filenames.size ()); @@ -321,15 +321,15 @@ client_t::call_assuan (const char *cmd, vector &filenames) for (unsigned int i = 0; i < filenames.size (); i++) { msg = "FILE " + escape (filenames[i]); - + (void) TRACE_LOG1 ("sending cmd: %s", msg.c_str ()); - + rc = assuan_transact (ctx, msg.c_str (), NULL, NULL, NULL, NULL, NULL, NULL); if (rc) goto leave; } - + /* Set the --nohup option, so that the operation continues and completes in the background. */ msg = ((string) cmd) + " --nohup"; @@ -345,7 +345,7 @@ client_t::call_assuan (const char *cmd, vector &filenames) { rc = gpg_error (GPG_ERR_GENERAL); } - + /* Fall-through. */ leave: TRACE_GPGERR (rc); diff --git a/src/client.h b/src/client.h index 860f8e1..81fdfd6 100644 --- a/src/client.h +++ b/src/client.h @@ -2,17 +2,17 @@ Copyright (C) 2007 g10 Code GmbH This file is part of GpgEX. - + GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA @@ -41,7 +41,7 @@ class client_t : window (window_handle) { } - + void decrypt_verify (vector &filenames); void decrypt (vector &filenames); void verify (vector &filenames); diff --git a/src/debug.h b/src/debug.h index 8eaf14c..602b185 100644 --- a/src/debug.h +++ b/src/debug.h @@ -2,17 +2,17 @@ Copyright (C) 2007 g10 Code GmbH This file is part of GpgEX. - + GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA diff --git a/src/gpgex-class.cc b/src/gpgex-class.cc index 3dad91c..ffac30e 100644 --- a/src/gpgex-class.cc +++ b/src/gpgex-class.cc @@ -2,17 +2,17 @@ Copyright (C) 2007 g10 Code GmbH This file is part of GpgEX. - + GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA diff --git a/src/gpgex-class.h b/src/gpgex-class.h index f55ce69..5722cf6 100644 --- a/src/gpgex-class.h +++ b/src/gpgex-class.h @@ -2,17 +2,17 @@ Copyright (C) 2007 g10 Code GmbH This file is part of GpgEX. - + GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA diff --git a/src/gpgex-factory.cc b/src/gpgex-factory.cc index 49ce2c5..c4c4678 100644 --- a/src/gpgex-factory.cc +++ b/src/gpgex-factory.cc @@ -2,17 +2,17 @@ Copyright (C) 2007 g10 Code GmbH This file is part of GpgEX. - + GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA diff --git a/src/gpgex-factory.h b/src/gpgex-factory.h index 40d4ce7..b8e8347 100644 --- a/src/gpgex-factory.h +++ b/src/gpgex-factory.h @@ -2,17 +2,17 @@ Copyright (C) 2007 g10 Code GmbH This file is part of GpgEX. - + GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA diff --git a/src/gpgex.cc b/src/gpgex.cc index 9f9a4dc..8837127 100644 --- a/src/gpgex.cc +++ b/src/gpgex.cc @@ -1,18 +1,18 @@ /* gpgex.cc - gpgex implementation Copyright (C) 2007 g10 Code GmbH - + This file is part of GpgEX. - + GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA @@ -148,7 +148,7 @@ gpgex_t::Release (void) /* IShellExtInit methods. */ STDMETHODIMP -gpgex_t::Initialize (LPCITEMIDLIST pIDFolder, IDataObject *pDataObj, +gpgex_t::Initialize (LPCITEMIDLIST pIDFolder, IDataObject *pDataObj, HKEY hRegKey) { HRESULT err = S_OK; @@ -165,7 +165,7 @@ gpgex_t::Initialize (LPCITEMIDLIST pIDFolder, IDataObject *pDataObj, try { if (pDataObj) - { + { /* The data object contains a drop item which we extract. */ FORMATETC fe = { CF_HDROP, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL}; STGMEDIUM medium; @@ -175,7 +175,7 @@ gpgex_t::Initialize (LPCITEMIDLIST pIDFolder, IDataObject *pDataObj, { HDROP drop = (HDROP) GlobalLock (medium.hGlobal); unsigned int i; - + /* Now that we have the drop item, we can extract the file names. */ count = DragQueryFile (drop, (UINT) -1, NULL, 0); @@ -209,7 +209,7 @@ gpgex_t::Initialize (LPCITEMIDLIST pIDFolder, IDataObject *pDataObj, || ! strcasecmp (ending, "p7s") ) gpg = true; - + if (gpg == false) this->all_files_gpg = FALSE; } @@ -277,7 +277,7 @@ gpgex_t::QueryContextMenu (HMENU hMenu, UINT indexMenu, UINT idCmdFirst, res = InsertMenu (hMenu, indexMenu++, MF_BYPOSITION | MF_SEPARATOR, 0, NULL); if (! res) return TRACE_RES (HRESULT_FROM_WIN32 (GetLastError ())); - + /* First we add the file-specific menus. */ if (this->all_files_gpg) { @@ -535,7 +535,7 @@ start_help (HWND hwnd) } url[URLSIZE - 1] = '\0'; } - + BSTR burl = SysAllocString ((const OLECHAR *) url); VARIANT vars[4]; memset (vars, 0, sizeof (vars)); @@ -563,7 +563,7 @@ gpgex_t::InvokeCommand (LPCMINVOKECOMMANDINFO lpcmi) and bail out. */ if (HIWORD (lpcmi->lpVerb) != 0) return TRACE_RES (E_INVALIDARG); - + client_t client (lpcmi->hwnd); /* Get the command index, which is the offset to IDCMDFIRST of diff --git a/src/gpgex.h b/src/gpgex.h index 270d755..b2c64d2 100644 --- a/src/gpgex.h +++ b/src/gpgex.h @@ -2,17 +2,17 @@ Copyright (C) 2007 g10 Code GmbH This file is part of GpgEX. - + GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA @@ -33,7 +33,7 @@ using std::string; #include "bitmaps.h" /* Our shell extension interface. We use multiple inheritance to - achieve polymorphy. + achieve polymorphy. NOTE 1: By this we save some effort, but we can only provide one implementation for each virtual function signature. The overlap in @@ -84,7 +84,7 @@ class gpgex_t : public IShellExtInit, public IContextMenu3 /* Support for IShellExtInit. */ vector filenames; - + /* TRUE if all files in filenames are directly related to GPG. */ BOOL all_files_gpg; @@ -128,7 +128,7 @@ class gpgex_t : public IShellExtInit, public IContextMenu3 STDMETHODIMP_(ULONG) Release (void); /* IShellExtInit methods. */ - STDMETHODIMP Initialize (LPCITEMIDLIST pIDFolder, IDataObject *pDataObj, + STDMETHODIMP Initialize (LPCITEMIDLIST pIDFolder, IDataObject *pDataObj, HKEY hRegKey); /* IContextMenu methods. */ diff --git a/src/main.cc b/src/main.cc index 8801903..aec4bd4 100644 --- a/src/main.cc +++ b/src/main.cc @@ -5,16 +5,16 @@ GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License - as published by the Free Software Foundation; either version 2.1 + as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU Lesser General Public License - along with GpgEX; if not, write to the Free Software Foundation, + along with GpgEX; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ #if HAVE_CONFIG_H @@ -56,7 +56,7 @@ get_locale_dir (void) "Install Directory"); if (!instdir) return NULL; - + /* Build the key: "/share/locale". */ #define SLDIR "\\share\\locale" dname = static_cast (malloc (strlen (instdir) + strlen (SLDIR) + 1)); @@ -69,9 +69,9 @@ get_locale_dir (void) strcpy (p, instdir); p += strlen (instdir); strcpy (p, SLDIR); - + free (instdir); - + return dname; } @@ -134,7 +134,7 @@ debug_init (void) if (debug_file) return; - InitializeCriticalSection (&debug_lock); + InitializeCriticalSection (&debug_lock); filename = get_debug_file (); if (!filename) @@ -169,7 +169,7 @@ extern "C" { #endif /* Log the formatted string FORMAT at debug level LEVEL or higher. */ -extern +extern void _gpgex_debug (unsigned int flags, const char *format, ...) { @@ -180,7 +180,7 @@ _gpgex_debug (unsigned int flags, const char *format, ...) if (! (debug_flags & flags)) return; - + va_start (arg_ptr, format); EnterCriticalSection (&debug_lock); vfprintf (debug_file, format, arg_ptr); @@ -211,7 +211,7 @@ DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved) /* Early initializations of our subsystems. */ gpg_err_init (); - + i18n_init (); debug_init (); @@ -228,7 +228,7 @@ DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved) { WSADATA wsadat; - + WSAStartup (0x202, &wsadat); } } @@ -245,7 +245,7 @@ DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved) function to cleanly deinitialize libgpg-error. */ gpg_err_deinit (0); } - + return TRUE; } diff --git a/src/main.h b/src/main.h index 19eae9e..fe1b03b 100644 --- a/src/main.h +++ b/src/main.h @@ -2,17 +2,17 @@ Copyright (C) 2007 g10 Code GmbH This file is part of GpgEX. - + GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA @@ -67,6 +67,6 @@ class gpgex_server #define GUID_FMT "{%08lX-%04hX-%04hX-%02hhX%02hhX-%02hhX%02hhX%02hhX%02hhX%02hhX%02hhX}" #define GUID_ARG(x) (x).Data1, (x).Data2, (x).Data3, (x).Data4[0], \ (x).Data4[1], (x).Data4[2], (x).Data4[3], (x).Data4[4], \ - (x).Data4[5], (x).Data4[6], (x).Data4[7] + (x).Data4[5], (x).Data4[6], (x).Data4[7] #endif diff --git a/src/registry.h b/src/registry.h index d4424ee..2eb1637 100644 --- a/src/registry.h +++ b/src/registry.h @@ -2,17 +2,17 @@ Copyright (C) 2006, 2007 g10 Code GmbH This file is part of GpgEX. - + GpgEX is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. - + GpgEX is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA diff --git a/src/w32-gettext.h b/src/w32-gettext.h index 03f79dc..e8cd0fa 100644 --- a/src/w32-gettext.h +++ b/src/w32-gettext.h @@ -2,17 +2,17 @@ Copyright (C) 2005 g10 Code GmbH This file is part of libgpg-error. - + libgpg-error is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. - + libgpg-error is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - + You should have received a copy of the GNU Lesser General Public License along with libgpg-error; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA commit c247b1ca815b68eca41be52f084cd8523a5cba39 Author: Werner Koch Date: Wed Jun 19 11:43:03 2013 +0200 Fix helper function prototype. * src/gpgex.cc (get_lang_name): Return const char *. diff --git a/src/gpgex.cc b/src/gpgex.cc index c6ab468..9f9a4dc 100644 --- a/src/gpgex.cc +++ b/src/gpgex.cc @@ -466,7 +466,7 @@ gpgex_t::GetCommandString (UINT idCommand, UINT uFlags, LPUINT lpReserved, } -static char * +static const char * get_lang_name (void) { LANGID lang; commit b9fa91597284f349dc238c68d3cbef1ad87071f2 Author: Werner Koch Date: Wed Jun 19 11:38:26 2013 +0200 Remove unneeded hack to silence a compiler warning. * src/gpgex.h (IContextMenu3): Revert commit c25e06d5 from 2007-09-05. -- g++ 4.6.3 does emit such a warning. diff --git a/src/gpgex.h b/src/gpgex.h index 70d4a3e..270d755 100644 --- a/src/gpgex.h +++ b/src/gpgex.h @@ -106,8 +106,7 @@ class gpgex_t : public IShellExtInit, public IContextMenu3 (void) TRACE_SUC (); } - /* The "virtual" fixes a compile time warning. */ - virtual ~gpgex_t (void) + ~gpgex_t (void) { TRACE_BEG (DEBUG_INIT, "gpgex_t::~gpgex_t", this); commit fa830d7a50a3d16b16b7e6ab9099d5bd48dbabab Author: Werner Koch Date: Tue Jun 18 14:59:44 2013 +0200 Use the right compiler for make distcheck. * Makefile.am (DISTCHECK_CONFIGURE_FLAGS): Use @host@ and @build@ diff --git a/Makefile.am b/Makefile.am index 7bbb895..ed1c11f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ # Makefile.am - main makefile for GpgEX # Copyright (C) 2005 g10 Code GmbH -# +# # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. @@ -13,8 +13,8 @@ ACLOCAL_AMFLAGS = -I m4 AUTOMAKE_OPTIONS = no-dist-gzip dist-bzip2 -# Because we can only build the w32 version e need to help automake here a bit. -DISTCHECK_CONFIGURE_FLAGS = --host=i586-mingw32msvc --build=i686-pc-linux-gnu \ +# Because we can only build the w32 version we need to help automake. +DISTCHECK_CONFIGURE_FLAGS = --host=@host@ --build=@build@ \ --with-libassuan-prefix=@prefix@ \ --with-gpg-error-prefix=@prefix@ \ --prefix=@prefix@ commit ca35b9dfa43fa023f41f5510507b210060057386 Author: Werner Koch Date: Tue Jun 18 14:53:31 2013 +0200 Add a .gitignore file. -- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..70a48ef --- /dev/null +++ b/.gitignore @@ -0,0 +1,13 @@ +/Makefile.in +/aclocal.m4 +/autom4te.cache/ +/config.h.in +/configure +/doc/Makefile.in +/doc/gpgex.info +/doc/mdate-sh +/doc/stamp-vti +/doc/version.texi +/m4/Makefile.in +/po/gpgex.pot +/src/Makefile.in commit bcd9a56a9f018838f2dbaa3617a148e1853e58a7 Author: Werner Koch Date: Tue Jun 18 14:53:04 2013 +0200 Auto update PO files. -- diff --git a/po/ar.po b/po/ar.po index b247d5a..6f71705 100644 --- a/po/ar.po +++ b/po/ar.po @@ -7,10 +7,10 @@ msgid "" msgstr "" "Project-Id-Version: gpgex\n" "Report-Msgid-Bugs-To: bug-gpgex at g10code.com\n" -"POT-Creation-Date: 2010-07-21 10:07+0200\n" "PO-Revision-Date: 2008-03-24 23:07+0200\n" "Last-Translator: ???????? ?????????? \n" "Language-Team: arabeyes.org \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" @@ -19,7 +19,6 @@ msgstr "" "X-Poedit-Language: Arabic\n" "X-Poedit-SourceCharset: utf-8\n" -#: src/client.cc:357 #, c-format msgid "" "Can not access Kleopatra:\r\n" @@ -28,90 +27,68 @@ msgstr "" "?????????? ???????????? ?????? ??????????????????:\r\n" "%s" -#: src/gpgex.cc:58 msgid "Help on GpgEX" msgstr "??????????????? ?????? ???GpgEx???" -#: src/gpgex.cc:59 msgid "Decrypt and verify" msgstr "?????????? ?? ????????" -#: src/gpgex.cc:60 msgid "Decrypt" msgstr "??????????" -#: src/gpgex.cc:61 msgid "Verify" msgstr "????????" -#: src/gpgex.cc:62 msgid "Sign and encrypt" msgstr "?????????? ?? ????????" -#: src/gpgex.cc:63 msgid "Encrypt" msgstr "????????" -#: src/gpgex.cc:64 msgid "Sign" msgstr "??????????" -#: src/gpgex.cc:65 msgid "Import keys" msgstr "???????????? ????????????????" -#: src/gpgex.cc:66 msgid "Create checksums" msgstr "???????? ??????????????" -#: src/gpgex.cc:67 msgid "Verify checksums" msgstr "???????? ??????????????????" -#: src/gpgex.cc:313 msgid "More GpgEX options" msgstr "??????????? ???? ???????????? ???GpgEx???" -#: src/gpgex.cc:409 msgid "Invoke the GpgEX documentation." msgstr "??????????? ?????????? ???GpgEx???" -#: src/gpgex.cc:413 msgid "Decrypt and verify the marked files." msgstr "?????????? ?? ???????? ???? ?????????????? ??????????????????." -#: src/gpgex.cc:417 msgid "Decrypt the marked files." msgstr "?????????? ?????????????? ??????????????????." -#: src/gpgex.cc:421 msgid "Verify the marked files." msgstr "???????? ???? ?????????????? ?????????????? ??????????????????." -#: src/gpgex.cc:425 msgid "Sign and encrypt the marked files." msgstr "?????????? ?? ???????? ?????????????? ??????????????????." -#: src/gpgex.cc:429 msgid "Encrypt the marked files." msgstr "???????? ?????????????? ??????????????????." -#: src/gpgex.cc:433 msgid "Sign the marked files." msgstr "?????????? ?????????????? ??????????????????." -#: src/gpgex.cc:437 msgid "Import the marked files." msgstr "???????????? ?????????????? ??????????????????." -#: src/gpgex.cc:441 msgid "Create checksums." msgstr "???????? ??????????????." -#: src/gpgex.cc:445 msgid "Verify checksums." msgstr "???????? ??????????????????." -#: src/gpgex.cc:449 msgid "Show more GpgEX options." msgstr "??????????? ?????????? ???? ???????????? ???GpgEx???." diff --git a/po/de.po b/po/de.po index e1d9cb7..902dea8 100644 --- a/po/de.po +++ b/po/de.po @@ -7,16 +7,15 @@ msgid "" msgstr "" "Project-Id-Version: gpgex 0.0.0-svn10\n" "Report-Msgid-Bugs-To: bug-gpgex at g10code.com\n" -"POT-Creation-Date: 2010-07-21 10:07+0200\n" "PO-Revision-Date: 2009-01-22 16:11+0100\n" "Last-Translator: Marcus Brinkmann \n" "Language-Team: German\n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/client.cc:357 #, c-format msgid "" "Can not access Kleopatra:\r\n" @@ -25,90 +24,68 @@ msgstr "" "Kann nicht auf Kleopatra zugreifen:\r\n" "%s" -#: src/gpgex.cc:58 msgid "Help on GpgEX" msgstr "Hilfe zu GpgEX" -#: src/gpgex.cc:59 msgid "Decrypt and verify" msgstr "Entschl??sseln und pr??fen" -#: src/gpgex.cc:60 msgid "Decrypt" msgstr "Entschl??sseln" -#: src/gpgex.cc:61 msgid "Verify" msgstr "Pr??fen" -#: src/gpgex.cc:62 msgid "Sign and encrypt" msgstr "Signieren und verschl??sseln" -#: src/gpgex.cc:63 msgid "Encrypt" msgstr "Verschl??sseln" -#: src/gpgex.cc:64 msgid "Sign" msgstr "Signieren" -#: src/gpgex.cc:65 msgid "Import keys" msgstr "Zertifikate importieren" -#: src/gpgex.cc:66 msgid "Create checksums" msgstr "Pr??fsummen erstellen" -#: src/gpgex.cc:67 msgid "Verify checksums" msgstr "Pr??fsummen ??berpr??fen" -#: src/gpgex.cc:313 msgid "More GpgEX options" msgstr "Mehr GpgEX Optionen" -#: src/gpgex.cc:409 msgid "Invoke the GpgEX documentation." msgstr "??ffne die Dokumentation zu GpgEX" -#: src/gpgex.cc:413 msgid "Decrypt and verify the marked files." msgstr "Die markierten Dateien entschl??sseln und pr??fen." -#: src/gpgex.cc:417 msgid "Decrypt the marked files." msgstr "Die markierten Dateien entschl??sseln." -#: src/gpgex.cc:421 msgid "Verify the marked files." msgstr "Die markierten Dateien pr??fen." -#: src/gpgex.cc:425 msgid "Sign and encrypt the marked files." msgstr "Die markierten Dateien signieren und verschl??sseln." -#: src/gpgex.cc:429 msgid "Encrypt the marked files." msgstr "Die markierten Dateien verschl??sseln." -#: src/gpgex.cc:433 msgid "Sign the marked files." msgstr "Die markierten Dateien signieren." -#: src/gpgex.cc:437 msgid "Import the marked files." msgstr "Die markierten Dateien importieren." -#: src/gpgex.cc:441 msgid "Create checksums." msgstr "F??r die markierten Dateien Pr??fsummen erstellen." -#: src/gpgex.cc:445 msgid "Verify checksums." msgstr "Die Pr??fsummen der markierten Dateien ??berpr??fen." -#: src/gpgex.cc:449 msgid "Show more GpgEX options." msgstr "Mehr GpgEX Optionen." diff --git a/po/es.po b/po/es.po index 9c0744b..f794aab 100644 --- a/po/es.po +++ b/po/es.po @@ -8,15 +8,14 @@ msgid "" msgstr "" "Project-Id-Version: GpgEX FIXME:VERSION\n" "Report-Msgid-Bugs-To: bug-gpgex at g10code.com\n" -"POT-Creation-Date: 2010-07-21 10:07+0200\n" "PO-Revision-Date: 2008-03-15 08:03+0100\n" "Last-Translator: \n" "Language-Team: Spanish \n" +"Language: es\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/client.cc:357 #, c-format msgid "" "Can not access Kleopatra:\r\n" @@ -25,90 +24,68 @@ msgstr "" "No se pudo acceder a Kleopatra:\r\n" "%s" -#: src/gpgex.cc:58 msgid "Help on GpgEX" msgstr "Ayuda de GpgEX" -#: src/gpgex.cc:59 msgid "Decrypt and verify" msgstr "Descifrar y verificar." -#: src/gpgex.cc:60 msgid "Decrypt" msgstr "Descifrar" -#: src/gpgex.cc:61 msgid "Verify" msgstr "Verificar" -#: src/gpgex.cc:62 msgid "Sign and encrypt" msgstr "Firmar y cifrar" -#: src/gpgex.cc:63 msgid "Encrypt" msgstr "Cifrar" -#: src/gpgex.cc:64 msgid "Sign" msgstr "Firmar" -#: src/gpgex.cc:65 msgid "Import keys" msgstr "Importar claves" -#: src/gpgex.cc:66 msgid "Create checksums" msgstr "Crear sumas de comprobaci??n." -#: src/gpgex.cc:67 msgid "Verify checksums" msgstr "Verificar sumas de comprobaci??n." -#: src/gpgex.cc:313 msgid "More GpgEX options" msgstr "M??s opciones de GpgEX" -#: src/gpgex.cc:409 msgid "Invoke the GpgEX documentation." msgstr "Invocar la documentaci??n de GpgEX." -#: src/gpgex.cc:413 msgid "Decrypt and verify the marked files." msgstr "Descifrar y verificar los archivos marcados." -#: src/gpgex.cc:417 msgid "Decrypt the marked files." msgstr "Descifrar los archivos marcados." -#: src/gpgex.cc:421 msgid "Verify the marked files." msgstr "Verificar los archivos marcados." -#: src/gpgex.cc:425 msgid "Sign and encrypt the marked files." msgstr "Firmar y cifrar firmar los archivos marcados." -#: src/gpgex.cc:429 msgid "Encrypt the marked files." msgstr "Cifrar los archivos marcados." -#: src/gpgex.cc:433 msgid "Sign the marked files." msgstr "Firmar los archivos marcados." -#: src/gpgex.cc:437 msgid "Import the marked files." msgstr "Importar los archivos marcados." -#: src/gpgex.cc:441 msgid "Create checksums." msgstr "Crear sumas de comprobaci??n." -#: src/gpgex.cc:445 msgid "Verify checksums." msgstr "Verificar sumas de comprobaci??n." -#: src/gpgex.cc:449 msgid "Show more GpgEX options." msgstr "Mostrar m??s opciones de GpgEX." diff --git a/po/pt.po b/po/pt.po index 0c1b656..a58b507 100644 --- a/po/pt.po +++ b/po/pt.po @@ -8,10 +8,10 @@ msgid "" msgstr "" "Project-Id-Version: GpgEX\n" "Report-Msgid-Bugs-To: bug-gpgex at g10code.com\n" -"POT-Creation-Date: 2010-07-21 10:07+0200\n" "PO-Revision-Date: 2010-07-18 18:51-0000\n" "Last-Translator: Marco A.G.Pinto \n" "Language-Team: Portuguese \n" +"Language: pt\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=iso-8859-1\n" "Content-Transfer-Encoding: 8bit\n" @@ -19,7 +19,6 @@ msgstr "" "X-Poedit-Country: PORTUGAL\n" "X-Poedit-SourceCharset: iso-8859-1\n" -#: src/client.cc:357 #, c-format msgid "" "Can not access Kleopatra:\r\n" @@ -28,90 +27,68 @@ msgstr "" "N?o ? poss?vel aceder a Kleopatra:\r\n" "%s" -#: src/gpgex.cc:58 msgid "Help on GpgEX" msgstr "Ajuda de GpgEX" -#: src/gpgex.cc:59 msgid "Decrypt and verify" msgstr "Desencriptar e verificar" -#: src/gpgex.cc:60 msgid "Decrypt" msgstr "Desencriptar" -#: src/gpgex.cc:61 msgid "Verify" msgstr "Verificar" -#: src/gpgex.cc:62 msgid "Sign and encrypt" msgstr "Assinar e encriptar" -#: src/gpgex.cc:63 msgid "Encrypt" msgstr "Encriptar" -#: src/gpgex.cc:64 msgid "Sign" msgstr "Assinar" -#: src/gpgex.cc:65 msgid "Import keys" msgstr "Importar chaves" -#: src/gpgex.cc:66 msgid "Create checksums" msgstr "Criar checksums" -#: src/gpgex.cc:67 msgid "Verify checksums" msgstr "Verificar checksums" -#: src/gpgex.cc:313 msgid "More GpgEX options" msgstr "Mais op??es do GpgEX" -#: src/gpgex.cc:409 msgid "Invoke the GpgEX documentation." msgstr "Invocar a documenta??o do GpgEX." -#: src/gpgex.cc:413 msgid "Decrypt and verify the marked files." msgstr "Desencriptar e verificar os ficheiros marcados." -#: src/gpgex.cc:417 msgid "Decrypt the marked files." msgstr "Desencriptar os ficheiros marcados." -#: src/gpgex.cc:421 msgid "Verify the marked files." msgstr "Verificar os ficheiros marcados." -#: src/gpgex.cc:425 msgid "Sign and encrypt the marked files." msgstr "Assinar e encriptar os ficheiros marcados." -#: src/gpgex.cc:429 msgid "Encrypt the marked files." msgstr "Encriptar os ficheiros marcados." -#: src/gpgex.cc:433 msgid "Sign the marked files." msgstr "Assinar os ficheiros marcados." -#: src/gpgex.cc:437 msgid "Import the marked files." msgstr "Importar os ficheiros marcados." -#: src/gpgex.cc:441 msgid "Create checksums." msgstr "Criar checksums." -#: src/gpgex.cc:445 msgid "Verify checksums." msgstr "Verificar checksums." -#: src/gpgex.cc:449 msgid "Show more GpgEX options." msgstr "Mostrar mais op??es do GpgEX." diff --git a/po/ru.po b/po/ru.po index cac4284..c5b1465 100644 --- a/po/ru.po +++ b/po/ru.po @@ -7,17 +7,16 @@ msgid "" msgstr "" "Project-Id-Version: GpgEX\n" "Report-Msgid-Bugs-To: bug-gpgex at g10code.com\n" -"POT-Creation-Date: 2010-07-21 10:07+0200\n" "PO-Revision-Date: 2008-03-23 21:39+0300\n" "Last-Translator: Sergei Smirnov \n" "Language-Team: Sergei Smirnov \n" +"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Russian\n" "X-Poedit-Country: RUSSIAN FEDERATION\n" -#: src/client.cc:357 #, c-format msgid "" "Can not access Kleopatra:\r\n" @@ -26,90 +25,68 @@ msgstr "" "?????? ?????????????? ?? ?????????????????? Kleopatra:\r\n" "%s" -#: src/gpgex.cc:58 msgid "Help on GpgEX" msgstr "???????????? ???? GpgEX" -#: src/gpgex.cc:59 msgid "Decrypt and verify" msgstr "???????????????????????? ?? ??????????????????" -#: src/gpgex.cc:60 msgid "Decrypt" msgstr "????????????????????????" -#: src/gpgex.cc:61 msgid "Verify" msgstr "??????????????????" -#: src/gpgex.cc:62 msgid "Sign and encrypt" msgstr "?????????????????? ?? ??????????????????????" -#: src/gpgex.cc:63 msgid "Encrypt" msgstr "??????????????????????" -#: src/gpgex.cc:64 msgid "Sign" msgstr "??????????????????" -#: src/gpgex.cc:65 msgid "Import keys" msgstr "?????????????????????????? ??????????" -#: src/gpgex.cc:66 msgid "Create checksums" msgstr "?????????????? ?????????????????????? ??????????" -#: src/gpgex.cc:67 msgid "Verify checksums" msgstr "?????????????????? ?????????????????????? ??????????" -#: src/gpgex.cc:313 msgid "More GpgEX options" msgstr "???????????? ?????????????????? GpgEX" -#: src/gpgex.cc:409 msgid "Invoke the GpgEX documentation." msgstr "?????????????? ???????????????????????? GpgEX." -#: src/gpgex.cc:413 msgid "Decrypt and verify the marked files." msgstr "???????????????????????? ?? ?????????????????? ???????????????????? ??????????." -#: src/gpgex.cc:417 msgid "Decrypt the marked files." msgstr "???????????????????????? ???????????????????? ??????????." -#: src/gpgex.cc:421 msgid "Verify the marked files." msgstr "?????????????????? ???????????????????? ??????????." -#: src/gpgex.cc:425 msgid "Sign and encrypt the marked files." msgstr "?????????????????? ?? ?????????????????????? ???????????????????? ??????????." -#: src/gpgex.cc:429 msgid "Encrypt the marked files." msgstr "?????????????????????? ???????????????????? ??????????." -#: src/gpgex.cc:433 msgid "Sign the marked files." msgstr "?????????????????? ???????????????????? ??????????." -#: src/gpgex.cc:437 msgid "Import the marked files." msgstr "?????????????????????????? ???????????????????? ??????????." -#: src/gpgex.cc:441 msgid "Create checksums." msgstr "?????????????? ?????????????????????? ??????????." -#: src/gpgex.cc:445 msgid "Verify checksums." msgstr "?????????????????? ?????????????????????? ??????????." -#: src/gpgex.cc:449 msgid "Show more GpgEX options." msgstr "???????????? ?????????????????? GpgEX." commit 6448129f58b84cf1742e87422489ae8fbc0f3b9f Author: Werner Koch Date: Tue Jun 18 14:46:53 2013 +0200 Update autogen.sh and configure.ac to support W64. * autogen.sh: Modernize and support --build-w64. * configure.ac: Suport building for W64. diff --git a/autogen.sh b/autogen.sh index 38529b1..c3adc89 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Run this to generate all the initial makefiles, etc. +# Run this to generate all the initial makefiles, etc. # # Copyright (C) 2003 g10 Code GmbH # @@ -28,16 +28,6 @@ check_version () { return 1 } -# Allow to override the default tool names -AUTOCONF=${AUTOCONF_PREFIX}${AUTOCONF:-autoconf}${AUTOCONF_SUFFIX} -AUTOHEADER=${AUTOCONF_PREFIX}${AUTOHEADER:-autoheader}${AUTOCONF_SUFFIX} - -AUTOMAKE=${AUTOMAKE_PREFIX}${AUTOMAKE:-automake}${AUTOMAKE_SUFFIX} -ACLOCAL=${AUTOMAKE_PREFIX}${ACLOCAL:-aclocal}${AUTOMAKE_SUFFIX} - -GETTEXT=${GETTEXT_PREFIX}${GETTEXT:-gettext}${GETTEXT_SUFFIX} -MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX} - DIE=no FORCE= if test x"$1" = x"--force"; then @@ -45,9 +35,45 @@ if test x"$1" = x"--force"; then shift fi +# Begin list of optional variables sourced from ~/.gnupg-autogen.rc +w32_toolprefixes= +w32_extraoptions= +w64_toolprefixes= +w64_extraoptions= +# End list of optional variables sourced from ~/.gnupg-autogen.rc +# What follows are variables which are sourced but default to +# environment variables or lacking them hardcoded values. +#w32root= +#w64root= + +if [ -f "$HOME/.gnupg-autogen.rc" ]; then + echo "sourcing extra definitions from $HOME/.gnupg-autogen.rc" + . "$HOME/.gnupg-autogen.rc" +fi + +# Convenience option to use certain configure options for some hosts. +myhost="" +myhostsub="" +case "$1" in + --build-w32) + myhost="w32" + ;; + --build-w64) + myhost="w32" + myhostsub="64" + ;; + --build*) + echo "**Error**: invalid build option $1" >&2 + exit 1 + ;; + *) + ;; +esac + + # ***** W32 build script ******* # Used to cross-compile for Windows. -if test "$1" = "--build-w32"; then +if [ "$myhost" = "w32" ]; then tmp=`dirname $0` tsdir=`cd "$tmp"; pwd` shift @@ -57,30 +83,38 @@ if test "$1" = "--build-w32"; then fi build=`$tsdir/config.guess` - [ -z "$w32root" ] && w32root="$HOME/w32root" + case $myhostsub in + 64) + w32root="$w64root" + [ -z "$w32root" ] && w32root="$HOME/w64root" + toolprefixes="$w64_toolprefixes x86_64-w64-mingw32" + ;; + *) + [ -z "$w32root" ] && w32root="$HOME/w32root" + toolprefixes="$w32_toolprefixes i586-mingw32msvc" + toolprefixes="$toolprefixes i386-mingw32msvc mingw32" + ;; + esac echo "Using $w32root as standard install directory" >&2 - - # See whether we have the Debian cross compiler package or the - # old mingw32/cpd system - if i586-mingw32msvc-gcc --version >/dev/null 2>&1 ; then - host=i586-mingw32msvc - crossbindir=/usr/$host/bin - else - host=i386--mingw32 - if ! mingw32 --version >/dev/null; then - echo "We need at least version 0.3 of MingW32/CPD" >&2 - exit 1 - fi - crossbindir=`mingw32 --install-dir`/bin - # Old autoconf version required us to setup the environment - # with the proper tool names. - CC=`mingw32 --get-path gcc` - CPP=`mingw32 --get-path cpp` - AR=`mingw32 --get-path ar` - RANLIB=`mingw32 --get-path ranlib` - export CC CPP AR RANLIB + + crossbindir= + for host in $toolprefixes; do + if ${host}-gcc --version >/dev/null 2>&1 ; then + crossbindir=/usr/${host}/bin + conf_CC="CC=${host}-gcc" + break; + fi + done + if [ -z "$crossbindir" ]; then + echo "Cross compiler kit not installed" >&2 + if [ -z "$myhostsub" ]; then + echo "Under Debian GNU/Linux, you may install it using" >&2 + echo " apt-get install mingw32 mingw32-runtime mingw32-binutils" >&2 + fi + echo "Stop." >&2 + exit 1 fi - + if [ -f "$tsdir/config.log" ]; then if ! head $tsdir/config.log | grep "$host" >/dev/null; then echo "Pease run a 'make distclean' first" >&2 @@ -88,10 +122,10 @@ if test "$1" = "--build-w32"; then fi fi - ./configure --enable-maintainer-mode --prefix=${w32root} \ - --host=i586-mingw32msvc --build=${build} \ + $tsdir/configure --enable-maintainer-mode --prefix=${w32root} \ + --host=${host} --build=${build} \ --with-gpg-error-prefix=${w32root} \ - --with-libassuan-prefix=${w32root} + --with-libassuan-prefix=${w32root} rc=$? exit $rc @@ -102,19 +136,19 @@ fi # Grep the required versions from configure.ac -autoconf_vers=`sed -n '/^AC_PREREQ(/ { +autoconf_vers=`sed -n '/^AC_PREREQ(/ { s/^.*(\(.*\))/\1/p q }' ${configure_ac}` autoconf_vers_num=`echo "$autoconf_vers" | cvtver` -automake_vers=`sed -n '/^min_automake_version=/ { +automake_vers=`sed -n '/^min_automake_version=/ { s/^.*="\(.*\)"/\1/p q }' ${configure_ac}` automake_vers_num=`echo "$automake_vers" | cvtver` -gettext_vers=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ { +gettext_vers=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ { s/^.*(\(.*\))/\1/p q }' ${configure_ac}` @@ -128,6 +162,16 @@ then exit 1 fi +# Allow to override the default tool names +AUTOCONF=${AUTOCONF_PREFIX}${AUTOCONF:-autoconf}${AUTOCONF_SUFFIX} +AUTOHEADER=${AUTOCONF_PREFIX}${AUTOHEADER:-autoheader}${AUTOCONF_SUFFIX} + +AUTOMAKE=${AUTOMAKE_PREFIX}${AUTOMAKE:-automake}${AUTOMAKE_SUFFIX} +ACLOCAL=${AUTOMAKE_PREFIX}${ACLOCAL:-aclocal}${AUTOMAKE_SUFFIX} + +GETTEXT=${GETTEXT_PREFIX}${GETTEXT:-gettext}${GETTEXT_SUFFIX} +MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX} + if check_version $AUTOCONF $autoconf_vers_num $autoconf_vers ; then check_version $AUTOHEADER $autoconf_vers_num $autoconf_vers autoconf @@ -142,13 +186,42 @@ fi if test "$DIE" = "yes"; then cat <&2 +*** Activating trailing whitespace git pre-commit hook. *** + For more information see this thread: + http://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084html + To deactivate this pre-commit hook again move .git/hooks/pre-commit + and .git/hooks/pre-commit.sample out of the way. +EOF + cp .git/hooks/pre-commit.sample .git/hooks/pre-commit + chmod +x .git/hooks/pre-commit + fi + tmp=$(git config --get filter.cleanpo.clean) + if [ "$tmp" != "awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'" ] + then + echo "*** Adding GIT filter.cleanpo.clean configuration." >&2 + git config --add filter.cleanpo.clean \ + "awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'" + fi + if [ -f build-aux/git-hooks/commit-msg -a ! -f .git/hooks/commit-msg ] ; then + cat <&2 +*** Activating commit log message check hook. *** +EOF + cp build-aux/git-hooks/commit-msg .git/hooks/commit-msg + chmod +x .git/hooks/commit-msg + fi +fi + echo "Running aclocal -I m4 ${ACLOCAL_FLAGS:+$ACLOCAL_FLAGS }..." $ACLOCAL -I m4 $ACLOCAL_FLAGS @@ -159,4 +232,8 @@ $AUTOMAKE --gnu --add-missing echo "Running autoconf${FORCE} ..." $AUTOCONF${FORCE} -echo "You may now run \"./configure --enable-maintainer-mode && make\"." +echo "You may now run: + ./autogen.sh --build-w32 && make +or + ./autogen.sh --build-w64 && make +" diff --git a/configure.ac b/configure.ac index 4af5e8b..24dc04a 100644 --- a/configure.ac +++ b/configure.ac @@ -67,7 +67,7 @@ AC_SUBST(BUILD_FILEVERSION) AH_BOTTOM([ /* Some global constants. */ -/* Force using of NLS for W32 even if no libintl has been found. This is +/* Force using of NLS for W32 even if no libintl has been found. This is okay because we have our own gettext implementation for W32. */ #if defined(HAVE_W32_SYSTEM) && !defined(ENABLE_NLS) #define ENABLE_NLS 1 @@ -100,11 +100,14 @@ AC_CHECK_TOOL(WINDRES, windres, :) have_dosish_system=no have_w32_system=no +have_w64_system=no case "${host}" in + x86_64-*mingw32*) + have_dosish_system=yes + have_w32_system=yes + have_w64_system=yes + ;; *-mingw32*) - # special stuff for Windoze NT - AC_DEFINE(HAVE_DRIVE_LETTERS,1, - [defined if we must run on a stupid file system]) have_dosish_system=yes have_w32_system=yes ;; @@ -113,11 +116,16 @@ case "${host}" in *** *** This software my only be build for W32 systems. Use *** ./autogen.sh --build-w32 +*** or +*** ./autogen.sh --build-w64 *** to prepare it for such a build. ***]]) ;; esac +AC_DEFINE(HAVE_DRIVE_LETTERS,1, + [defined if we must run on a stupid file system]) + if test "$have_dosish_system" = yes; then AC_DEFINE(HAVE_DOSISH_SYSTEM,1, [Defined if we run on some of the PCDOS like systems @@ -128,9 +136,13 @@ AM_CONDITIONAL(HAVE_DOSISH_SYSTEM, test "$have_dosish_system" = yes) if test "$have_w32_system" = yes; then AC_DEFINE(HAVE_W32_SYSTEM,1, [Defined if we run on a W32 API based system]) + if test "$have_w64_system" = yes; then + AC_DEFINE(HAVE_W64_SYSTEM,1, + [Defined if we run on a 64 bit W32 API based system]) + fi fi AM_CONDITIONAL(HAVE_W32_SYSTEM, test "$have_w32_system" = yes) - +AM_CONDITIONAL(HAVE_W64_SYSTEM, test "$have_w64_system" = yes) # @@ -210,10 +222,10 @@ die=no if test "$have_gpg_error" = "no"; then die=yes AC_MSG_NOTICE([[ -*** +*** *** You need libgpg-error to build this program. ** This library is for example available at -*** ftp://ftp.gnupg.org/pub/gcrypt/libgpg-error +*** ftp://ftp.gnupg.org/gcrypt/libgpg-error *** (at least version $NEED_GPG_ERROR_VERSION is required.) ***]]) fi @@ -223,7 +235,7 @@ if test "$have_libassuan" = "no"; then *** *** You need libassuan to build this program. *** This library is for example available at -*** ftp://ftp.gnupg.org/pub/gcrypt/libassuan/ +*** ftp://ftp.gnupg.org/gcrypt/libassuan/ *** (at least version $NEED_LIBASSUAN_VERSION is required). ***]]) fi @@ -239,7 +251,7 @@ fi AC_CONFIG_FILES([ Makefile doc/Makefile src/Makefile -src/versioninfo.rc +src/versioninfo.rc po/Makefile.in m4/Makefile ]) diff --git a/po/.gitattributes b/po/.gitattributes new file mode 100644 index 0000000..17b178c --- /dev/null +++ b/po/.gitattributes @@ -0,0 +1,7 @@ +# You should add +#[filter "cleanpo"] +# clean = "awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'" +# to your config file. + +/??.po filter=cleanpo +/??_??.po filter=cleanpo ----------------------------------------------------------------------- Summary of changes: .gitignore | 13 ++++ Makefile.am | 6 +- autogen.sh | 163 ++++++++++++++++++++++++++++++++++++------------- configure.ac | 30 +++++++--- po/.gitattributes | 7 ++ po/ar.po | 25 +------- po/de.po | 25 +------- po/es.po | 25 +------- po/pt.po | 25 +------- po/ru.po | 25 +------- src/Makefile.am | 2 +- src/bitmaps.cc | 14 ++-- src/bitmaps.h | 6 +- src/client.cc | 54 ++++++++++------- src/client.h | 8 +- src/debug.h | 8 +- src/exechelp.c | 8 +- src/gpgex-class.cc | 9 +-- src/gpgex-class.h | 6 +- src/gpgex-factory.cc | 6 +- src/gpgex-factory.h | 6 +- src/gpgex.cc | 29 +++++---- src/gpgex.h | 18 +++--- src/main.cc | 25 ++++---- src/main.h | 8 +- src/registry.c | 18 +++--- src/registry.h | 6 +- src/w32-gettext.c | 28 ++++---- src/w32-gettext.h | 6 +- 29 files changed, 307 insertions(+), 302 deletions(-) create mode 100644 .gitignore create mode 100644 po/.gitattributes hooks/post-receive -- GnupG extension for the Windows Explorer http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 19 13:55:21 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 19 Jun 2013 13:55:21 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.1.0-4-g6ba18ca Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via 6ba18ca32c8669fa76cc10de3382f78212ca51a8 (commit) via f88eb9e98f491b503f46c7d995c9651f1e46b9e9 (commit) via 61f5ca41e9d44bdd266cb4e91abe45fc5f2ddf3e (commit) from fb51987dcdb2e6e2a4c25d45f891e15c013457aa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6ba18ca32c8669fa76cc10de3382f78212ca51a8 Author: Werner Koch Date: Wed Jun 19 13:29:18 2013 +0200 Changes to support W64. * configure.ac (have_dosish_system): Set for W64. * src/assuan-defs.h (SOCKET2HANDLE, HANDLE2SOCKET): Add versions for W64. * src/assuan-handler.c (assuan_command_parse_fd) [W64]: Use strtoull to parse an FD. -- Note that these changes are not complete but merely sufficient to allow building of GpgEX. diff --git a/configure.ac b/configure.ac index 67860a7..369a447 100644 --- a/configure.ac +++ b/configure.ac @@ -192,6 +192,7 @@ case "${host}" in fi ;; x86_64-*mingw32*) + have_dosish_system=yes have_w32_system=yes have_w64_system=yes ;; diff --git a/src/assuan-defs.h b/src/assuan-defs.h index f6cb9b4..63329c8 100644 --- a/src/assuan-defs.h +++ b/src/assuan-defs.h @@ -397,12 +397,15 @@ int _assuan_asprintf (char **buf, const char *fmt, ...); #define DIM(v) (sizeof(v)/sizeof((v)[0])) -#if HAVE_W32_SYSTEM -#define SOCKET2HANDLE(s) ((void *)(s)) -#define HANDLE2SOCKET(h) ((unsigned int)(h)) +#if HAVE_W64_SYSTEM +# define SOCKET2HANDLE(s) ((void *)(s)) +# define HANDLE2SOCKET(h) ((uintptr_t)(h)) +#elif HAVE_W32_SYSTEM +# define SOCKET2HANDLE(s) ((void *)(s)) +# define HANDLE2SOCKET(h) ((unsigned int)(h)) #else -#define SOCKET2HANDLE(s) (s) -#define HANDLE2SOCKET(h) (h) +# define SOCKET2HANDLE(s) (s) +# define HANDLE2SOCKET(h) (h) #endif diff --git a/src/assuan-handler.c b/src/assuan-handler.c index dca5968..2fa91b8 100644 --- a/src/assuan-handler.c +++ b/src/assuan-handler.c @@ -271,9 +271,9 @@ assuan_command_parse_fd (assuan_context_t ctx, char *line, assuan_fd_t *rfd) line ++; if (!digitp (*line)) return set_error (ctx, GPG_ERR_ASS_SYNTAX, "number required"); -#ifdef HAVE_W32_SYSTEM - /* Fixme: For a W32/64bit system we will need to change the cast - and the conversion function. */ +#if HAVE_W64_SYSTEM + *rfd = (void*)strtoull (line, &endp, 10); +#elif HAVE_W32_SYSTEM *rfd = (void*)strtoul (line, &endp, 10); #else *rfd = strtoul (line, &endp, 10); commit f88eb9e98f491b503f46c7d995c9651f1e46b9e9 Author: Werner Koch Date: Mon Jun 17 16:11:23 2013 +0200 Add hack to have different names for 64 bit Windows DLLs. * ltmain.sh: Prefix the SO number for W64 with a "6". -- We need to stick to libtool 2.4.2 anyway, thus we take the easy way and hack libtool instead of adding "-release 6" to the Makefile. This also avoids an extra dash before the 6 and thus yields a prettier name than the one produced by the -release option. The header files and def files are supposed to be identical for w32 and w64 thus we don't need to do any special code for them. Having a different namespace for 64 bit DLLs is such a good idea that I hope this or a similar feature will be provided by future libtool versions. diff --git a/ltmain.sh b/ltmain.sh index 6f650ae..d47c0ba 100755 --- a/ltmain.sh +++ b/ltmain.sh @@ -6748,6 +6748,11 @@ func_mode_link () elif test -n "$soname_spec"; then # bleh windows case $host in + x86_64-*mingw32*) + func_arith $current - $age + major=$func_arith_result + versuffix="6-$major" + ;; *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result @@ -7480,6 +7485,14 @@ func_mode_link () func_arith $current - $age major=$func_arith_result versuffix="-$major" + case $host in + x86_64-*mingw32*) + versuffix="6-$major" + ;; + *) + versuffix="-$major" + ;; + esac ;; *) commit 61f5ca41e9d44bdd266cb4e91abe45fc5f2ddf3e Author: Werner Koch Date: Mon Jun 17 16:01:19 2013 +0200 Support building for w64. diff --git a/autogen.sh b/autogen.sh index 991e782..4e0987f 100755 --- a/autogen.sh +++ b/autogen.sh @@ -41,12 +41,15 @@ w32_toolprefixes= w32_extraoptions= w32ce_toolprefixes= w32ce_extraoptions= +w64_toolprefixes= +w64_extraoptions= amd64_toolprefixes= # End list of optional variables sourced from ~/.gnupg-autogen.rc # What follows are variables which are sourced but default to # environment variables or lacking them hardcoded values. #w32root= #w32ce_root= +#w64root= #amd64root= if [ -f "$HOME/.gnupg-autogen.rc" ]; then @@ -102,7 +105,7 @@ if [ "$myhost" = "w32" ]; then 64) w32root="$w64root" [ -z "$w32root" ] && w32root="$HOME/w64root" - toolprefixes="$amd64_toolprefixes amd64-mingw32msvc" + toolprefixes="$w64_toolprefixes x86_64-w64-mingw32" ;; *) [ -z "$w32root" ] && w32root="$HOME/w32root" ----------------------------------------------------------------------- Summary of changes: autogen.sh | 5 ++++- configure.ac | 1 + ltmain.sh | 13 +++++++++++++ src/assuan-defs.h | 13 ++++++++----- src/assuan-handler.c | 6 +++--- 5 files changed, 29 insertions(+), 9 deletions(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 19 13:56:25 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 19 Jun 2013 13:56:25 +0200 Subject: [git] GPG-ERROR - branch, w64-work, created. libgpg-error-1.11-6-gca46b9a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, w64-work has been created at ca46b9a7bccb2eab085fc45722ffca1210f48223 (commit) - Log ----------------------------------------------------------------- commit ca46b9a7bccb2eab085fc45722ffca1210f48223 Author: Werner Koch Date: Mon Jun 17 16:11:23 2013 +0200 Add hack to have different names for 64 bit Windows DLLs. * ltmain.sh: Prefix the SO number for W64 with a "6". -- We need to stick to libtool 2.4.2 anyway, thus we take the easy way and hack libtool instead of adding "-release 6" to the Makefile. This also avoids an extra dash before the 6 and thus yields a prettier name than the one produced by the -release option. The header files and def files are supposed to be identical for w32 and w64 thus we don't need to do any special code for them. Having a different namespace for 64 bit DLLs is such a good idea that I hope this or a similar feature will be provided by future libtool versions. diff --git a/ltmain.sh b/ltmain.sh index 24e3fd3..07bf696 100644 --- a/ltmain.sh +++ b/ltmain.sh @@ -6766,6 +6766,11 @@ func_mode_link () elif test -n "$soname_spec"; then # bleh windows case $host in + x86_64-*mingw32*) + func_arith $current - $age + major=$func_arith_result + versuffix="6-$major" + ;; *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result @@ -7499,6 +7504,14 @@ func_mode_link () func_arith $current - $age major=$func_arith_result versuffix="-$major" + case $host in + x86_64-*mingw32*) + versuffix="6-$major" + ;; + *) + versuffix="-$major" + ;; + esac ;; *) commit 1ca9b0dec0bfee560ce43d9dac6a26557ebe67a1 Author: Werner Koch Date: Mon Jun 17 16:01:19 2013 +0200 Support building for w64. diff --git a/autogen.sh b/autogen.sh index 97a3ccc..8256fd2 100755 --- a/autogen.sh +++ b/autogen.sh @@ -40,12 +40,15 @@ w32_toolprefixes= w32_extraoptions= w32ce_toolprefixes= w32ce_extraoptions= +w64_toolprefixes= +w64_extraoptions= amd64_toolprefixes= # End list of optional variables sourced from ~/.gnupg-autogen.rc # What follows are variables which are sourced but default to # environment variables or lacking them hardcoded values. #w32root= #w32ce_root= +#w64root= #amd64root= if [ -f "$HOME/.gnupg-autogen.rc" ]; then @@ -99,7 +102,7 @@ if [ "$myhost" = "w32" ]; then 64) w32root="$w64root" [ -z "$w32root" ] && w32root="$HOME/w64root" - toolprefixes="$amd64_toolprefixes amd64-mingw32msvc" + toolprefixes="$w64_toolprefixes x86_64-w64-mingw32" ;; *) [ -z "$w32root" ] && w32root="$HOME/w32root" ----------------------------------------------------------------------- hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 19 13:57:37 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 19 Jun 2013 13:57:37 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.11-6-gca46b9a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via ca46b9a7bccb2eab085fc45722ffca1210f48223 (commit) via 1ca9b0dec0bfee560ce43d9dac6a26557ebe67a1 (commit) from db438148df9623528aa7305b6d56edd23db8cbbe (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: autogen.sh | 5 ++++- ltmain.sh | 13 +++++++++++++ 2 files changed, 17 insertions(+), 1 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 19 14:02:09 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 19 Jun 2013 14:02:09 +0200 Subject: [git] GPG-ERROR - branch, w64-work, deleted. libgpg-error-1.11-6-gca46b9a Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, w64-work has been deleted was ca46b9a7bccb2eab085fc45722ffca1210f48223 ----------------------------------------------------------------------- ca46b9a7bccb2eab085fc45722ffca1210f48223 Add hack to have different names for 64 bit Windows DLLs. ----------------------------------------------------------------------- hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Thu Jun 20 16:17:39 2013 From: cvs at cvs.gnupg.org (by Jussi Kivilinna) Date: Thu, 20 Jun 2013 16:17:39 +0200 Subject: [git] GCRYPT - branch, cipher-amd64-optimizations, updated. libgcrypt-1.5.0-153-g3544fa8 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, cipher-amd64-optimizations has been updated via 3544fa8aa63bef9a35abf236e9376191b5ec206b (commit) from ec2f8de409a93c80efa658134df22074a9bca5a4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3544fa8aa63bef9a35abf236e9376191b5ec206b Author: Jussi Kivilinna Date: Thu Jun 20 14:20:36 2013 +0300 Check if assembler is compatible with AMD64 assembly implementations * cipher/blowfish-amd64.S: Enable only if HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS is defined. * cipher/camellia-aesni-avx-amd64.S: Ditto. * cipher/camellia-aesni-avx2-amd64.S: Ditto. * cipher/cast5-amd64.S: Ditto. * cipher/rinjdael-amd64.S: Ditto. * cipher/serpent-avx2-amd64.S: Ditto. * cipher/serpent-sse2-amd64.S: Ditto. * cipher/twofish-amd64.S: Ditto. * cipher/blowfish.c: Use AMD64 assembly implementation only if HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS is defined * cipher/camellia-glue.c: Ditto. * cipher/cast5.c: Ditto. * cipher/rijndael.c: Ditto. * cipher/serpent.c: Ditto. * cipher/twofish.c: Ditto. * configure.ac: Check gcc/as compatibility with AMD64 assembly implementations. -- Later these checks can be split and assembly implementations adapted to handle different platforms, but for now disable AMD64 assembly implementations if assembler does not look to be able to handle them. Signed-off-by: Jussi Kivilinna diff --git a/cipher/blowfish-amd64.S b/cipher/blowfish-amd64.S index 1008387..6975e55 100644 --- a/cipher/blowfish-amd64.S +++ b/cipher/blowfish-amd64.S @@ -20,7 +20,7 @@ #ifdef __x86_64 #include -#if defined(USE_BLOWFISH) +#if defined(USE_BLOWFISH) && defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) .text diff --git a/cipher/blowfish.c b/cipher/blowfish.c index 39d4051..69baebe 100644 --- a/cipher/blowfish.c +++ b/cipher/blowfish.c @@ -45,7 +45,8 @@ /* USE_AMD64_ASM indicates whether to use AMD64 assembly code. */ #undef USE_AMD64_ASM -#if defined(__x86_64__) && (BLOWFISH_ROUNDS == 16) +#if defined(__x86_64__) && defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) && \ + (BLOWFISH_ROUNDS == 16) # define USE_AMD64_ASM 1 #endif diff --git a/cipher/camellia-aesni-avx-amd64.S b/cipher/camellia-aesni-avx-amd64.S index 95c96b8..b0ef5fd 100644 --- a/cipher/camellia-aesni-avx-amd64.S +++ b/cipher/camellia-aesni-avx-amd64.S @@ -20,7 +20,8 @@ #ifdef __x86_64 #include -#if defined(ENABLE_AESNI_SUPPORT) && defined(ENABLE_AVX_SUPPORT) +#if defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) && \ + defined(ENABLE_AESNI_SUPPORT) && defined(ENABLE_AVX_SUPPORT) #ifdef __PIC__ # define RIP (%rip) diff --git a/cipher/camellia-aesni-avx2-amd64.S b/cipher/camellia-aesni-avx2-amd64.S index f0a34fd..da427b4 100644 --- a/cipher/camellia-aesni-avx2-amd64.S +++ b/cipher/camellia-aesni-avx2-amd64.S @@ -20,7 +20,8 @@ #ifdef __x86_64 #include -#if defined(ENABLE_AESNI_SUPPORT) && defined(ENABLE_AVX2_SUPPORT) +#if defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) && \ + defined(ENABLE_AESNI_SUPPORT) && defined(ENABLE_AVX2_SUPPORT) #ifdef __PIC__ # define RIP (%rip) diff --git a/cipher/camellia-glue.c b/cipher/camellia-glue.c index a5468fa..b44bd7b 100644 --- a/cipher/camellia-glue.c +++ b/cipher/camellia-glue.c @@ -75,7 +75,7 @@ /* USE_AESNI inidicates whether to compile with Intel AES-NI/AVX code. */ #undef USE_AESNI_AVX #if defined(ENABLE_AESNI_SUPPORT) && defined(ENABLE_AVX_SUPPORT) -# if defined(__x86_64__) +# if defined(__x86_64__) && defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) # define USE_AESNI_AVX 1 # endif #endif @@ -83,7 +83,7 @@ /* USE_AESNI_AVX2 inidicates whether to compile with Intel AES-NI/AVX2 code. */ #undef USE_AESNI_AVX2 #if defined(ENABLE_AESNI_SUPPORT) && defined(ENABLE_AVX2_SUPPORT) -# if defined(__x86_64__) +# if defined(__x86_64__) && defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) # define USE_AESNI_AVX2 1 # endif #endif diff --git a/cipher/cast5-amd64.S b/cipher/cast5-amd64.S index c3007d3..1bca249 100644 --- a/cipher/cast5-amd64.S +++ b/cipher/cast5-amd64.S @@ -20,7 +20,7 @@ #ifdef __x86_64 #include -#if defined(USE_CAST5) +#if defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) && defined(USE_CAST5) #ifdef __PIC__ # define RIP %rip diff --git a/cipher/cast5.c b/cipher/cast5.c index 8c5664d..41bc9ff 100644 --- a/cipher/cast5.c +++ b/cipher/cast5.c @@ -47,7 +47,7 @@ /* USE_AMD64_ASM indicates whether to use AMD64 assembly code. */ #undef USE_AMD64_ASM -#if defined(__x86_64__) +#if defined(__x86_64__) && defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) # define USE_AMD64_ASM 1 #endif diff --git a/cipher/rijndael-amd64.S b/cipher/rijndael-amd64.S index 6921f31..2519ada 100644 --- a/cipher/rijndael-amd64.S +++ b/cipher/rijndael-amd64.S @@ -20,7 +20,7 @@ #ifdef __x86_64 #include -#if defined(USE_AES) +#if defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) && defined(USE_AES) #ifdef __PIC__ # define RIP %rip diff --git a/cipher/rijndael.c b/cipher/rijndael.c index 4a89e32..35e599a 100644 --- a/cipher/rijndael.c +++ b/cipher/rijndael.c @@ -63,7 +63,7 @@ /* USE_AMD64_ASM indicates whether to use AMD64 assembly code. */ #undef USE_AMD64_ASM -#if defined(__x86_64__) +#if defined(__x86_64__) && defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) # define USE_AMD64_ASM 1 #endif diff --git a/cipher/serpent-avx2-amd64.S b/cipher/serpent-avx2-amd64.S index 7f4f8b5..7586c0c 100644 --- a/cipher/serpent-avx2-amd64.S +++ b/cipher/serpent-avx2-amd64.S @@ -20,7 +20,8 @@ #ifdef __x86_64 #include -#if defined(USE_SERPENT) && defined(ENABLE_AVX2_SUPPORT) +#if defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) && defined(USE_SERPENT) && \ + defined(ENABLE_AVX2_SUPPORT) #ifdef __PIC__ # define RIP (%rip) diff --git a/cipher/serpent-sse2-amd64.S b/cipher/serpent-sse2-amd64.S index 5f9e9d2..fe9feee 100644 --- a/cipher/serpent-sse2-amd64.S +++ b/cipher/serpent-sse2-amd64.S @@ -20,7 +20,7 @@ #ifdef __x86_64 #include -#if defined(USE_SERPENT) +#if defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) && defined(USE_SERPENT) #ifdef __PIC__ # define RIP (%rip) diff --git a/cipher/serpent.c b/cipher/serpent.c index 89e14ae..8aded34 100644 --- a/cipher/serpent.c +++ b/cipher/serpent.c @@ -34,13 +34,13 @@ /* USE_SSE2 indicates whether to compile with AMD64 SSE2 code. */ #undef USE_SSE2 -#if defined(__x86_64__) +#if defined(__x86_64__) && defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) # define USE_SSE2 1 #endif /* USE_AVX2 indicates whether to compile with AMD64 AVX2 code. */ #undef USE_AVX2 -#if defined(__x86_64__) +#if defined(__x86_64__) && defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) # if defined(ENABLE_AVX2_SUPPORT) # define USE_AVX2 1 # endif diff --git a/cipher/twofish-amd64.S b/cipher/twofish-amd64.S index a2a878a..d466834 100644 --- a/cipher/twofish-amd64.S +++ b/cipher/twofish-amd64.S @@ -20,7 +20,7 @@ #ifdef __x86_64 #include -#if defined(USE_TWOFISH) +#if defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) && defined(USE_TWOFISH) #ifdef __PIC__ # define RIP %rip diff --git a/cipher/twofish.c b/cipher/twofish.c index ee721c6..07a4ebe 100644 --- a/cipher/twofish.c +++ b/cipher/twofish.c @@ -53,7 +53,7 @@ /* USE_AMD64_ASM indicates whether to use AMD64 assembly code. */ #undef USE_AMD64_ASM -#if defined(__x86_64__) +#if defined(__x86_64__) && defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS) # define USE_AMD64_ASM 1 #endif diff --git a/configure.ac b/configure.ac index 5b9d837..d9b1639 100644 --- a/configure.ac +++ b/configure.ac @@ -941,6 +941,36 @@ if test "$gcry_cv_gcc_inline_asm_avx2" = "yes" ; then fi +# +# Check whether GCC assembler supports features needed for our amd64 +# implementations +# +AC_CACHE_CHECK([whether GCC assembler is compatible for amd64 assembly implementations], + [gcry_cv_gcc_amd64_platform_as_ok], + [gcry_cv_gcc_amd64_platform_as_ok=no + AC_COMPILE_IFELSE([AC_LANG_SOURCE( + [[__asm__( + /* Test if '.set' is supported by underlying assembler. */ + ".set a0, %rax\n\t" + ".set b0, %rdx\n\t" + "asmfunc:\n\t" + "movq a0, b0;\n\t" /* Fails here if .set ignored by as. */ + + /* Test if '.type' and '.size' are supported. */ + /* These work only on ELF targets. */ + /* TODO: add COFF (mingw64, cygwin64) support to assembly + * implementations. Mingw64/cygwin64 also require additional + * work because they use different calling convention. */ + ".size asmfunc,.-asmfunc;\n\t" + ".type asmfunc, at function;\n\t" + );]])], + [gcry_cv_gcc_amd64_platform_as_ok=yes])]) +if test "$gcry_cv_gcc_amd64_platform_as_ok" = "yes" ; then + AC_DEFINE(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS,1, + [Defined if underlying assembler is compatible with amd64 assembly implementations]) +fi + + ####################################### #### Checks for library functions. #### ####################################### ----------------------------------------------------------------------- Summary of changes: cipher/blowfish-amd64.S | 2 +- cipher/blowfish.c | 3 ++- cipher/camellia-aesni-avx-amd64.S | 3 ++- cipher/camellia-aesni-avx2-amd64.S | 3 ++- cipher/camellia-glue.c | 4 ++-- cipher/cast5-amd64.S | 2 +- cipher/cast5.c | 2 +- cipher/rijndael-amd64.S | 2 +- cipher/rijndael.c | 2 +- cipher/serpent-avx2-amd64.S | 3 ++- cipher/serpent-sse2-amd64.S | 2 +- cipher/serpent.c | 4 ++-- cipher/twofish-amd64.S | 2 +- cipher/twofish.c | 2 +- configure.ac | 30 ++++++++++++++++++++++++++++++ 15 files changed, 50 insertions(+), 16 deletions(-) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Thu Jun 20 17:17:40 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 20 Jun 2013 17:17:40 +0200 Subject: [git] GpgEX - branch, master, updated. gpgex-0.9.7-14-g3cc9ee5 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnupG extension for the Windows Explorer". The branch, master has been updated via 3cc9ee5a799bbd802f578386a22103b9a85b89cd (commit) from b21cad89a4a6de617d5020bed340cdfa7d0636d2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3cc9ee5a799bbd802f578386a22103b9a85b89cd Author: Werner Koch Date: Thu Jun 20 16:47:51 2013 +0200 Link gcc support libraries statically. * src/Makefile.am (gpgex_LDFLAGS): New. * src/versioninfo.rc.in: Add comments on how to add a manifest. * src/gpgex.manifest.in: New. * src/GNU.GnuPG.Gcc64Support.manifest: New. * src/Makefile.am: Distribute sample files. * configure.ac (BUILD_FILEVERSION_DOT, BUILD_CPU_ARCH): New ac_subst. (AC_CONFIG_FILES): Add gpgex.manifest. -- Despite many hours of trial and error, I was not able to get a private side by side assembly work for gpgex. See versioninfo.rc.in for details. diff --git a/configure.ac b/configure.ac index 24dc04a..2d1dc40 100644 --- a/configure.ac +++ b/configure.ac @@ -62,6 +62,8 @@ BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` changequote([,])dnl BUILD_FILEVERSION="${BUILD_FILEVERSION}${SVN_REVISION}" AC_SUBST(BUILD_FILEVERSION) +BUILD_FILEVERSION_DOT=`echo "$BUILD_FILEVERSION" | tr ',' '.'` +AC_SUBST(BUILD_FILEVERSION_DOT) AH_BOTTOM([ @@ -106,10 +108,12 @@ case "${host}" in have_dosish_system=yes have_w32_system=yes have_w64_system=yes + BUILD_CPU_ARCH=amd64 ;; *-mingw32*) have_dosish_system=yes have_w32_system=yes + BUILD_CPU_ARCH=x86 ;; *) AC_MSG_ERROR([[ @@ -123,6 +127,10 @@ case "${host}" in ;; esac +# We need the CPU architecture for the manifest file. +AC_SUBST(BUILD_CPU_ARCH) + + AC_DEFINE(HAVE_DRIVE_LETTERS,1, [defined if we must run on a stupid file system]) @@ -252,6 +260,7 @@ AC_CONFIG_FILES([ Makefile doc/Makefile src/Makefile src/versioninfo.rc +src/gpgex.manifest po/Makefile.in m4/Makefile ]) diff --git a/src/GNU.GnuPG.Gcc64Support.manifest b/src/GNU.GnuPG.Gcc64Support.manifest new file mode 100644 index 0000000..7aedf3f --- /dev/null +++ b/src/GNU.GnuPG.Gcc64Support.manifest @@ -0,0 +1,10 @@ + + + + + + diff --git a/src/Makefile.am b/src/Makefile.am index ec36b7f..061f4ae 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,5 +1,5 @@ # Makefile.am - main makefile for dialogs part of GpgEX -# Copyright (C) 2005, 2007 g10 Code GmbH +# Copyright (C) 2005, 2007, 2013 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -12,7 +12,8 @@ ## Process this file with automake to produce Makefile.in bin_PROGRAMS = gpgex -EXTRA_DIST = versioninfo.rc.in +EXTRA_DIST = versioninfo.rc.in gpgex.manifest.in \ + GNU.GnuPG.Gcc64Support.manifest EXEEXT = .dll AM_CFLAGS = $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS) -shared @@ -23,7 +24,7 @@ ICON_SIZES = 12 16 ICONS = $(addprefix icon-, \ $(foreach size,$(ICON_SIZES),$(addsuffix -$(size).bmp, $(ICON_NAMES)))) -nodist_gpgex_SOURCES = versioninfo.rc +nodist_gpgex_SOURCES = versioninfo.rc gpgex.manifest gpgex_SOURCES = \ gpgex.def \ icons.rc \ @@ -50,6 +51,7 @@ clean-local: #gpgex_LDADD = $(srcdir)/gpgex.def \ # -L . -lshell32 -lcomdlg32 -ladvapi32 +gpgex_LDFLAGS = -static-libgcc -static-libstdc++ # We need -loleaut32 for start_help() in gpgex.cc. gpgex_LDADD = $(srcdir)/gpgex.def -L . \ -lshell32 -lgdi32 -lole32 -luuid \ diff --git a/src/gpgex.manifest.in b/src/gpgex.manifest.in new file mode 100644 index 0000000..e1d63bf --- /dev/null +++ b/src/gpgex.manifest.in @@ -0,0 +1,19 @@ + + + + GpgEX - GnuPG shell extensions + + + + + + diff --git a/src/versioninfo.rc.in b/src/versioninfo.rc.in index 28f2910..a88c5a0 100644 --- a/src/versioninfo.rc.in +++ b/src/versioninfo.rc.in @@ -1,6 +1,6 @@ -/* versioninfo.rc.in - * Copyright (C) 2005, 2007, 2009 g10 Code GmbH - * +/* versioninfo.rc.in -*- c -*- + * Copyright (C) 2005, 2007, 2009, 2013 g10 Code GmbH + * * This file is free software; as a special exception the author gives * unlimited permission to copy and/or distribute it, with or without * modifications, as long as this notice is preserved. @@ -9,7 +9,7 @@ * WITHOUT ANY WARRANTY, to the extent permitted by law; without even the * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. */ - + /* This file is processed by configure to create versioninfo.rc */ #line __LINE__ "versioninfo.rc.in" @@ -54,3 +54,17 @@ BEGIN END END +/* Fixme: It was not possible to convince Windows to use the manifest. + * Thus we resort to static linking of gpgex with the helper + * libraries. The idea was to put have this directory layout + * + * bin/gpgex.dll + * bin/GNU.GnuPG.Gcc64Support/GNU.GnuPG.Gcc64Support.manifest + * bin/GNU.GnuPG.Gcc64Support/libstdc++-6.dll + * bin/GNU.GnuPG.Gcc64Support/libgcc_s_sjlj-1.dll + * + * to cope with the 64 bit and 32 bit versions of the gcc support + * libraries. It works with exe files but not with DLLs loaded. Any + * hints to fix this are welcome. + */ +/* ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST "gpgex.manifest" */ ----------------------------------------------------------------------- Summary of changes: configure.ac | 9 +++++++++ src/GNU.GnuPG.Gcc64Support.manifest | 10 ++++++++++ src/Makefile.am | 8 +++++--- src/gpgex.manifest.in | 19 +++++++++++++++++++ src/versioninfo.rc.in | 22 ++++++++++++++++++---- 5 files changed, 61 insertions(+), 7 deletions(-) create mode 100644 src/GNU.GnuPG.Gcc64Support.manifest create mode 100644 src/gpgex.manifest.in hooks/post-receive -- GnupG extension for the Windows Explorer http://git.gnupg.org From cvs at cvs.gnupg.org Thu Jun 20 18:34:07 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 20 Jun 2013 18:34:07 +0200 Subject: [git] GpgEX - branch, master, updated. gpgex-0.9.7-15-g17a42a2 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnupG extension for the Windows Explorer". The branch, master has been updated via 17a42a21318ff5ade9648f216ac097a76aecb6b9 (commit) from 3cc9ee5a799bbd802f578386a22103b9a85b89cd (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 17a42a21318ff5ade9648f216ac097a76aecb6b9 Author: Werner Koch Date: Thu Jun 20 18:07:53 2013 +0200 Update versioninfo. * src/gnupg.ico: New. * src/versioninfo.rc.in: Add content from icons.rc. Update version info to useful values. * src/icons.rc: Remove. diff --git a/NEWS b/NEWS index a6452e3..4c198c1 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,9 @@ +Noteworthy changes for version 1.0.0 (unreleased) +------------------------------------------------- + +* Support 64 bit Windows. + + Noteworthy changes for version 0.9.7 (2010-07-21) ------------------------------------------------- diff --git a/src/Makefile.am b/src/Makefile.am index 061f4ae..2c238b9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,15 +19,12 @@ EXEEXT = .dll AM_CFLAGS = $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS) -shared AM_CXXFLAGS = $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS) -shared -ICON_NAMES = key lock -ICON_SIZES = 12 16 -ICONS = $(addprefix icon-, \ - $(foreach size,$(ICON_SIZES),$(addsuffix -$(size).bmp, $(ICON_NAMES)))) +ICONS = icon-key-12.bmp icon-key-16.bmp \ + icon-lock-12.bmp icon-lock-16.bmp nodist_gpgex_SOURCES = versioninfo.rc gpgex.manifest gpgex_SOURCES = \ gpgex.def \ - icons.rc \ registry.h registry.c \ exechelp.h exechelp.c \ w32-gettext.c w32-gettext.h \ @@ -40,10 +37,10 @@ gpgex_SOURCES = \ $(ICONS) libgpg-error.a: - ln -sf $(shell $(GPG_ERROR_CONFIG) --prefix)/lib/libgpg-error.a + ln -sf $$($(GPG_ERROR_CONFIG) --prefix)/lib/libgpg-error.a . libassuan.a: - ln -sf $(shell $(LIBASSUAN_CONFIG) --prefix)/lib/libassuan.a + ln -sf $$($(LIBASSUAN_CONFIG) --prefix)/lib/libassuan.a . clean-local: rm -f libgpg-error.a libassuan.a diff --git a/src/gnupg.ico b/src/gnupg.ico new file mode 100644 index 0000000..4c4bae0 Binary files /dev/null and b/src/gnupg.ico differ diff --git a/src/icons.rc b/src/icons.rc deleted file mode 100644 index b8d3349..0000000 --- a/src/icons.rc +++ /dev/null @@ -1,4 +0,0 @@ -Key_12 BITMAP "icon-key-12.bmp" -Key_16 BITMAP "icon-key-16.bmp" -Lock_12 BITMAP "icon-lock-12.bmp" -Lock_16 BITMAP "icon-lock-16.bmp" diff --git a/src/versioninfo.rc.in b/src/versioninfo.rc.in index a88c5a0..6528dc8 100644 --- a/src/versioninfo.rc.in +++ b/src/versioninfo.rc.in @@ -16,43 +16,45 @@ #include +1 ICON "./gnupg.ico" -VS_VERSION_INFO VERSIONINFO - FILEVERSION @BUILD_FILEVERSION@ - PRODUCTVERSION @BUILD_FILEVERSION@ - FILEFLAGSMASK 0x3fL +1 VERSIONINFO + FILEVERSION @BUILD_FILEVERSION@ + PRODUCTVERSION @BUILD_FILEVERSION@ + FILEFLAGSMASK 0x3fL #ifdef _DEBUG - FILEFLAGS 0x21L + FILEFLAGS 0x01L /* VS_FF_DEBUG (0x1)*/ #else - FILEFLAGS 0x20L + FILEFLAGS 0x00L #endif - FILEOS 0x40004L - FILETYPE 0x1L - FILESUBTYPE 0x0L -BEGIN + FILEOS 0x40004L /* VOS_NT (0x40000) | VOS__WINDOWS32 (0x4) */ + FILETYPE 0x2L /* VFT_DLL (0x2) */ + FILESUBTYPE 0x0L /* VFT2_UNKNOWN */ + BEGIN BLOCK "StringFileInfo" BEGIN - BLOCK "040904b0" + BLOCK "040904b0" /* US English (0409), Unicode (04b0) */ BEGIN - VALUE "Comments", "This plugin is available under the terms of the GNU Lesser General Public License.\0" - VALUE "CompanyName", "g10 Code GmbH\0" VALUE "FileDescription", "GpgEX - GnuPG shell extensions\0" - VALUE "FileVersion", "@VERSION@\0" VALUE "InternalName", "gpgex\0" - VALUE "LegalCopyright", "Copyright ? 2009 g10 Code GmbH\0" - VALUE "LegalTrademarks", "\0" VALUE "OriginalFilename", "gpgex.dll\0" - VALUE "PrivateBuild", "\0" VALUE "ProductName", "GpgEX\0" VALUE "ProductVersion", "@VERSION@\0" - VALUE "SpecialBuild", "@BUILD_TIMESTAMP@\0" + VALUE "CompanyName", "g10 Code GmbH\0" + VALUE "FileVersion", "@VERSION@\0" + VALUE "LegalCopyright", "Copyright \xa9 2013 g10 Code GmbH\r\n \ +This program is free software; you can redistribute it and/or modify it \ +under the terms of the GNU Lesser General Public License as published by \ +the Free Software Foundation; either version 2.1 of the License, \ +or (at your option) any later version.\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END -END + END + /* Fixme: It was not possible to convince Windows to use the manifest. * Thus we resort to static linking of gpgex with the helper @@ -68,3 +70,12 @@ END * hints to fix this are welcome. */ /* ISOLATIONAWARE_MANIFEST_RESOURCE_ID RT_MANIFEST "gpgex.manifest" */ + + +/* + * Our bitmaps. + */ +Key_12 BITMAP "icon-key-12.bmp" +Key_16 BITMAP "icon-key-16.bmp" +Lock_12 BITMAP "icon-lock-12.bmp" +Lock_16 BITMAP "icon-lock-16.bmp" ----------------------------------------------------------------------- Summary of changes: NEWS | 6 ++++++ src/Makefile.am | 11 ++++------- src/gnupg.ico | Bin 0 -> 10134 bytes src/icons.rc | 4 ---- src/versioninfo.rc.in | 49 ++++++++++++++++++++++++++++++------------------- 5 files changed, 40 insertions(+), 30 deletions(-) create mode 100644 src/gnupg.ico delete mode 100644 src/icons.rc hooks/post-receive -- GnupG extension for the Windows Explorer http://git.gnupg.org From cvs at cvs.gnupg.org Mon Jun 24 07:16:50 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 24 Jun 2013 07:16:50 +0200 Subject: [git] GPG-ERROR - branch, master, updated. libgpg-error-1.11-10-g670dc6c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Error codes used by GnuPG et al.". The branch, master has been updated via 670dc6c4a7082370be29861e13310555f62f2b4b (commit) via 12243cebd558dcadf8e85eea39b6db5f0b314667 (commit) via aa14bfb33a08a7b19f999167f3ef05cd0d5f4435 (commit) via f85ef07dca7c931d63b202d94bfaccba0a30f7f6 (commit) from ca46b9a7bccb2eab085fc45722ffca1210f48223 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 670dc6c4a7082370be29861e13310555f62f2b4b Author: Werner Koch Date: Mon Jun 24 06:50:39 2013 +0200 Post release version bump. -- diff --git a/NEWS b/NEWS index 847abf0..86a2f5f 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +Noteworthy changes in version 1.13 (unreleased) +----------------------------------------------- + Noteworthy changes in version 1.12 (2013-06-24) ----------------------------------------------- diff --git a/configure.ac b/configure.ac index 75f1374..04e259b 100644 --- a/configure.ac +++ b/configure.ac @@ -27,7 +27,7 @@ min_automake_version="1.11" # another commit, and a push so that the git magic is able to work. # See below for the LT versions. m4_define([mym4_version_major], [1]) -m4_define([mym4_version_minor], [12]) +m4_define([mym4_version_minor], [13]) # Below is m4 magic to extract and compute the revision number, the # decimalized short revision number, a beta version string, and a flag commit 12243cebd558dcadf8e85eea39b6db5f0b314667 Author: Werner Koch Date: Mon Jun 24 06:28:04 2013 +0200 Release 1.12. * configure.ac: Set LT version to C10/A10/R0. diff --git a/NEWS b/NEWS index 8dd35ff..847abf0 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,10 @@ -Noteworthy changes in version 1.12 (unreleased) +Noteworthy changes in version 1.12 (2013-06-24) ----------------------------------------------- + * Add support for 64 bit Windows (use ./autogen.sh --build-w64). + + * Fixed parsing and installing of the Windows .def file. + * Interface changes relative to the 1.11 release: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ GPG_ERR_NO_CRYPT_CTX NEW. diff --git a/configure.ac b/configure.ac index 6ac82f9..75f1374 100644 --- a/configure.ac +++ b/configure.ac @@ -51,8 +51,8 @@ AC_INIT([libgpg-error],[mym4_full_version],[http://bugs.gnupg.org]) # (Interfaces added: AGE++) # (Interfaces removed: AGE=0) # Note that added error codes don't constitute an interface change. -LIBGPG_ERROR_LT_CURRENT=9 -LIBGPG_ERROR_LT_AGE=9 +LIBGPG_ERROR_LT_CURRENT=10 +LIBGPG_ERROR_LT_AGE=10 LIBGPG_ERROR_LT_REVISION=0 ################################################ commit aa14bfb33a08a7b19f999167f3ef05cd0d5f4435 Author: Werner Koch Date: Mon Jun 24 06:38:44 2013 +0200 Auto merge po files. -- diff --git a/po/cs.po b/po/cs.po index 1845b54..da5db20 100644 --- a/po/cs.po +++ b/po/cs.po @@ -670,6 +670,34 @@ msgstr "Zdvojen?? hodnota" msgid "Ambiguous result" msgstr "Nejednozna??n?? jm??no" +#, fuzzy +#| msgid "No crypto engine" +msgid "No crypto context" +msgstr "Chyb?? kryptografick?? jednotka" + +#, fuzzy +#| msgid "No crypto engine" +msgid "Wrong crypto context" +msgstr "Chyb?? kryptografick?? jednotka" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Bad crypto context" +msgstr "Neplatn?? kryptografick?? jednotka" + +msgid "Conflict in the crypto context" +msgstr "" + +#, fuzzy +#| msgid "No public key" +msgid "Broken public key" +msgstr "????dn?? ve??ejn?? kl????" + +#, fuzzy +#| msgid "No secret key" +msgid "Broken secret key" +msgstr "????dn?? tajn?? kl????" + msgid "Operation fully cancelled" msgstr "Operace zcela zru??ena" diff --git a/po/da.po b/po/da.po index 18bfb5e..3752ade 100644 --- a/po/da.po +++ b/po/da.po @@ -665,6 +665,34 @@ msgstr "Duplikeret v??rdi" msgid "Ambiguous result" msgstr "Tvetydigt navn" +#, fuzzy +#| msgid "No crypto engine" +msgid "No crypto context" +msgstr "Ingen cryptomotor" + +#, fuzzy +#| msgid "No crypto engine" +msgid "Wrong crypto context" +msgstr "Ingen cryptomotor" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Bad crypto context" +msgstr "Ugyldig cryptomotor" + +msgid "Conflict in the crypto context" +msgstr "" + +#, fuzzy +#| msgid "No public key" +msgid "Broken public key" +msgstr "Ingen offentlig n??gle" + +#, fuzzy +#| msgid "No secret key" +msgid "Broken secret key" +msgstr "Ingen hemmelig n??gle" + msgid "Operation fully cancelled" msgstr "Handling fuldt afbrudt" diff --git a/po/eo.po b/po/eo.po index 6e91d4d..8a09b04 100644 --- a/po/eo.po +++ b/po/eo.po @@ -677,6 +677,34 @@ msgid "Ambiguous result" msgstr "Plursenca nomo" #, fuzzy +#| msgid "Invalid crypto engine" +msgid "No crypto context" +msgstr "Malvalida ??ifra ma??ino" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Wrong crypto context" +msgstr "Malvalida ??ifra ma??ino" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Bad crypto context" +msgstr "Malvalida ??ifra ma??ino" + +msgid "Conflict in the crypto context" +msgstr "" + +#, fuzzy +#| msgid "No public key" +msgid "Broken public key" +msgstr "Neniu publika ??losilo" + +#, fuzzy +#| msgid "No secret key" +msgid "Broken secret key" +msgstr "Neniu sekreta ??losilo" + +#, fuzzy #| msgid "Operation cancelled" msgid "Operation fully cancelled" msgstr "Operacio estas nuligita" diff --git a/po/fr.po b/po/fr.po index 6c41555..0720e96 100644 --- a/po/fr.po +++ b/po/fr.po @@ -663,6 +663,34 @@ msgstr "Valeur dupliqu??e" msgid "Ambiguous result" msgstr "Nom ambigu??" +#, fuzzy +#| msgid "No crypto engine" +msgid "No crypto context" +msgstr "Aucun moteur de chiffrement" + +#, fuzzy +#| msgid "No crypto engine" +msgid "Wrong crypto context" +msgstr "Aucun moteur de chiffrement" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Bad crypto context" +msgstr "Moteur de chiffrement incorrect" + +msgid "Conflict in the crypto context" +msgstr "" + +#, fuzzy +#| msgid "No public key" +msgid "Broken public key" +msgstr "Pas de clef publique" + +#, fuzzy +#| msgid "No secret key" +msgid "Broken secret key" +msgstr "Pas de clef secr??te" + msgid "Operation fully cancelled" msgstr "Op??ration compl??tement annul??e" diff --git a/po/it.po b/po/it.po index ce8aaae..3a6bf61 100644 --- a/po/it.po +++ b/po/it.po @@ -677,6 +677,34 @@ msgid "Ambiguous result" msgstr "Nome ambiguo" #, fuzzy +#| msgid "Invalid crypto engine" +msgid "No crypto context" +msgstr "Motore crittografico non valido" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Wrong crypto context" +msgstr "Motore crittografico non valido" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Bad crypto context" +msgstr "Motore crittografico non valido" + +msgid "Conflict in the crypto context" +msgstr "" + +#, fuzzy +#| msgid "No public key" +msgid "Broken public key" +msgstr "Nessuna chiave pubblica" + +#, fuzzy +#| msgid "No secret key" +msgid "Broken secret key" +msgstr "Nessuna chiave segreta" + +#, fuzzy #| msgid "Operation cancelled" msgid "Operation fully cancelled" msgstr "Operazione annullata" diff --git a/po/ja.po b/po/ja.po index 4404b80..450d765 100644 --- a/po/ja.po +++ b/po/ja.po @@ -675,6 +675,32 @@ msgid "Ambiguous result" msgstr "?????????????????????" #, fuzzy +msgid "No crypto context" +msgstr "?????????????????????????????????" + +#, fuzzy +msgid "Wrong crypto context" +msgstr "?????????????????????????????????" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Bad crypto context" +msgstr "?????????????????????????????????" + +msgid "Conflict in the crypto context" +msgstr "" + +#, fuzzy +#| msgid "No public key" +msgid "Broken public key" +msgstr "???????????????????????????" + +#, fuzzy +#| msgid "No secret key" +msgid "Broken secret key" +msgstr "???????????????????????????" + +#, fuzzy msgid "Operation fully cancelled" msgstr "???????????????????????????????????????" diff --git a/po/nl.po b/po/nl.po index c4939a6..ebf2538 100644 --- a/po/nl.po +++ b/po/nl.po @@ -662,6 +662,34 @@ msgstr "Gedupliceerde waarde" msgid "Ambiguous result" msgstr "Dubbelzinnige naam" +#, fuzzy +#| msgid "No crypto engine" +msgid "No crypto context" +msgstr "Geen crypto-engine" + +#, fuzzy +#| msgid "No crypto engine" +msgid "Wrong crypto context" +msgstr "Geen crypto-engine" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Bad crypto context" +msgstr "Ongeldige crypto-engine" + +msgid "Conflict in the crypto context" +msgstr "" + +#, fuzzy +#| msgid "No public key" +msgid "Broken public key" +msgstr "Geen publieke sleutel" + +#, fuzzy +#| msgid "No secret key" +msgid "Broken secret key" +msgstr "Geen geheime sleutel" + msgid "Operation fully cancelled" msgstr "Bewerking volledig geannuleerd" diff --git a/po/pl.po b/po/pl.po index a0b69d0..f7d7a76 100644 --- a/po/pl.po +++ b/po/pl.po @@ -665,6 +665,34 @@ msgid "Ambiguous result" msgstr "Niejednoznaczna nazwa" #, fuzzy +#| msgid "No crypto engine" +msgid "No crypto context" +msgstr "Brak silnika kryptograficznego" + +#, fuzzy +#| msgid "No crypto engine" +msgid "Wrong crypto context" +msgstr "Brak silnika kryptograficznego" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Bad crypto context" +msgstr "Niepoprawny silnik kryptograficzny" + +msgid "Conflict in the crypto context" +msgstr "" + +#, fuzzy +#| msgid "No public key" +msgid "Broken public key" +msgstr "Brak klucza publicznego" + +#, fuzzy +#| msgid "No secret key" +msgid "Broken secret key" +msgstr "Brak klucza tajnego" + +#, fuzzy msgid "Operation fully cancelled" msgstr "Operacja anulowana" diff --git a/po/ro.po b/po/ro.po index f87ba93..e52c53b 100644 --- a/po/ro.po +++ b/po/ro.po @@ -682,6 +682,32 @@ msgid "Ambiguous result" msgstr "Nume ambiguu" #, fuzzy +msgid "No crypto context" +msgstr "Motor cifrare invalid" + +#, fuzzy +msgid "Wrong crypto context" +msgstr "Motor cifrare invalid" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Bad crypto context" +msgstr "Motor cifrare invalid" + +msgid "Conflict in the crypto context" +msgstr "" + +#, fuzzy +#| msgid "No public key" +msgid "Broken public key" +msgstr "Nici o cheie public?" + +#, fuzzy +#| msgid "No secret key" +msgid "Broken secret key" +msgstr "Nici o cheie secret?" + +#, fuzzy msgid "Operation fully cancelled" msgstr "Opera?iune anulat?" diff --git a/po/sv.po b/po/sv.po index d186825..261c438 100644 --- a/po/sv.po +++ b/po/sv.po @@ -669,6 +669,32 @@ msgid "Ambiguous result" msgstr "Tvetydigt namn" #, fuzzy +msgid "No crypto context" +msgstr "Ogiltig krypteringsmotor" + +#, fuzzy +msgid "Wrong crypto context" +msgstr "Ogiltig krypteringsmotor" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Bad crypto context" +msgstr "Ogiltig krypteringsmotor" + +msgid "Conflict in the crypto context" +msgstr "" + +#, fuzzy +#| msgid "No public key" +msgid "Broken public key" +msgstr "Ingen publik nyckel" + +#, fuzzy +#| msgid "No secret key" +msgid "Broken secret key" +msgstr "Ingen hemlig nyckel" + +#, fuzzy msgid "Operation fully cancelled" msgstr "??tg??rden avbr??ts" diff --git a/po/uk.po b/po/uk.po index 83bd41b..2b4768e 100644 --- a/po/uk.po +++ b/po/uk.po @@ -679,6 +679,34 @@ msgid "Ambiguous result" msgstr "???????????????????????? ??????????" #, fuzzy +#| msgid "Invalid crypto engine" +msgid "No crypto context" +msgstr "?????????????????????? ?????????? ????????????????????" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Wrong crypto context" +msgstr "?????????????????????? ?????????? ????????????????????" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Bad crypto context" +msgstr "?????????????????????? ?????????? ????????????????????" + +msgid "Conflict in the crypto context" +msgstr "" + +#, fuzzy +#| msgid "No public key" +msgid "Broken public key" +msgstr "?????????? ???????????????????? ??????????" + +#, fuzzy +#| msgid "No secret key" +msgid "Broken secret key" +msgstr "?????????? ?????????????????? ??????????" + +#, fuzzy #| msgid "Operation cancelled" msgid "Operation fully cancelled" msgstr "?????? ??????????????????" diff --git a/po/vi.po b/po/vi.po index 50941e8..54e8c04 100644 --- a/po/vi.po +++ b/po/vi.po @@ -671,6 +671,32 @@ msgid "Ambiguous result" msgstr "T??n m??? h???" #, fuzzy +msgid "No crypto context" +msgstr "C?? ch??? m???t m?? kh??ng h???p l???" + +#, fuzzy +msgid "Wrong crypto context" +msgstr "C?? ch??? m???t m?? kh??ng h???p l???" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Bad crypto context" +msgstr "C?? ch??? m???t m?? kh??ng h???p l???" + +msgid "Conflict in the crypto context" +msgstr "" + +#, fuzzy +#| msgid "No public key" +msgid "Broken public key" +msgstr "Kh??ng c?? kho?? c??ng" + +#, fuzzy +#| msgid "No secret key" +msgid "Broken secret key" +msgstr "Kh??ng c?? kho?? b?? m???t" + +#, fuzzy msgid "Operation fully cancelled" msgstr "Thao t??c b??? h???y b???" diff --git a/po/zh_CN.po b/po/zh_CN.po index 152cfde..74ce991 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -669,6 +669,32 @@ msgid "Ambiguous result" msgstr "" #, fuzzy +msgid "No crypto context" +msgstr "?????????????????????" + +#, fuzzy +msgid "Wrong crypto context" +msgstr "?????????????????????" + +#, fuzzy +#| msgid "Invalid crypto engine" +msgid "Bad crypto context" +msgstr "?????????????????????" + +msgid "Conflict in the crypto context" +msgstr "" + +#, fuzzy +#| msgid "No public key" +msgid "Broken public key" +msgstr "????????????" + +#, fuzzy +#| msgid "No secret key" +msgid "Broken secret key" +msgstr "????????????" + +#, fuzzy msgid "Operation fully cancelled" msgstr "???????????????" commit f85ef07dca7c931d63b202d94bfaccba0a30f7f6 Author: Werner Koch Date: Mon Jun 24 06:37:45 2013 +0200 Update German translation. diff --git a/po/de.po b/po/de.po index 6aacb5c..64dd594 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: libgpg-error-1.9\n" "Report-Msgid-Bugs-To: translations at gnupg.org\n" -"PO-Revision-Date: 2013-02-23 20:08+0100\n" +"PO-Revision-Date: 2013-06-24 06:35+0200\n" "Last-Translator: Werner Koch \n" "Language-Team: none\n" "Language: \n" @@ -315,8 +315,6 @@ msgstr "Ung??ltige Antwort" msgid "No agent running" msgstr "Agent l??uft nicht" -#, fuzzy -#| msgid "agent error" msgid "Agent error" msgstr "Fehler beim Agenten" @@ -659,6 +657,24 @@ msgstr "Doppelter Schl??ssel" msgid "Ambiguous result" msgstr "Uneindeutiges Ergebiss" +msgid "No crypto context" +msgstr "Fehlender Crypto Context" + +msgid "Wrong crypto context" +msgstr "Falscher Crypto Context" + +msgid "Bad crypto context" +msgstr "Fehlerhafter Crypto Context" + +msgid "Conflict in the crypto context" +msgstr "Zwiesp??ltige Benutzung des Crypto Context" + +msgid "Broken public key" +msgstr "Defekter ??ffentlicher Schl??ssel" + +msgid "Broken secret key" +msgstr "Defekter geheimer Schl??ssel" + msgid "Operation fully cancelled" msgstr "Verarbeitung wurde vollst??ndig abgebrochen" ----------------------------------------------------------------------- Summary of changes: NEWS | 9 ++++++++- configure.ac | 6 +++--- po/cs.po | 28 ++++++++++++++++++++++++++++ po/da.po | 28 ++++++++++++++++++++++++++++ po/de.po | 22 +++++++++++++++++++--- po/eo.po | 28 ++++++++++++++++++++++++++++ po/fr.po | 28 ++++++++++++++++++++++++++++ po/it.po | 28 ++++++++++++++++++++++++++++ po/ja.po | 26 ++++++++++++++++++++++++++ po/nl.po | 28 ++++++++++++++++++++++++++++ po/pl.po | 28 ++++++++++++++++++++++++++++ po/ro.po | 26 ++++++++++++++++++++++++++ po/sv.po | 26 ++++++++++++++++++++++++++ po/uk.po | 28 ++++++++++++++++++++++++++++ po/vi.po | 26 ++++++++++++++++++++++++++ po/zh_CN.po | 26 ++++++++++++++++++++++++++ 16 files changed, 384 insertions(+), 7 deletions(-) hooks/post-receive -- Error codes used by GnuPG et al. http://git.gnupg.org From cvs at cvs.gnupg.org Mon Jun 24 07:43:31 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 24 Jun 2013 07:43:31 +0200 Subject: [git] Assuan - branch, master, updated. libassuan-2.1.0-6-gfd255da Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPC library used by GnuPG". The branch, master has been updated via fd255da47cdecb90d58bc93995dd4af6b434dbeb (commit) via cf1e6f64c83194a42012cc786a0da2814be72883 (commit) from 6ba18ca32c8669fa76cc10de3382f78212ca51a8 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit fd255da47cdecb90d58bc93995dd4af6b434dbeb Author: Werner Koch Date: Mon Jun 24 07:17:01 2013 +0200 Post release version bump. -- diff --git a/NEWS b/NEWS index 6dff2f8..842383d 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,7 @@ +Noteworthy changes in version 2.1.2 (unreleased) +------------------------------------------------ + + Noteworthy changes in version 2.1.1 (2013-06-24) ------------------------------------------------ diff --git a/configure.ac b/configure.ac index f588a60..de2347f 100644 --- a/configure.ac +++ b/configure.ac @@ -29,7 +29,7 @@ min_automake_version="1.10" # for the LT versions. m4_define(mym4_version_major, [2]) m4_define(mym4_version_minor, [1]) -m4_define(mym4_version_micro, [1]) +m4_define(mym4_version_micro, [2]) # Below is m4 magic to extract and compute the revision number, the # decimalized short revision number, a beta version string, and a flag commit cf1e6f64c83194a42012cc786a0da2814be72883 Author: Werner Koch Date: Mon Jun 24 07:02:39 2013 +0200 Release 2.1.1. * configure.ac: Set LT version to C4/A4/R1. diff --git a/NEWS b/NEWS index f349b9e..6dff2f8 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ -Noteworthy changes in version 2.1.1 (unreleased) +Noteworthy changes in version 2.1.1 (2013-06-24) ------------------------------------------------ + * Limited support for 64 bit Windows. This is sufficient for use by + GpgEX. + Noteworthy changes in version 2.1.0 (2013-02-22) ------------------------------------------------ diff --git a/configure.ac b/configure.ac index 369a447..f588a60 100644 --- a/configure.ac +++ b/configure.ac @@ -57,7 +57,7 @@ AC_INIT([libassuan],[mym4_full_version],[http://bugs.gnupg.org]) # LIBASSUAN_LT_CURRENT=4 LIBASSUAN_LT_AGE=4 -LIBASSUAN_LT_REVISION=0 +LIBASSUAN_LT_REVISION=1 # If the API is changed in an incompatible way: increment the next counter. LIBASSUAN_CONFIG_API_VERSION=2 ----------------------------------------------------------------------- Summary of changes: NEWS | 9 ++++++++- configure.ac | 4 ++-- 2 files changed, 10 insertions(+), 3 deletions(-) hooks/post-receive -- IPC library used by GnuPG http://git.gnupg.org From cvs at cvs.gnupg.org Mon Jun 24 10:12:43 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Mon, 24 Jun 2013 10:12:43 +0200 Subject: [git] GpgEX - branch, master, updated. gpgex-0.9.7-20-gc2448a3 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnupG extension for the Windows Explorer". The branch, master has been updated via c2448a310fc9ce88b15602f6948b260d8271e529 (commit) via e6b56c09baab19a3d79bf2a6a8e9ce6c15389d28 (commit) via f4a8d23344d2e31060882db6a3c5ec46a4889ed2 (commit) via 1ca3b35efdbbc5bb1559f381cf5007c9c832ea10 (commit) via c824d55ede632a4953616ea14f8a04e7dc103a0a (commit) from 17a42a21318ff5ade9648f216ac097a76aecb6b9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c2448a310fc9ce88b15602f6948b260d8271e529 Author: Werner Koch Date: Mon Jun 24 09:31:58 2013 +0200 Switched to use the GIT versioning system. diff --git a/configure.ac b/configure.ac index 266d068..c2f37a3 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ # configure.ac - for GpgEX -# Copyright (C) 2005, 2006, 2007 g10 Code GmbH +# Copyright (C) 2005, 2006, 2007, 2013 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without @@ -10,30 +10,40 @@ # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # Process this file with autoconf to produce a configure script. -AC_PREREQ(2.59) -min_automake_version="1.9.4" +AC_PREREQ(2.61) +min_automake_version="1.10" + +# To build a release you need to create a tag with the version number +# (git tag -s gnupg-2.n.m) and run "./autogen.sh --force". Please +# bump the version number immediately *after* the release and do +# another commit and push so that the git magic is able to work. +m4_define([mym4_version], [1.0.0]) + +# Below is m4 magic to extract and compute the git revision number, +# the decimalized short revision number, a beta version string and a +# flag indicating a development version (mym4_isgit). Note that the +# m4 processing is done by autoconf and not during the configure run. +m4_define([mym4_revision], + m4_esyscmd([git rev-parse --short HEAD | tr -d '\n\r'])) +m4_define([mym4_revision_dec], + m4_esyscmd_s([echo $((0x$(echo ]mym4_revision[|head -c 4)))])) +m4_define([mym4_betastring], + m4_esyscmd_s([git describe --match 'gpgex-[0-9].[0-9].*[0-9]' --long|\ + awk -F- '$3!=0{print"-beta"$3}'])) +m4_define([mym4_isgit],m4_if(mym4_betastring,[],[no],[yes])) +m4_define([mym4_full_version],[mym4_version[]mym4_betastring]) + +AC_INIT([gpgex],[mym4_full_version], [http://bugs.gnupg.org]) -# Remember to change the version number immediately *after* a release. -# 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], [0.9.7]) -m4_define([my_issvn], [no]) +NEED_GPG_ERROR_VERSION=1.12 -m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \ - || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')])) -AC_INIT([gpgex], my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision]), - [http://bugs.gnupg.org]) +NEED_LIBASSUAN_API=2 +NEED_LIBASSUAN_VERSION=2.1.1 -SVN_REVISION=svn_revision PACKAGE=$PACKAGE_NAME PACKAGE_GT=${PACKAGE_NAME} VERSION=$PACKAGE_VERSION -NEED_GPG_ERROR_VERSION=1.12 - -NEED_LIBASSUAN_API=2 -NEED_LIBASSUAN_VERSION=2.1.1 - AC_CONFIG_SRCDIR(src/gpgex.def) AM_CONFIG_HEADER(config.h) AC_CANONICAL_TARGET @@ -55,17 +65,6 @@ AC_DEFINE_UNQUOTED(PACKAGE_BUGREPORT, "$PACKAGE_BUGREPORT", [Bug report address]) -BUILD_TIMESTAMP=`date --iso-8601=minutes` -AC_SUBST(BUILD_TIMESTAMP) -changequote(,)dnl -BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` -changequote([,])dnl -BUILD_FILEVERSION="${BUILD_FILEVERSION}${SVN_REVISION}" -AC_SUBST(BUILD_FILEVERSION) -BUILD_FILEVERSION_DOT=`echo "$BUILD_FILEVERSION" | tr ',' '.'` -AC_SUBST(BUILD_FILEVERSION_DOT) - - AH_BOTTOM([ /* Some global constants. */ @@ -222,6 +221,31 @@ AH_BOTTOM([ #define _ASSUAN_ONLY_GPG_ERRORS 1 ]) + +# +# Provide information about the build. +# +BUILD_REVISION="mym4_revision" +AC_SUBST(BUILD_REVISION) +AC_DEFINE_UNQUOTED(BUILD_REVISION, "$BUILD_REVISION", + [GIT commit id revision used to build this package]) + +changequote(,)dnl +BUILD_FILEVERSION=`echo "$VERSION" | sed 's/\([0-9.]*\).*/\1./;s/\./,/g'` +changequote([,])dnl +BUILD_FILEVERSION="${BUILD_FILEVERSION}mym4_revision_dec" +AC_SUBST(BUILD_FILEVERSION) +BUILD_FILEVERSION_DOT=`echo "$BUILD_FILEVERSION" | tr ',' '.'` +AC_SUBST(BUILD_FILEVERSION_DOT) + +BUILD_TIMESTAMP=`date -u +%Y-%m-%dT%H:%M+0000 2>/dev/null || date` +AC_SUBST(BUILD_TIMESTAMP) +AC_DEFINE_UNQUOTED(BUILD_TIMESTAMP, "$BUILD_TIMESTAMP", + [The time this package was configured for a build]) +BUILD_HOSTNAME="$ac_hostname" +AC_SUBST(BUILD_HOSTNAME) + + # # Print errors here so that they are visible all # together and the user can acquire them all together. diff --git a/src/Makefile.am b/src/Makefile.am index 2c238b9..f02d084 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -13,7 +13,7 @@ bin_PROGRAMS = gpgex EXTRA_DIST = versioninfo.rc.in gpgex.manifest.in \ - GNU.GnuPG.Gcc64Support.manifest + GNU.GnuPG.Gcc64Support.manifest gnupg.ico EXEEXT = .dll AM_CFLAGS = $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS) -shared commit e6b56c09baab19a3d79bf2a6a8e9ce6c15389d28 Author: Werner Koch Date: Mon Jun 24 09:15:32 2013 +0200 Auto update the PO files. -- diff --git a/po/ar.po b/po/ar.po index 6f71705..daae4fd 100644 --- a/po/ar.po +++ b/po/ar.po @@ -30,6 +30,9 @@ msgstr "" msgid "Help on GpgEX" msgstr "??????????????? ?????? ???GpgEx???" +msgid "About GpgEX" +msgstr "" + msgid "Decrypt and verify" msgstr "?????????? ?? ????????" @@ -63,6 +66,9 @@ msgstr "??????????? ???? ???????????? ???GpgEx???" msgid "Invoke the GpgEX documentation." msgstr "??????????? ?????????? ???GpgEx???" +msgid "Show the version of GpgEX." +msgstr "" + msgid "Decrypt and verify the marked files." msgstr "?????????? ?? ???????? ???? ?????????????? ??????????????????." @@ -92,3 +98,11 @@ msgstr "???????? ??????????????????." msgid "Show more GpgEX options." msgstr "??????????? ?????????? ???? ???????????? ???GpgEx???." + +#. TRANSLATORS: See the source for the full english text. +msgid "-#GpgEXFullHelpText#-" +msgstr "" + +#, c-format +msgid "This is GpgEX version %s (%s)" +msgstr "" diff --git a/po/es.po b/po/es.po index f794aab..7036835 100644 --- a/po/es.po +++ b/po/es.po @@ -27,6 +27,9 @@ msgstr "" msgid "Help on GpgEX" msgstr "Ayuda de GpgEX" +msgid "About GpgEX" +msgstr "" + msgid "Decrypt and verify" msgstr "Descifrar y verificar." @@ -60,6 +63,9 @@ msgstr "M??s opciones de GpgEX" msgid "Invoke the GpgEX documentation." msgstr "Invocar la documentaci??n de GpgEX." +msgid "Show the version of GpgEX." +msgstr "" + msgid "Decrypt and verify the marked files." msgstr "Descifrar y verificar los archivos marcados." @@ -89,3 +95,11 @@ msgstr "Verificar sumas de comprobaci??n." msgid "Show more GpgEX options." msgstr "Mostrar m??s opciones de GpgEX." + +#. TRANSLATORS: See the source for the full english text. +msgid "-#GpgEXFullHelpText#-" +msgstr "" + +#, c-format +msgid "This is GpgEX version %s (%s)" +msgstr "" diff --git a/po/pt.po b/po/pt.po index a58b507..785d28f 100644 --- a/po/pt.po +++ b/po/pt.po @@ -30,6 +30,9 @@ msgstr "" msgid "Help on GpgEX" msgstr "Ajuda de GpgEX" +msgid "About GpgEX" +msgstr "" + msgid "Decrypt and verify" msgstr "Desencriptar e verificar" @@ -63,6 +66,9 @@ msgstr "Mais op msgid "Invoke the GpgEX documentation." msgstr "Invocar a documenta??o do GpgEX." +msgid "Show the version of GpgEX." +msgstr "" + msgid "Decrypt and verify the marked files." msgstr "Desencriptar e verificar os ficheiros marcados." @@ -92,3 +98,11 @@ msgstr "Verificar checksums." msgid "Show more GpgEX options." msgstr "Mostrar mais op??es do GpgEX." + +#. TRANSLATORS: See the source for the full english text. +msgid "-#GpgEXFullHelpText#-" +msgstr "" + +#, c-format +msgid "This is GpgEX version %s (%s)" +msgstr "" diff --git a/po/ru.po b/po/ru.po index c5b1465..79a0120 100644 --- a/po/ru.po +++ b/po/ru.po @@ -28,6 +28,9 @@ msgstr "" msgid "Help on GpgEX" msgstr "???????????? ???? GpgEX" +msgid "About GpgEX" +msgstr "" + msgid "Decrypt and verify" msgstr "???????????????????????? ?? ??????????????????" @@ -61,6 +64,9 @@ msgstr "???????????? ?????????????????? GpgEX" msgid "Invoke the GpgEX documentation." msgstr "?????????????? ???????????????????????? GpgEX." +msgid "Show the version of GpgEX." +msgstr "" + msgid "Decrypt and verify the marked files." msgstr "???????????????????????? ?? ?????????????????? ???????????????????? ??????????." @@ -90,3 +96,11 @@ msgstr "?????????????????? ?????????????????????? ??????????." msgid "Show more GpgEX options." msgstr "???????????? ?????????????????? GpgEX." + +#. TRANSLATORS: See the source for the full english text. +msgid "-#GpgEXFullHelpText#-" +msgstr "" + +#, c-format +msgid "This is GpgEX version %s (%s)" +msgstr "" commit f4a8d23344d2e31060882db6a3c5ec46a4889ed2 Author: Werner Koch Date: Mon Jun 24 09:15:15 2013 +0200 Update the German translation. diff --git a/po/de.po b/po/de.po index 902dea8..5fe8dbe 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gpgex 0.0.0-svn10\n" "Report-Msgid-Bugs-To: bug-gpgex at g10code.com\n" -"PO-Revision-Date: 2009-01-22 16:11+0100\n" +"PO-Revision-Date: 2013-06-24 09:14+0200\n" "Last-Translator: Marcus Brinkmann \n" "Language-Team: German\n" "Language: \n" @@ -27,6 +27,9 @@ msgstr "" msgid "Help on GpgEX" msgstr "Hilfe zu GpgEX" +msgid "About GpgEX" +msgstr "??ber GpgEX" + msgid "Decrypt and verify" msgstr "Entschl??sseln und pr??fen" @@ -60,6 +63,9 @@ msgstr "Mehr GpgEX Optionen" msgid "Invoke the GpgEX documentation." msgstr "??ffne die Dokumentation zu GpgEX" +msgid "Show the version of GpgEX." +msgstr "Anzeige der Version von GpgEX" + msgid "Decrypt and verify the marked files." msgstr "Die markierten Dateien entschl??sseln und pr??fen." @@ -89,3 +95,30 @@ msgstr "Die Pr??fsummen der markierten Dateien ??berpr??fen." msgid "Show more GpgEX options." msgstr "Mehr GpgEX Optionen." + +#. TRANSLATORS: See the source for the full english text. +msgid "-#GpgEXFullHelpText#-" +msgstr "" +"GpgEX ist eine Explorer Erweiterung, welches es erm??glicht\n" +"Daten mittels der Internet-Standards PGP/MIME oder S/MIME\n" +"zu verschl??sseln und digital zu signieren. Im Hintergrund wird\n" +"dazu die GnuPG Software () benutzt.\n" +"\n" +"GpgEX ist freie Software. Sie k??nnen es unter den Bedingungen\n" +"der GNU Lesser General Public License, wie von der Free Software\n" +"Foundation ver??ffentlicht, weitergeben und/oder modifizieren;\n" +"entweder gem???? Version 2.1 der Lizenz oder (nach Ihrer Wahl)\n" +"jeder sp??teren Version.\n" +"\n" +"GpgEX wird in der Hoffnung ver??ffentlicht, da?? es Ihnen von Nutzen\n" +"sein wird, aber ohne irgendeine Garantie, sogar ohne die implizite\n" +"Garantie der Marktreife oder der Verwendbarkeit f??r einen bestimmten\n" +"Zweck. Details finden Sie in der GNU Lesser General Public License.\n" +"\n" +"Zusammen mit GpgEX sollten Sie eine Kopie der GNU Lesser General\n" +"Public License erhalten haben. Falls nicht, finden Sie diese\n" +"unter der Webadresse ." + +#, c-format +msgid "This is GpgEX version %s (%s)" +msgstr "Dies ist GpgEX Version %s (%s)" commit 1ca3b35efdbbc5bb1559f381cf5007c9c832ea10 Author: Werner Koch Date: Mon Jun 24 09:12:32 2013 +0200 Add an About message box. * src/gpgex.cc (ID_CMD_ABOUT): New. (ID_CMD_STR_ABOUT): New. (QueryContextMenu): Add About menu item. (GetCommandString): Add tooltip for that. (show_about): New. (InvokeCommand): Display about menu. diff --git a/src/gpgex.cc b/src/gpgex.cc index 3125a25..45f63bc 100644 --- a/src/gpgex.cc +++ b/src/gpgex.cc @@ -53,9 +53,11 @@ using std::string; #define ID_CMD_CREATE_CHECKSUMS 8 #define ID_CMD_VERIFY_CHECKSUMS 9 #define ID_CMD_POPUP 10 -#define ID_CMD_MAX 10 +#define ID_CMD_ABOUT 11 +#define ID_CMD_MAX 11 #define ID_CMD_STR_HELP _("Help on GpgEX") +#define ID_CMD_STR_ABOUT _("About GpgEX") #define ID_CMD_STR_DECRYPT_VERIFY _("Decrypt and verify") #define ID_CMD_STR_DECRYPT _("Decrypt") #define ID_CMD_STR_VERIFY _("Verify") @@ -369,6 +371,9 @@ gpgex_t::QueryContextMenu (HMENU hMenu, UINT indexMenu, UINT idCmdFirst, if (res) res = InsertMenu (popup, idx++, MF_BYPOSITION | MF_STRING, idCmdFirst + ID_CMD_HELP, ID_CMD_STR_HELP); + if (res) + res = InsertMenu (popup, idx++, MF_BYPOSITION | MF_STRING, + idCmdFirst + ID_CMD_ABOUT, ID_CMD_STR_ABOUT); if (! res) return TRACE_RES (HRESULT_FROM_WIN32 (GetLastError ())); @@ -410,6 +415,10 @@ gpgex_t::GetCommandString (UINT_PTR idCommand, UINT uFlags, LPUINT lpReserved, txt = _("Invoke the GpgEX documentation."); break; + case ID_CMD_ABOUT: + txt = _("Show the version of GpgEX."); + break; + case ID_CMD_DECRYPT_VERIFY: txt = _("Decrypt and verify the marked files."); break; @@ -554,6 +563,61 @@ start_help (HWND hwnd) } +/* Show the version informatione etc. */ +static void +show_about (HWND hwnd) +{ + const char cpynotice[] = "Copyright (C) 2013 g10 Code GmbH"; + const char en_notice[] = + "GpgEX is an Explorer plugin for data encryption and signing\n" + "It uses the GnuPG software (http://www.gnupg.org).\n" + "\n" + "GpgEX is free software; you can redistribute it and/or\n" + "modify it under the terms of the GNU Lesser General Public\n" + "License as published by the Free Software Foundation; either\n" + "version 2.1 of the License, or (at your option) any later version.\n" + "\n" + "GpgEX is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "GNU Lesser General Public License for more details.\n" + "\n" + "You should have received a copy of the GNU Lesser General Public " + "License\n" + "along with this program; if not, see ."; + + /* TRANSLATORS: See the source for the full english text. */ + const char notice_key[] = N_("-#GpgEXFullHelpText#-"); + const char *notice; + char header[300]; + char *buffer; + size_t nbuffer; + + snprintf (header, sizeof header, _("This is GpgEX version %s (%s)"), + PACKAGE_VERSION, +#ifdef HAVE_W64_SYSTEM + "64 bit" +#else + "32 bit" +#endif + ); + notice = _(notice_key); + if (!strcmp (notice, notice_key)) + notice = en_notice; + nbuffer = strlen (header) + strlen (cpynotice) + strlen (notice) + 20; + buffer = (char*)malloc (nbuffer); + if (buffer) + { + snprintf (buffer, nbuffer, "%s\n%s\n\n%s\n", + header, cpynotice, notice); + MessageBox (hwnd, buffer, "GpgEx", MB_OK); + free (buffer); + } + else + MessageBox (hwnd, header, "GpgEx", MB_OK); +} + + STDMETHODIMP gpgex_t::InvokeCommand (LPCMINVOKECOMMANDINFO lpcmi) { @@ -575,6 +639,10 @@ gpgex_t::InvokeCommand (LPCMINVOKECOMMANDINFO lpcmi) start_help (lpcmi->hwnd); break; + case ID_CMD_ABOUT: + show_about (lpcmi->hwnd); + break; + case ID_CMD_DECRYPT_VERIFY: client.decrypt_verify (this->filenames); break; commit c824d55ede632a4953616ea14f8a04e7dc103a0a Author: Werner Koch Date: Mon Jun 24 09:06:05 2013 +0200 Require latest libgpg-erro and libassuan versions. diff --git a/configure.ac b/configure.ac index 2d1dc40..266d068 100644 --- a/configure.ac +++ b/configure.ac @@ -22,17 +22,17 @@ m4_define([my_issvn], [no]) m4_define([svn_revision], m4_esyscmd([echo -n $( (svn info 2>/dev/null \ || echo 'Revision: 0')|sed -n '/^Revision:/ {s/[^0-9]//gp;q;}')])) AC_INIT([gpgex], my_version[]m4_if(my_issvn,[yes],[-svn[]svn_revision]), - [bug-gpgex at g10code.com]) + [http://bugs.gnupg.org]) SVN_REVISION=svn_revision PACKAGE=$PACKAGE_NAME PACKAGE_GT=${PACKAGE_NAME} VERSION=$PACKAGE_VERSION -NEED_GPG_ERROR_VERSION=1.9 +NEED_GPG_ERROR_VERSION=1.12 NEED_LIBASSUAN_API=2 -NEED_LIBASSUAN_VERSION=2.0.0 +NEED_LIBASSUAN_VERSION=2.1.1 AC_CONFIG_SRCDIR(src/gpgex.def) AM_CONFIG_HEADER(config.h) ----------------------------------------------------------------------- Summary of changes: configure.ac | 84 +++++++++++++++++++++++++++++++++++------------------- po/ar.po | 14 +++++++++ po/de.po | 35 ++++++++++++++++++++++- po/es.po | 14 +++++++++ po/pt.po | 14 +++++++++ po/ru.po | 14 +++++++++ src/Makefile.am | 2 +- src/gpgex.cc | 70 +++++++++++++++++++++++++++++++++++++++++++++- 8 files changed, 214 insertions(+), 33 deletions(-) hooks/post-receive -- GnupG extension for the Windows Explorer http://git.gnupg.org From cvs at cvs.gnupg.org Tue Jun 25 18:16:32 2013 From: cvs at cvs.gnupg.org (by Jussi Kivilinna) Date: Tue, 25 Jun 2013 18:16:32 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-153-g3544fa8 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 3544fa8aa63bef9a35abf236e9376191b5ec206b (commit) via ec2f8de409a93c80efa658134df22074a9bca5a4 (commit) via d94ec5f5f8a5d40a7d344025aa466f276f9718df (commit) via e7ab4e1a7396f4609b9033207015b239ab4a5140 (commit) via 3289bca708bdd02c69a331095ac6ca9a1efd74cc (commit) via d325ab5d86e6107a46007a4d0131122bbd719f8c (commit) via 7317fcfadf00789df140e51c0d16b60f6b144b59 (commit) via 9a61edd1f00cefe8ffa3ad54a53eed163883053c (commit) from 99b18aa536703ef90c9a1f5c8f40bc68b2064593 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: cipher/Makefile.am | 11 +- cipher/blowfish-amd64.S | 533 ++++++++++++++ cipher/blowfish.c | 272 +++++++ cipher/camellia-aesni-avx-amd64.S | 3 +- cipher/camellia-aesni-avx2-amd64.S | 1247 +++++++++++++++++++++++++++++++ cipher/camellia-glue.c | 145 ++++- cipher/cast5-amd64.S | 2 +- cipher/cast5.c | 2 +- cipher/cipher.c | 15 + cipher/rijndael-amd64.S | 1416 ++++++++++++++++++++++++++++++++++++ cipher/rijndael.c | 32 + cipher/serpent-avx2-amd64.S | 886 ++++++++++++++++++++++ cipher/serpent-sse2-amd64.S | 2 +- cipher/serpent.c | 142 ++++- cipher/twofish-amd64.S | 731 +++++++++++++++++++ cipher/twofish.c | 278 +++++++ configure.ac | 98 +++ src/cipher.h | 24 + src/g10lib.h | 1 + src/global.c | 1 + src/hwf-x86.c | 24 +- src/misc.c | 26 + 22 files changed, 5871 insertions(+), 20 deletions(-) create mode 100644 cipher/blowfish-amd64.S create mode 100644 cipher/camellia-aesni-avx2-amd64.S create mode 100644 cipher/rijndael-amd64.S create mode 100644 cipher/serpent-avx2-amd64.S create mode 100644 cipher/twofish-amd64.S hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 26 11:39:41 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 26 Jun 2013 11:39:41 +0200 Subject: [git] GCRYPT - branch, master, updated. libgcrypt-1.5.0-154-g6540b84 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU crypto library". The branch, master has been updated via 6540b84a6e9113813e7e49e3ad2024d4a0073300 (commit) from 3544fa8aa63bef9a35abf236e9376191b5ec206b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6540b84a6e9113813e7e49e3ad2024d4a0073300 Author: Werner Koch Date: Wed Jun 26 11:09:42 2013 +0200 Make gpg-error replacement defines more robust. * configure.ac (AH_BOTTOM): Move GPG_ERR_ replacement defines to ... * src/gcrypt-int.h: new file. * src/visibility.h, src/cipher.h: Replace gcrypt.h by gcrypt-int.h. * tests/: Ditto for all test files. -- Defining newer gpg-error codes in config.h was not a good idea, because config.h is usually included before gpg-error.h and thus gpg-error.h would be double defines to lead to faulty code there like typedef enum { [...] 191 = 191, [...] }; diff --git a/configure.ac b/configure.ac index d9b1639..13541bb 100644 --- a/configure.ac +++ b/configure.ac @@ -65,6 +65,8 @@ LIBGCRYPT_LT_REVISION=0 # If the API is changed in an incompatible way: increment the next counter. LIBGCRYPT_CONFIG_API_VERSION=1 +# If you change the required gpg-error version, please remove +# unnecessary error code defines in src/gcrypt-int.h. NEED_GPG_ERROR_VERSION=1.11 PACKAGE=$PACKAGE_NAME @@ -105,15 +107,6 @@ AH_BOTTOM([ properly prefixed. */ #define CAMELLIA_EXT_SYM_PREFIX _gcry_ -/* These error codes are used but not defined in the required - libgpg-error 1.11. Define them here. */ -#define GPG_ERR_NO_CRYPT_CTX 191 -#define GPG_ERR_WRONG_CRYPT_CTX 192 -#define GPG_ERR_BAD_CRYPT_CTX 193 -#define GPG_ERR_CRYPT_CTX_CONFLICT 194 -#define GPG_ERR_BROKEN_PUBKEY 195 -#define GPG_ERR_BROKEN_SECKEY 196 - #endif /*_GCRYPT_CONFIG_H_INCLUDED*/ ]) diff --git a/src/Makefile.am b/src/Makefile.am index 22263d9..8eb46e6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -54,7 +54,8 @@ else endif libgcrypt_la_CFLAGS = $(GPG_ERROR_CFLAGS) -libgcrypt_la_SOURCES = g10lib.h visibility.c visibility.h types.h \ +libgcrypt_la_SOURCES = \ + gcrypt-int.h g10lib.h visibility.c visibility.h types.h \ cipher.h cipher-proto.h gcrypt-module.h \ misc.c global.c sexp.c hwfeatures.c hwf-common.h \ stdmem.c stdmem.h secmem.c secmem.h \ diff --git a/src/cipher.h b/src/cipher.h index 80c8839..2620613 100644 --- a/src/cipher.h +++ b/src/cipher.h @@ -20,7 +20,7 @@ #ifndef G10_CIPHER_H #define G10_CIPHER_H -#include +#include "gcrypt-int.h" #define DBG_CIPHER _gcry_get_debug_flag( 1 ) diff --git a/src/gcrypt-int.h b/src/gcrypt-int.h new file mode 100644 index 0000000..33969fe --- /dev/null +++ b/src/gcrypt-int.h @@ -0,0 +1,40 @@ +/* gcrypt-int.h - Internal version of gcrypt.h + * Copyright (C) 2013 g10 Code GmbH + * + * This file is part of Libgcrypt. + * + * Libgcrypt is free software; you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * Libgcrypt is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, see . + */ + +#ifndef GCRY_GCRYPT_INT_H +#define GCRY_GCRYPT_INT_H + +#ifdef _GCRYPT_H +#error gcrypt.h already included +#endif + +#include "gcrypt.h" + +/* These error codes are used but not defined in the required + libgpg-error 1.11. Define them here. */ +#ifndef GPG_ERR_NO_CRYPT_CTX +# define GPG_ERR_NO_CRYPT_CTX 191 +# define GPG_ERR_WRONG_CRYPT_CTX 192 +# define GPG_ERR_BAD_CRYPT_CTX 193 +# define GPG_ERR_CRYPT_CTX_CONFLICT 194 +# define GPG_ERR_BROKEN_PUBKEY 195 +# define GPG_ERR_BROKEN_SECKEY 196 +#endif + +#endif /*GCRY_GCRYPT_INT_H*/ diff --git a/src/visibility.h b/src/visibility.h index 6887f37..4837ed6 100644 --- a/src/visibility.h +++ b/src/visibility.h @@ -201,10 +201,10 @@ /* We need to redeclare the deprecated functions without the deprecated attribute. */ # define GCRYPT_NO_DEPRECATED -# include "gcrypt.h" +# include "gcrypt-int.h" /* None in this version. */ #else -# include "gcrypt.h" +# include "gcrypt-int.h" #endif #include "gcrypt-module.h" diff --git a/tests/aeswrap.c b/tests/aeswrap.c index bb52fc9..16b576d 100644 --- a/tests/aeswrap.c +++ b/tests/aeswrap.c @@ -26,7 +26,7 @@ #include #include -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" static int verbose; static int error_count; diff --git a/tests/basic.c b/tests/basic.c index c92750c..d1b4002 100644 --- a/tests/basic.c +++ b/tests/basic.c @@ -27,7 +27,7 @@ #include #include -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" #ifndef DIM # define DIM(v) (sizeof(v)/sizeof((v)[0])) diff --git a/tests/benchmark.c b/tests/benchmark.c index 61badd5..c4b5258 100644 --- a/tests/benchmark.c +++ b/tests/benchmark.c @@ -31,7 +31,7 @@ #endif #ifdef _GCRYPT_IN_LIBGCRYPT -# include "../src/gcrypt.h" +# include "../src/gcrypt-int.h" # include "../compat/libcompat.h" #else # include diff --git a/tests/curves.c b/tests/curves.c index 6cfcd4f..664e875 100644 --- a/tests/curves.c +++ b/tests/curves.c @@ -26,7 +26,7 @@ #include #include -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" /* Number of curves defined in ../cipger/ecc.c */ #define N_CURVES 12 diff --git a/tests/fips186-dsa.c b/tests/fips186-dsa.c index 401acff..10b18ab 100644 --- a/tests/fips186-dsa.c +++ b/tests/fips186-dsa.c @@ -26,7 +26,7 @@ #include #ifdef _GCRYPT_IN_LIBGCRYPT -# include "../src/gcrypt.h" +# include "../src/gcrypt-int.h" #else # include #endif diff --git a/tests/fipsdrv.c b/tests/fipsdrv.c index 2d4c362..eef2ddd 100644 --- a/tests/fipsdrv.c +++ b/tests/fipsdrv.c @@ -35,7 +35,7 @@ #include #ifdef _GCRYPT_IN_LIBGCRYPT -# include "../src/gcrypt.h" +# include "../src/gcrypt-int.h" #else # include # define PACKAGE_BUGREPORT "devnull at example.org" diff --git a/tests/hmac.c b/tests/hmac.c index 292a2fa..5d695ea 100644 --- a/tests/hmac.c +++ b/tests/hmac.c @@ -26,7 +26,7 @@ #include #include -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" static int verbose; static int error_count; diff --git a/tests/keygen.c b/tests/keygen.c index 05593c3..1d1b43e 100644 --- a/tests/keygen.c +++ b/tests/keygen.c @@ -25,7 +25,7 @@ #include #include #include -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" diff --git a/tests/keygrip.c b/tests/keygrip.c index a496ca2..a89bba8 100644 --- a/tests/keygrip.c +++ b/tests/keygrip.c @@ -28,7 +28,7 @@ #include #include -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" static int verbose; static int repetitions; diff --git a/tests/mpitests.c b/tests/mpitests.c index 3b75ea7..5643c1b 100644 --- a/tests/mpitests.c +++ b/tests/mpitests.c @@ -28,7 +28,7 @@ #include #ifdef _GCRYPT_IN_LIBGCRYPT -# include "../src/gcrypt.h" +# include "../src/gcrypt-int.h" #else # include #endif diff --git a/tests/pkcs1v2.c b/tests/pkcs1v2.c index bb06292..20f1b64 100644 --- a/tests/pkcs1v2.c +++ b/tests/pkcs1v2.c @@ -26,7 +26,7 @@ #include #ifdef _GCRYPT_IN_LIBGCRYPT -# include "../src/gcrypt.h" +# include "../src/gcrypt-int.h" #else # include #endif diff --git a/tests/prime.c b/tests/prime.c index 5d928bd..6e825ae 100644 --- a/tests/prime.c +++ b/tests/prime.c @@ -24,7 +24,7 @@ #include #include -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" static int verbose; diff --git a/tests/pubkey.c b/tests/pubkey.c index 4534175..ffaecb3 100644 --- a/tests/pubkey.c +++ b/tests/pubkey.c @@ -26,7 +26,7 @@ #include -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" /* Sample RSA keys, taken from basic.c. */ diff --git a/tests/random.c b/tests/random.c index a46d754..ccaa3f9 100644 --- a/tests/random.c +++ b/tests/random.c @@ -30,7 +30,7 @@ # include #endif -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" #define PGM "random" diff --git a/tests/rsacvt.c b/tests/rsacvt.c index 014cd2a..6fb5c76 100644 --- a/tests/rsacvt.c +++ b/tests/rsacvt.c @@ -52,7 +52,7 @@ e7a7ca5367c661f8e6[...]71 #include #ifdef _GCRYPT_IN_LIBGCRYPT -# include "../src/gcrypt.h" +# include "../src/gcrypt-int.h" #else # include # define PACKAGE_BUGREPORT "devnull at example.org" diff --git a/tests/t-kdf.c b/tests/t-kdf.c index 50deba0..adbe6cc 100644 --- a/tests/t-kdf.c +++ b/tests/t-kdf.c @@ -27,7 +27,7 @@ #include #include -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" #ifndef DIM # define DIM(v) (sizeof(v)/sizeof((v)[0])) diff --git a/tests/t-mpi-bit.c b/tests/t-mpi-bit.c index 85bd32e..b1c999e 100644 --- a/tests/t-mpi-bit.c +++ b/tests/t-mpi-bit.c @@ -28,7 +28,7 @@ #include #include -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" #define PGM "t-mpi-bit" diff --git a/tests/t-mpi-point.c b/tests/t-mpi-point.c index 98236e7..2631a11 100644 --- a/tests/t-mpi-point.c +++ b/tests/t-mpi-point.c @@ -26,7 +26,7 @@ #include #include -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" #define PGM "t-mpi-point" diff --git a/tests/tsexp.c b/tests/tsexp.c index 73d3d6e..cef3ed1 100644 --- a/tests/tsexp.c +++ b/tests/tsexp.c @@ -25,7 +25,7 @@ #include #include #include -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" #define PGMNAME "tsexp" diff --git a/tests/version.c b/tests/version.c index af3c4c3..1332c7c 100644 --- a/tests/version.c +++ b/tests/version.c @@ -33,7 +33,7 @@ #include #include -#include "../src/gcrypt.h" +#include "../src/gcrypt-int.h" #define PGM "version" ----------------------------------------------------------------------- Summary of changes: configure.ac | 11 +-------- src/Makefile.am | 3 +- src/cipher.h | 2 +- cipher/hash-common.h => src/gcrypt-int.h | 31 ++++++++++++++++++----------- src/visibility.h | 4 +- tests/aeswrap.c | 2 +- tests/basic.c | 2 +- tests/benchmark.c | 2 +- tests/curves.c | 2 +- tests/fips186-dsa.c | 2 +- tests/fipsdrv.c | 2 +- tests/hmac.c | 2 +- tests/keygen.c | 2 +- tests/keygrip.c | 2 +- tests/mpitests.c | 2 +- tests/pkcs1v2.c | 2 +- tests/prime.c | 2 +- tests/pubkey.c | 2 +- tests/random.c | 2 +- tests/rsacvt.c | 2 +- tests/t-kdf.c | 2 +- tests/t-mpi-bit.c | 2 +- tests/t-mpi-point.c | 2 +- tests/tsexp.c | 2 +- tests/version.c | 2 +- 25 files changed, 46 insertions(+), 45 deletions(-) copy cipher/hash-common.h => src/gcrypt-int.h (53%) hooks/post-receive -- The GNU crypto library http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 26 16:42:49 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 26 Jun 2013 16:42:49 +0200 Subject: [git] GpgEX - branch, master, updated. gpgex-0.9.7-23-g2ff96b6 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnupG extension for the Windows Explorer". The branch, master has been updated via 2ff96b6ed1742d86a5be7972d241e2cb9a18886b (commit) via 296829d61514a25452cc113c41cdf7153ec4d90c (commit) via 29e493fc945d240f8a0cfe28ff7f80e57cf8e5ee (commit) from c2448a310fc9ce88b15602f6948b260d8271e529 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2ff96b6ed1742d86a5be7972d241e2cb9a18886b Author: Werner Koch Date: Wed Jun 26 15:59:55 2013 +0200 Improve starting of the UI-server. * client.cc (default_uiserver_cmdline): Replace code with code from gpgol so that gpgol will also be tried. Use the installation root to find the default UI server. (call_assuan): Print the name of teh UI-server if it has been launched by this instance. * main.h (gpgex_server): New. diff --git a/src/ChangeLog b/src/ChangeLog index 86bc3ad..a6f7a7c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,10 +1,18 @@ 2013-06-26 Werner Koch + * client.cc (default_uiserver_cmdline): Replace code with code + from gpgol so that gpgol will also be tried. Use the + installation root to find the default UI server. + (call_assuan): Print the name of teh UI-server if it has been + launched by this instance. + * main.h (gpgex_server): New. + * gpgex.cc (get_lang_name): Rewrite using gettext. (start_help): Improve language detection. Remove fallback to an external URL. * main.h (gpgex_server): Add root_dir. (utf8_to_wchar): Add prototype. + * main.cc (gpgex_server::root_dir): New. (get_locale_dir): Pass then instance to GetModuleFileNameW. Store the root dir. diff --git a/src/client.cc b/src/client.cc index 3f17de3..6fc9162 100644 --- a/src/client.cc +++ b/src/client.cc @@ -1,5 +1,5 @@ /* client.cc - gpgex assuan client implementation - Copyright (C) 2007, 2008 g10 Code GmbH + Copyright (C) 2007, 2008, 2013 g10 Code GmbH This file is part of GpgEX. @@ -40,6 +40,17 @@ using std::string; #include "client.h" +static inline char * +_gpgex_stpcpy (char *a, const char *b) +{ + while (*b) + *a++ = *b++; + *a = 0; + return a; +} +#define stpcpy(a,b) _gpgex_stpcpy ((a), (b)) + + static const char * default_socket_name (void) @@ -62,49 +73,79 @@ default_socket_name (void) } +/* Return the name of the default UI server. This name is used to + auto start an UI server if an initial connect failed. */ static const char * default_uiserver_cmdline (void) { - static string name; + static char *name; - if (name.size () == 0) + if (!name) { - char *dir = NULL; + const char *dir; + char *uiserver, *p; + int extra_arglen = 0; - dir = read_w32_registry_string ("HKEY_LOCAL_MACHINE", REGKEY, - "Install Directory"); - if (dir) - { - char *uiserver_buffer = NULL; - const char *uiserver; - - uiserver_buffer = read_w32_registry_string (NULL, - REGKEY, "UI Server"); - if (uiserver_buffer) - uiserver = uiserver_buffer; - else - { - string fname; - - try { fname = ((string) dir) + "\\" - + "kleopatra.exe"; } catch (...) {} - - /* The option --use-standard-socket is the default on - windows, so we can omit it here. */ - if (! access (fname.c_str (), F_OK)) - uiserver = "kleopatra.exe --daemon"; - else - uiserver = "gpa.exe --daemon"; - } - - try { name = ((string) dir) + "\\" + uiserver; } catch (...) {} - - free (uiserver_buffer); - free ((void *) dir); - } + dir = gpgex_server::root_dir; + if (!dir) + return NULL; + + uiserver = read_w32_registry_string (NULL, REGKEY, "UI Server"); + if (!uiserver) + { + uiserver = strdup ("kleopatra.exe"); + if (!uiserver) + return NULL; + extra_arglen = 9; /* Space required for " --daemon". */ + } + + name = (char*)malloc (strlen (dir) + strlen (uiserver) + extra_arglen +2); + if (!name) + { + free (uiserver); + return NULL; + } + strcpy (stpcpy (stpcpy (name, dir), "\\"), uiserver); + for (p = name; *p; p++) + if (*p == '/') + *p = '\\'; + free (uiserver); + gpgex_server::ui_server = "Kleopatra"; + if (extra_arglen && access (name, F_OK)) + { + /* Kleopatra is not installed: Try GPA instead but if it is + also not available return the Kleopatra filename. */ + const char gpaserver[] = "gpa.exe"; + char *name2; + + name2 = (char*)malloc (strlen (dir) + strlen (gpaserver) + + extra_arglen+2); + if (name2) + { + strcpy (stpcpy (stpcpy (name2, dir), "\\"), gpaserver); + for (p = name2; *p; p++) + if (*p == '/') + *p = '\\'; + if (access (name2, F_OK )) + free (name2); + else + { + free (name); + name = name2; + gpgex_server::ui_server = "GPA"; + } + } + } + + /* Append the --daemon arg unless the server name has been taken + from the Registry. */ + if (name && extra_arglen) + strcat (name, " --daemon"); + else + gpgex_server::ui_server = NULL; } - return name.c_str (); + return name; } @@ -364,7 +405,11 @@ client_t::call_assuan (const char *cmd, vector &filenames) if (rc) { char buf[256]; - snprintf (buf, sizeof (buf), _("Can not access Kleopatra:\r\n%s"), + snprintf (buf, sizeof (buf), + _("Can not access the UI-server%s%s%s:\r\n%s"), + gpgex_server::ui_server? " (":"", + gpgex_server::ui_server? gpgex_server::ui_server:"", + gpgex_server::ui_server? ")":"", gpg_strerror (rc)); MessageBox (this->window, buf, "GpgEX", MB_ICONINFORMATION); } diff --git a/src/gpgex.cc b/src/gpgex.cc index 2b8a160..8c973d8 100644 --- a/src/gpgex.cc +++ b/src/gpgex.cc @@ -515,8 +515,9 @@ get_lang_name (void) } -/* FIXME: Might be exported in a helper utility. Also, it might be - that we use KDE's help browser? */ +/* According to MSDN using ShellExecute may be problematic when using + within the Shell. Thus we call Internet explorer directly. It is + anyway only used for local files. */ static void start_help (HWND hwnd) { @@ -581,7 +582,6 @@ start_help (HWND hwnd) } } - if (wurl) { BSTR burl = SysAllocString ((const OLECHAR *)wurl); diff --git a/src/main.cc b/src/main.cc index 0b354e1..dcade3b 100644 --- a/src/main.cc +++ b/src/main.cc @@ -48,6 +48,10 @@ LONG gpgex_server::refcount; /* The root of our installation. */ const char *gpgex_server::root_dir; +/* The name of the UI-server or NULL if not known. */ +const char *gpgex_server::ui_server; + + static char * get_locale_dir (void) diff --git a/src/main.h b/src/main.h index a66aadd..641799e 100644 --- a/src/main.h +++ b/src/main.h @@ -59,6 +59,8 @@ class gpgex_server /* The root of our installation. */ static const char *root_dir; + static const char *ui_server; + /* Acquire a reference to the server component. */ static inline ULONG add_ref (void) commit 296829d61514a25452cc113c41cdf7153ec4d90c Author: Werner Koch Date: Wed Jun 26 15:19:28 2013 +0200 Improve help file loading. * gpgex.cc (get_lang_name): Rewrite using gettext. (start_help): Improve language detection. Remove fallback to an external URL. * main.h (gpgex_server): Add root_dir. (utf8_to_wchar): Add prototype. * main.cc (gpgex_server::root_dir): New. (get_locale_dir): Pass then instance to GetModuleFileNameW. Store the root dir. (utf8_to_wchar): New. (DllMain): Run i18n_init after debug_init. -- The help file is now only loaded for on-disk files and never anymore from a web site. The location of the help file is determined using the installation directory of gpgex.dll. When looking for the help file, the language with variant (e.g. "de_DE") is tried first, if that does not exist a file with just the language tag (e.g. "de") is tried; if that also also fails "en" is used as language tag. diff --git a/NEWS b/NEWS index 4c198c1..36eae32 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ Noteworthy changes for version 1.0.0 (unreleased) * Support 64 bit Windows. +* Improved help file detection. + Noteworthy changes for version 0.9.7 (2010-07-21) ------------------------------------------------- diff --git a/src/ChangeLog b/src/ChangeLog index cded8db..86bc3ad 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,16 @@ +2013-06-26 Werner Koch + + * gpgex.cc (get_lang_name): Rewrite using gettext. + (start_help): Improve language detection. Remove fallback to an + external URL. + * main.h (gpgex_server): Add root_dir. + (utf8_to_wchar): Add prototype. + * main.cc (gpgex_server::root_dir): New. + (get_locale_dir): Pass then instance to GetModuleFileNameW. Store + the root dir. + (utf8_to_wchar): New. + (DllMain): Run i18n_init after debug_init. + 2010-07-21 Werner Koch * main.cc (DllMain): Add explicit init and deinit of libgpg-error. @@ -207,7 +220,7 @@ (gpgex_SOURCES): Add $(ICONS). * Makefile.am (gpgex_LDADD): More -lws2_32 after ./libassuan.a. - + 2007-09-04 Marcus Brinkmann @@ -280,7 +293,7 @@ New macros. (_gpgex_debug): New prototype. * main.cc: Include , and . Add - debugging traces. + debugging traces. (debug_lock, debug_flags, debug_file): New statics. (get_debug_file, debug_init, debug_deinit): New static functions. (_gpgex_debug): New function. diff --git a/src/gpgex.cc b/src/gpgex.cc index 45f63bc..2b8a160 100644 --- a/src/gpgex.cc +++ b/src/gpgex.cc @@ -1,5 +1,5 @@ /* gpgex.cc - gpgex implementation - Copyright (C) 2007 g10 Code GmbH + Copyright (C) 2007, 2013 g10 Code GmbH This file is part of GpgEX. @@ -476,23 +476,45 @@ gpgex_t::GetCommandString (UINT_PTR idCommand, UINT uFlags, LPUINT lpReserved, } +/* Return the lang name. This is either "xx" or "xx_YY". On error + "en" is returned. */ static const char * get_lang_name (void) { - LANGID lang; + static char *name; + const char *s; + char *p; + int count = 0; - lang = GetUserDefaultUILanguage (); - switch (PRIMARYLANGID (lang)) + if (!name) { - case LANG_GERMAN: - return "de"; - - case LANG_ENGLISH: - default: - return "en"; + s = gettext_localename (); + if (!s) + s = "en"; + else if (!strcmp (s, "C") || !strcmp (s, "POSIX")) + s = "en"; + + name = strdup (s); + if (!name) + return "en"; + + for (p = name; *p; p++) + { + + if (*p == '.' || *p == '@' || *p == '/' /*(safeguard)*/) + *p = 0; + else if (*p == '_') + { + if (count++) + *p = 0; /* Also cut at a underscore in the territory. */ + } + } } + + return name; } + /* FIXME: Might be exported in a helper utility. Also, it might be that we use KDE's help browser? */ static void @@ -524,37 +546,55 @@ start_help (HWND hwnd) // width, height web->put_Visible (VARIANT_TRUE); -#define URLSIZE 512 - wchar_t url[URLSIZE]; + wchar_t *wurl; { - char *dir = NULL; +#define URLSIZE 512 + char url[URLSIZE]; + const char *lang = get_lang_name (); + + snprintf (url, URLSIZE, "file:///%s\\share\\doc\\gpgex\\gpgex-%s.html", + gpgex_server::root_dir, lang); + url[URLSIZE - 1] = '\0'; + wurl = utf8_to_wchar (url); - dir = read_w32_registry_string ("HKEY_LOCAL_MACHINE", REGKEY, - "Install Directory"); - if (!dir) - _snwprintf (url, URLSIZE, L"%S", "http://www.gpg4win.org/"); - else + /* We need to test whether we need to fall back to the generic + lang id. */ + if (wurl && strchr (lang, '_') && _waccess (wurl+8, 0)) { - int sep = 0; - int len = strlen (dir) - 1; - if (len >= 0 && (dir[len] == '\\' || dir[len] == '/')) - sep = 1; - _snwprintf (url, - URLSIZE, L"file:///%S%Sshare\\doc\\gpgex\\gpgex-%S.html", - dir, sep ? "" : "\\", get_lang_name ()); + snprintf (url, URLSIZE, + "file:///%s\\share\\doc\\gpgex\\gpgex-%.2s.html", + gpgex_server::root_dir, lang); + url[URLSIZE - 1] = '\0'; + free (wurl); + wurl = utf8_to_wchar (url); + } + + /* If the help file does not exists fall back to the english version. */ + if (wurl && _waccess (wurl+8, 0)) + { + snprintf (url, URLSIZE, + "file:///%s\\share\\doc\\gpgex\\gpgex-en.html", + gpgex_server::root_dir); + url[URLSIZE - 1] = '\0'; + free (wurl); + wurl = utf8_to_wchar (url); } - url[URLSIZE - 1] = '\0'; } - BSTR burl = SysAllocString ((const OLECHAR *) url); - VARIANT vars[4]; - memset (vars, 0, sizeof (vars)); - res = web->Navigate (burl, vars, vars + 1, vars + 2, vars + 3); - SysFreeString (burl); - if (!SUCCEEDED (res)) + + if (wurl) { - web->Release (); - return; + BSTR burl = SysAllocString ((const OLECHAR *)wurl); + VARIANT vars[4]; + memset (vars, 0, sizeof (vars)); + res = web->Navigate (burl, vars, vars + 1, vars + 2, vars + 3); + SysFreeString (burl); + free (wurl); + if (!SUCCEEDED (res)) + { + web->Release (); + return; + } } /* Do more stuff. */ diff --git a/src/main.cc b/src/main.cc index 01ef6b7..0b354e1 100644 --- a/src/main.cc +++ b/src/main.cc @@ -45,6 +45,9 @@ HINSTANCE gpgex_server::instance; /* The number of references to this component. */ LONG gpgex_server::refcount; +/* The root of our installation. */ +const char *gpgex_server::root_dir; + static char * get_locale_dir (void) @@ -53,7 +56,7 @@ get_locale_dir (void) char *result, *p; int nbytes; - if (!GetModuleFileNameW (NULL, moddir, MAX_PATH)) + if (!GetModuleFileNameW (gpgex_server::instance, moddir, MAX_PATH)) *moddir = 0; #define SLDIR "\\share\\locale" @@ -98,6 +101,9 @@ get_locale_dir (void) p = strrchr (result, '\\'); if (p && !strcmp (p+1, "bin")) *p = 0; + + gpgex_server::root_dir = strdup (result); + /* Append the static part. */ strcat (result, SLDIR); } @@ -112,6 +118,11 @@ get_locale_dir (void) strcat (result, SLDIR); } } + + if (!gpgex_server::root_dir) + gpgex_server::root_dir = "c:"; + + _gpgex_debug (1, "root dir is '%s'", gpgex_server::root_dir); #undef SLDIR return result; } @@ -193,6 +204,10 @@ debug_deinit (void) } + + + + #ifdef __cplusplus extern "C" { #if 0 @@ -225,6 +240,36 @@ _gpgex_debug (unsigned int flags, const char *format, ...) errno = saved_errno; } + +/* Return a malloced wide char string from an UTF-8 encoded input + string STRING. Caller must free this value. On failure returns + NULL; caller may use GetLastError to get the actual error number. + The result of calling this function with STRING set to NULL is not + defined. */ +wchar_t * +utf8_to_wchar (const char *string) +{ + int n; + wchar_t *result; + + n = MultiByteToWideChar (CP_UTF8, 0, string, -1, NULL, 0); + if (n < 0) + return NULL; + + result = (wchar_t*)malloc ((n+1) * sizeof *result); + if (!result) + return NULL; + + n = MultiByteToWideChar (CP_UTF8, 0, string, -1, result, n); + if (n < 0) + { + free (result); + return NULL; + } + return result; +} + + #ifdef __cplusplus #if 0 { @@ -244,10 +289,10 @@ DllMain (HINSTANCE hinst, DWORD reason, LPVOID reserved) /* Early initializations of our subsystems. */ gpg_err_init (); - i18n_init (); - debug_init (); + i18n_init (); + if (debug_flags & DEBUG_ASSUAN) { assuan_set_assuan_log_stream (debug_file); diff --git a/src/main.h b/src/main.h index 622eb59..a66aadd 100644 --- a/src/main.h +++ b/src/main.h @@ -56,6 +56,9 @@ class gpgex_server /* The number of references to this component. */ static LONG refcount; + /* The root of our installation. */ + static const char *root_dir; + /* Acquire a reference to the server component. */ static inline ULONG add_ref (void) @@ -64,12 +67,14 @@ class gpgex_server } -/* Release a reference to the server component. */ + /* Release a reference to the server component. */ static inline ULONG release (void) { return InterlockedDecrement (&refcount); } + + }; @@ -79,3 +84,6 @@ class gpgex_server (x).Data4[5], (x).Data4[6], (x).Data4[7] #endif + + +extern "C" wchar_t *utf8_to_wchar (const char *string); commit 29e493fc945d240f8a0cfe28ff7f80e57cf8e5ee Author: Werner Koch Date: Mon Jun 24 19:16:36 2013 +0200 Use modern gettext implementation from libgpg-error. * src/w32-gettext.c, src/w32-gettext.h: Remove * src/Makefile.am (gpgex_SOURCES): Remove above files. * configure.ac (AH_BOTTOM): Define GPG_ERR_ENABLE_GETTEXT_MACROS. * src/main.h: Include gpg-error.h. (gettext_noop): Move from w32-gettext.h. * src/main.cc (get_locale_dir): Replace by code taken from libgpg-error. (i18n_init): Remove setlocale calls. diff --git a/configure.ac b/configure.ac index c2f37a3..bf727aa 100644 --- a/configure.ac +++ b/configure.ac @@ -219,6 +219,9 @@ AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION", AH_BOTTOM([ /* We don't want the old assuan codes anymore. */ #define _ASSUAN_ONLY_GPG_ERRORS 1 +/* We use the gettext code from libgpg-error. */ +#define GPG_ERR_ENABLE_GETTEXT_MACROS + ]) diff --git a/src/Makefile.am b/src/Makefile.am index f02d084..d7dfe7a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -27,7 +27,6 @@ gpgex_SOURCES = \ gpgex.def \ registry.h registry.c \ exechelp.h exechelp.c \ - w32-gettext.c w32-gettext.h \ gpgex-class.h gpgex-class.cc \ gpgex-factory.h gpgex-factory.cc \ bitmaps.h bitmaps.cc \ diff --git a/src/main.cc b/src/main.cc index d4fa460..01ef6b7 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,5 +1,5 @@ /* main.cc - DLL entry point - Copyright (C) 2007 g10 Code GmbH + Copyright (C) 2007, 2010, 2013 g10 Code GmbH This file is part of GpgEX. @@ -13,9 +13,9 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU Lesser General Public License - along with GpgEX; if not, write to the Free Software Foundation, - Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + You should have received a copy of the GNU Lesser General Public + License along with this program; if not, see . + */ #if HAVE_CONFIG_H #include @@ -49,31 +49,71 @@ LONG gpgex_server::refcount; static char * get_locale_dir (void) { - char *instdir; - char *p; - char *dname; + static wchar_t moddir[MAX_PATH+5]; + char *result, *p; + int nbytes; - instdir = read_w32_registry_string ("HKEY_LOCAL_MACHINE", REGKEY, - "Install Directory"); - if (!instdir) - return NULL; + if (!GetModuleFileNameW (NULL, moddir, MAX_PATH)) + *moddir = 0; - /* Build the key: "/share/locale". */ #define SLDIR "\\share\\locale" - dname = static_cast (malloc (strlen (instdir) + strlen (SLDIR) + 1)); - if (!dname) + if (*moddir) { - free (instdir); - return NULL; + nbytes = WideCharToMultiByte (CP_UTF8, 0, moddir, -1, NULL, 0, NULL, NULL); + if (nbytes < 0) + return NULL; + + result = (char*)malloc (nbytes + strlen (SLDIR) + 1); + if (result) + { + nbytes = WideCharToMultiByte (CP_UTF8, 0, moddir, -1, + result, nbytes, NULL, NULL); + if (nbytes < 0) + { + free (result); + result = NULL; + } + else + { + p = strrchr (result, '\\'); + if (p) + *p = 0; + /* If we are installed below "bin" strip that part and + use the top directory instead. + + Background: Under Windows we don't install GnuPG + below bin/ but in the top directory with only share/, + lib/, and etc/ below it. One of the reasons is to + keep the the length of the filenames at bay so not to + increase the limited length of the PATH envvar. + Another and more important reason, however, is that + the very first GPG versions on W32 were installed + into a flat directory structure and for best + compatibility with these versions we didn't changed + that later. For WindowsCE we can right away install + it under bin, though. The hack with detection of the + bin directory part allows us to eventually migrate to + such a directory layout under plain Windows without + the need to change libgpg-error. */ + p = strrchr (result, '\\'); + if (p && !strcmp (p+1, "bin")) + *p = 0; + /* Append the static part. */ + strcat (result, SLDIR); + } + } } - p = dname; - strcpy (p, instdir); - p += strlen (instdir); - strcpy (p, SLDIR); - - free (instdir); - - return dname; + else /* Use the old default value. */ + { + result = (char*)malloc (10 + strlen (SLDIR) + 1); + if (result) + { + strcpy (result, "c:\\gnupg"); + strcat (result, SLDIR); + } + } +#undef SLDIR + return result; } @@ -89,15 +129,6 @@ i18n_init (void) { char *locale_dir; -#ifdef ENABLE_NLS -# ifdef HAVE_LC_MESSAGES - setlocale (LC_TIME, ""); - setlocale (LC_MESSAGES, ""); -# else - setlocale (LC_ALL, "" ); -# endif -#endif - locale_dir = get_locale_dir (); if (locale_dir) { diff --git a/src/main.h b/src/main.h index fe1b03b..622eb59 100644 --- a/src/main.h +++ b/src/main.h @@ -22,15 +22,24 @@ #define MAIN_H 1 #include - #include "debug.h" -#include "w32-gettext.h" +#include /* For gettext */ #define _(a) gettext (a) #define N_(a) gettext_noop (a) +/* A pseudo function call that serves as a marker for the automated + extraction of messages, but does not call gettext(). The run-time + translation is done at a different place in the code. + The argument, String, should be a literal string. Concatenated strings + and other string expressions won't work. + The macro's expansion is not parenthesized, so that it is suitable as + initializer for static 'char[]' or 'const char[]' variables. */ +#define gettext_noop(String) String + + /* We use a class just for namespace cleanliness. */ class gpgex_server diff --git a/src/w32-gettext.c b/src/w32-gettext.c deleted file mode 100644 index 952d2df..0000000 --- a/src/w32-gettext.c +++ /dev/null @@ -1,1796 +0,0 @@ -/* w32-gettext.c - A simple gettext implementation for Windows targets. - Copyright (C) 1995,1996,1997,1999,2005 Free Software Foundation, Inc. - Copyright (C) 2005 g10 Code GmbH - - This file is part of libgpg-error. - - libgpg-error is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - as published by the Free Software Foundation; either version 2.1 of - the License, or (at your option) any later version. - - libgpg-error is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with libgpg-error; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ - -#if HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "w32-gettext.h" - - -/* localname.c from gettext. */ - -/* Edit: Added a "static" to _nl_locale_name. Note that the category - argument is ignored on w32. */ - -/* Determine the current selected locale. - Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU Library General Public License as published - by the Free Software Foundation; either version 2, or (at your option) - any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, - USA. */ - -/* Written by Ulrich Drepper , 1995. */ -/* Win32 code written by Tor Lillqvist . */ - -#ifdef HAVE_CONFIG_H -# include -#endif - -#include -#include - -#ifdef HAVE_W32_SYSTEM -# include -/* List of language codes, sorted by value: - 0x01 LANG_ARABIC - 0x02 LANG_BULGARIAN - 0x03 LANG_CATALAN - 0x04 LANG_CHINESE - 0x05 LANG_CZECH - 0x06 LANG_DANISH - 0x07 LANG_GERMAN - 0x08 LANG_GREEK - 0x09 LANG_ENGLISH - 0x0a LANG_SPANISH - 0x0b LANG_FINNISH - 0x0c LANG_FRENCH - 0x0d LANG_HEBREW - 0x0e LANG_HUNGARIAN - 0x0f LANG_ICELANDIC - 0x10 LANG_ITALIAN - 0x11 LANG_JAPANESE - 0x12 LANG_KOREAN - 0x13 LANG_DUTCH - 0x14 LANG_NORWEGIAN - 0x15 LANG_POLISH - 0x16 LANG_PORTUGUESE - 0x17 LANG_RHAETO_ROMANCE - 0x18 LANG_ROMANIAN - 0x19 LANG_RUSSIAN - 0x1a LANG_CROATIAN == LANG_SERBIAN - 0x1b LANG_SLOVAK - 0x1c LANG_ALBANIAN - 0x1d LANG_SWEDISH - 0x1e LANG_THAI - 0x1f LANG_TURKISH - 0x20 LANG_URDU - 0x21 LANG_INDONESIAN - 0x22 LANG_UKRAINIAN - 0x23 LANG_BELARUSIAN - 0x24 LANG_SLOVENIAN - 0x25 LANG_ESTONIAN - 0x26 LANG_LATVIAN - 0x27 LANG_LITHUANIAN - 0x28 LANG_TAJIK - 0x29 LANG_FARSI - 0x2a LANG_VIETNAMESE - 0x2b LANG_ARMENIAN - 0x2c LANG_AZERI - 0x2d LANG_BASQUE - 0x2e LANG_SORBIAN - 0x2f LANG_MACEDONIAN - 0x30 LANG_SUTU - 0x31 LANG_TSONGA - 0x32 LANG_TSWANA - 0x33 LANG_VENDA - 0x34 LANG_XHOSA - 0x35 LANG_ZULU - 0x36 LANG_AFRIKAANS - 0x37 LANG_GEORGIAN - 0x38 LANG_FAEROESE - 0x39 LANG_HINDI - 0x3a LANG_MALTESE - 0x3b LANG_SAAMI - 0x3c LANG_GAELIC - 0x3d LANG_YIDDISH - 0x3e LANG_MALAY - 0x3f LANG_KAZAK - 0x40 LANG_KYRGYZ - 0x41 LANG_SWAHILI - 0x42 LANG_TURKMEN - 0x43 LANG_UZBEK - 0x44 LANG_TATAR - 0x45 LANG_BENGALI - 0x46 LANG_PUNJABI - 0x47 LANG_GUJARATI - 0x48 LANG_ORIYA - 0x49 LANG_TAMIL - 0x4a LANG_TELUGU - 0x4b LANG_KANNADA - 0x4c LANG_MALAYALAM - 0x4d LANG_ASSAMESE - 0x4e LANG_MARATHI - 0x4f LANG_SANSKRIT - 0x50 LANG_MONGOLIAN - 0x51 LANG_TIBETAN - 0x52 LANG_WELSH - 0x53 LANG_CAMBODIAN - 0x54 LANG_LAO - 0x55 LANG_BURMESE - 0x56 LANG_GALICIAN - 0x57 LANG_KONKANI - 0x58 LANG_MANIPURI - 0x59 LANG_SINDHI - 0x5a LANG_SYRIAC - 0x5b LANG_SINHALESE - 0x5c LANG_CHEROKEE - 0x5d LANG_INUKTITUT - 0x5e LANG_AMHARIC - 0x5f LANG_TAMAZIGHT - 0x60 LANG_KASHMIRI - 0x61 LANG_NEPALI - 0x62 LANG_FRISIAN - 0x63 LANG_PASHTO - 0x64 LANG_TAGALOG - 0x65 LANG_DIVEHI - 0x66 LANG_EDO - 0x67 LANG_FULFULDE - 0x68 LANG_HAUSA - 0x69 LANG_IBIBIO - 0x6a LANG_YORUBA - 0x70 LANG_IGBO - 0x71 LANG_KANURI - 0x72 LANG_OROMO - 0x73 LANG_TIGRINYA - 0x74 LANG_GUARANI - 0x75 LANG_HAWAIIAN - 0x76 LANG_LATIN - 0x77 LANG_SOMALI - 0x78 LANG_YI - 0x79 LANG_PAPIAMENTU -*/ -/* Mingw headers don't have latest language and sublanguage codes. */ -# ifndef LANG_AFRIKAANS -# define LANG_AFRIKAANS 0x36 -# endif -# ifndef LANG_ALBANIAN -# define LANG_ALBANIAN 0x1c -# endif -# ifndef LANG_AMHARIC -# define LANG_AMHARIC 0x5e -# endif -# ifndef LANG_ARABIC -# define LANG_ARABIC 0x01 -# endif -# ifndef LANG_ARMENIAN -# define LANG_ARMENIAN 0x2b -# endif -# ifndef LANG_ASSAMESE -# define LANG_ASSAMESE 0x4d -# endif -# ifndef LANG_AZERI -# define LANG_AZERI 0x2c -# endif -# ifndef LANG_BASQUE -# define LANG_BASQUE 0x2d -# endif -# ifndef LANG_BELARUSIAN -# define LANG_BELARUSIAN 0x23 -# endif -# ifndef LANG_BENGALI -# define LANG_BENGALI 0x45 -# endif -# ifndef LANG_BURMESE -# define LANG_BURMESE 0x55 -# endif -# ifndef LANG_CAMBODIAN -# define LANG_CAMBODIAN 0x53 -# endif -# ifndef LANG_CATALAN -# define LANG_CATALAN 0x03 -# endif -# ifndef LANG_CHEROKEE -# define LANG_CHEROKEE 0x5c -# endif -# ifndef LANG_DIVEHI -# define LANG_DIVEHI 0x65 -# endif -# ifndef LANG_EDO -# define LANG_EDO 0x66 -# endif -# ifndef LANG_ESTONIAN -# define LANG_ESTONIAN 0x25 -# endif -# ifndef LANG_FAEROESE -# define LANG_FAEROESE 0x38 -# endif -# ifndef LANG_FARSI -# define LANG_FARSI 0x29 -# endif -# ifndef LANG_FRISIAN -# define LANG_FRISIAN 0x62 -# endif -# ifndef LANG_FULFULDE -# define LANG_FULFULDE 0x67 -# endif -# ifndef LANG_GAELIC -# define LANG_GAELIC 0x3c -# endif -# ifndef LANG_GALICIAN -# define LANG_GALICIAN 0x56 -# endif -# ifndef LANG_GEORGIAN -# define LANG_GEORGIAN 0x37 -# endif -# ifndef LANG_GUARANI -# define LANG_GUARANI 0x74 -# endif -# ifndef LANG_GUJARATI -# define LANG_GUJARATI 0x47 -# endif -# ifndef LANG_HAUSA -# define LANG_HAUSA 0x68 -# endif -# ifndef LANG_HAWAIIAN -# define LANG_HAWAIIAN 0x75 -# endif -# ifndef LANG_HEBREW -# define LANG_HEBREW 0x0d -# endif -# ifndef LANG_HINDI -# define LANG_HINDI 0x39 -# endif -# ifndef LANG_IBIBIO -# define LANG_IBIBIO 0x69 -# endif -# ifndef LANG_IGBO -# define LANG_IGBO 0x70 -# endif -# ifndef LANG_INDONESIAN -# define LANG_INDONESIAN 0x21 -# endif -# ifndef LANG_INUKTITUT -# define LANG_INUKTITUT 0x5d -# endif -# ifndef LANG_KANNADA -# define LANG_KANNADA 0x4b -# endif -# ifndef LANG_KANURI -# define LANG_KANURI 0x71 -# endif -# ifndef LANG_KASHMIRI -# define LANG_KASHMIRI 0x60 -# endif -# ifndef LANG_KAZAK -# define LANG_KAZAK 0x3f -# endif -# ifndef LANG_KONKANI -# define LANG_KONKANI 0x57 -# endif -# ifndef LANG_KYRGYZ -# define LANG_KYRGYZ 0x40 -# endif -# ifndef LANG_LAO -# define LANG_LAO 0x54 -# endif -# ifndef LANG_LATIN -# define LANG_LATIN 0x76 -# endif -# ifndef LANG_LATVIAN -# define LANG_LATVIAN 0x26 -# endif -# ifndef LANG_LITHUANIAN -# define LANG_LITHUANIAN 0x27 -# endif -# ifndef LANG_MACEDONIAN -# define LANG_MACEDONIAN 0x2f -# endif -# ifndef LANG_MALAY -# define LANG_MALAY 0x3e -# endif -# ifndef LANG_MALAYALAM -# define LANG_MALAYALAM 0x4c -# endif -# ifndef LANG_MALTESE -# define LANG_MALTESE 0x3a -# endif -# ifndef LANG_MANIPURI -# define LANG_MANIPURI 0x58 -# endif -# ifndef LANG_MARATHI -# define LANG_MARATHI 0x4e -# endif -# ifndef LANG_MONGOLIAN -# define LANG_MONGOLIAN 0x50 -# endif -# ifndef LANG_NEPALI -# define LANG_NEPALI 0x61 -# endif -# ifndef LANG_ORIYA -# define LANG_ORIYA 0x48 -# endif -# ifndef LANG_OROMO -# define LANG_OROMO 0x72 -# endif -# ifndef LANG_PAPIAMENTU -# define LANG_PAPIAMENTU 0x79 -# endif -# ifndef LANG_PASHTO -# define LANG_PASHTO 0x63 -# endif -# ifndef LANG_PUNJABI -# define LANG_PUNJABI 0x46 -# endif -# ifndef LANG_RHAETO_ROMANCE -# define LANG_RHAETO_ROMANCE 0x17 -# endif -# ifndef LANG_SAAMI -# define LANG_SAAMI 0x3b -# endif -# ifndef LANG_SANSKRIT -# define LANG_SANSKRIT 0x4f -# endif -# ifndef LANG_SERBIAN -# define LANG_SERBIAN 0x1a -# endif -# ifndef LANG_SINDHI -# define LANG_SINDHI 0x59 -# endif -# ifndef LANG_SINHALESE -# define LANG_SINHALESE 0x5b -# endif -# ifndef LANG_SLOVAK -# define LANG_SLOVAK 0x1b -# endif -# ifndef LANG_SOMALI -# define LANG_SOMALI 0x77 -# endif -# ifndef LANG_SORBIAN -# define LANG_SORBIAN 0x2e -# endif -# ifndef LANG_SUTU -# define LANG_SUTU 0x30 -# endif -# ifndef LANG_SWAHILI -# define LANG_SWAHILI 0x41 -# endif -# ifndef LANG_SYRIAC -# define LANG_SYRIAC 0x5a -# endif -# ifndef LANG_TAGALOG -# define LANG_TAGALOG 0x64 -# endif -# ifndef LANG_TAJIK -# define LANG_TAJIK 0x28 -# endif -# ifndef LANG_TAMAZIGHT -# define LANG_TAMAZIGHT 0x5f -# endif -# ifndef LANG_TAMIL -# define LANG_TAMIL 0x49 -# endif -# ifndef LANG_TATAR -# define LANG_TATAR 0x44 -# endif -# ifndef LANG_TELUGU -# define LANG_TELUGU 0x4a -# endif -# ifndef LANG_THAI -# define LANG_THAI 0x1e -# endif -# ifndef LANG_TIBETAN -# define LANG_TIBETAN 0x51 -# endif -# ifndef LANG_TIGRINYA -# define LANG_TIGRINYA 0x73 -# endif -# ifndef LANG_TSONGA -# define LANG_TSONGA 0x31 -# endif -# ifndef LANG_TSWANA -# define LANG_TSWANA 0x32 -# endif -# ifndef LANG_TURKMEN -# define LANG_TURKMEN 0x42 -# endif -# ifndef LANG_UKRAINIAN -# define LANG_UKRAINIAN 0x22 -# endif -# ifndef LANG_URDU -# define LANG_URDU 0x20 -# endif -# ifndef LANG_UZBEK -# define LANG_UZBEK 0x43 -# endif -# ifndef LANG_VENDA -# define LANG_VENDA 0x33 -# endif -# ifndef LANG_VIETNAMESE -# define LANG_VIETNAMESE 0x2a -# endif -# ifndef LANG_WELSH -# define LANG_WELSH 0x52 -# endif -# ifndef LANG_XHOSA -# define LANG_XHOSA 0x34 -# endif -# ifndef LANG_YI -# define LANG_YI 0x78 -# endif -# ifndef LANG_YIDDISH -# define LANG_YIDDISH 0x3d -# endif -# ifndef LANG_YORUBA -# define LANG_YORUBA 0x6a -# endif -# ifndef LANG_ZULU -# define LANG_ZULU 0x35 -# endif -# ifndef SUBLANG_ARABIC_SAUDI_ARABIA -# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01 -# endif -# ifndef SUBLANG_ARABIC_IRAQ -# define SUBLANG_ARABIC_IRAQ 0x02 -# endif -# ifndef SUBLANG_ARABIC_EGYPT -# define SUBLANG_ARABIC_EGYPT 0x03 -# endif -# ifndef SUBLANG_ARABIC_LIBYA -# define SUBLANG_ARABIC_LIBYA 0x04 -# endif -# ifndef SUBLANG_ARABIC_ALGERIA -# define SUBLANG_ARABIC_ALGERIA 0x05 -# endif -# ifndef SUBLANG_ARABIC_MOROCCO -# define SUBLANG_ARABIC_MOROCCO 0x06 -# endif -# ifndef SUBLANG_ARABIC_TUNISIA -# define SUBLANG_ARABIC_TUNISIA 0x07 -# endif -# ifndef SUBLANG_ARABIC_OMAN -# define SUBLANG_ARABIC_OMAN 0x08 -# endif -# ifndef SUBLANG_ARABIC_YEMEN -# define SUBLANG_ARABIC_YEMEN 0x09 -# endif -# ifndef SUBLANG_ARABIC_SYRIA -# define SUBLANG_ARABIC_SYRIA 0x0a -# endif -# ifndef SUBLANG_ARABIC_JORDAN -# define SUBLANG_ARABIC_JORDAN 0x0b -# endif -# ifndef SUBLANG_ARABIC_LEBANON -# define SUBLANG_ARABIC_LEBANON 0x0c -# endif -# ifndef SUBLANG_ARABIC_KUWAIT -# define SUBLANG_ARABIC_KUWAIT 0x0d -# endif -# ifndef SUBLANG_ARABIC_UAE -# define SUBLANG_ARABIC_UAE 0x0e -# endif -# ifndef SUBLANG_ARABIC_BAHRAIN -# define SUBLANG_ARABIC_BAHRAIN 0x0f -# endif -# ifndef SUBLANG_ARABIC_QATAR -# define SUBLANG_ARABIC_QATAR 0x10 -# endif -# ifndef SUBLANG_AZERI_LATIN -# define SUBLANG_AZERI_LATIN 0x01 -# endif -# ifndef SUBLANG_AZERI_CYRILLIC -# define SUBLANG_AZERI_CYRILLIC 0x02 -# endif -# ifndef SUBLANG_BENGALI_INDIA -# define SUBLANG_BENGALI_INDIA 0x01 -# endif -# ifndef SUBLANG_BENGALI_BANGLADESH -# define SUBLANG_BENGALI_BANGLADESH 0x02 -# endif -# ifndef SUBLANG_CHINESE_MACAU -# define SUBLANG_CHINESE_MACAU 0x05 -# endif -# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA -# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07 -# endif -# ifndef SUBLANG_ENGLISH_JAMAICA -# define SUBLANG_ENGLISH_JAMAICA 0x08 -# endif -# ifndef SUBLANG_ENGLISH_CARIBBEAN -# define SUBLANG_ENGLISH_CARIBBEAN 0x09 -# endif -# ifndef SUBLANG_ENGLISH_BELIZE -# define SUBLANG_ENGLISH_BELIZE 0x0a -# endif -# ifndef SUBLANG_ENGLISH_TRINIDAD -# define SUBLANG_ENGLISH_TRINIDAD 0x0b -# endif -# ifndef SUBLANG_ENGLISH_ZIMBABWE -# define SUBLANG_ENGLISH_ZIMBABWE 0x0c -# endif -# ifndef SUBLANG_ENGLISH_PHILIPPINES -# define SUBLANG_ENGLISH_PHILIPPINES 0x0d -# endif -# ifndef SUBLANG_ENGLISH_INDONESIA -# define SUBLANG_ENGLISH_INDONESIA 0x0e -# endif -# ifndef SUBLANG_ENGLISH_HONGKONG -# define SUBLANG_ENGLISH_HONGKONG 0x0f -# endif -# ifndef SUBLANG_ENGLISH_INDIA -# define SUBLANG_ENGLISH_INDIA 0x10 -# endif -# ifndef SUBLANG_ENGLISH_MALAYSIA -# define SUBLANG_ENGLISH_MALAYSIA 0x11 -# endif -# ifndef SUBLANG_ENGLISH_SINGAPORE -# define SUBLANG_ENGLISH_SINGAPORE 0x12 -# endif -# ifndef SUBLANG_FRENCH_LUXEMBOURG -# define SUBLANG_FRENCH_LUXEMBOURG 0x05 -# endif -# ifndef SUBLANG_FRENCH_MONACO -# define SUBLANG_FRENCH_MONACO 0x06 -# endif -# ifndef SUBLANG_FRENCH_WESTINDIES -# define SUBLANG_FRENCH_WESTINDIES 0x07 -# endif -# ifndef SUBLANG_FRENCH_REUNION -# define SUBLANG_FRENCH_REUNION 0x08 -# endif -# ifndef SUBLANG_FRENCH_CONGO -# define SUBLANG_FRENCH_CONGO 0x09 -# endif -# ifndef SUBLANG_FRENCH_SENEGAL -# define SUBLANG_FRENCH_SENEGAL 0x0a -# endif -# ifndef SUBLANG_FRENCH_CAMEROON -# define SUBLANG_FRENCH_CAMEROON 0x0b -# endif -# ifndef SUBLANG_FRENCH_COTEDIVOIRE -# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c -# endif -# ifndef SUBLANG_FRENCH_MALI -# define SUBLANG_FRENCH_MALI 0x0d -# endif -# ifndef SUBLANG_FRENCH_MOROCCO -# define SUBLANG_FRENCH_MOROCCO 0x0e -# endif -# ifndef SUBLANG_FRENCH_HAITI -# define SUBLANG_FRENCH_HAITI 0x0f -# endif -# ifndef SUBLANG_GERMAN_LUXEMBOURG -# define SUBLANG_GERMAN_LUXEMBOURG 0x04 -# endif -# ifndef SUBLANG_GERMAN_LIECHTENSTEIN -# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05 -# endif -# ifndef SUBLANG_KASHMIRI_INDIA -# define SUBLANG_KASHMIRI_INDIA 0x02 -# endif -# ifndef SUBLANG_MALAY_MALAYSIA -# define SUBLANG_MALAY_MALAYSIA 0x01 -# endif -# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM -# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02 -# endif -# ifndef SUBLANG_NEPALI_INDIA -# define SUBLANG_NEPALI_INDIA 0x02 -# endif -# ifndef SUBLANG_PUNJABI_INDIA -# define SUBLANG_PUNJABI_INDIA 0x01 -# endif -# ifndef SUBLANG_ROMANIAN_ROMANIA -# define SUBLANG_ROMANIAN_ROMANIA 0x01 -# endif -# ifndef SUBLANG_SERBIAN_LATIN -# define SUBLANG_SERBIAN_LATIN 0x02 -# endif -# ifndef SUBLANG_SERBIAN_CYRILLIC -# define SUBLANG_SERBIAN_CYRILLIC 0x03 -# endif -# ifndef SUBLANG_SINDHI_INDIA -# define SUBLANG_SINDHI_INDIA 0x00 -# endif -# ifndef SUBLANG_SINDHI_PAKISTAN -# define SUBLANG_SINDHI_PAKISTAN 0x01 -# endif -# ifndef SUBLANG_SPANISH_GUATEMALA -# define SUBLANG_SPANISH_GUATEMALA 0x04 -# endif -# ifndef SUBLANG_SPANISH_COSTA_RICA -# define SUBLANG_SPANISH_COSTA_RICA 0x05 -# endif -# ifndef SUBLANG_SPANISH_PANAMA -# define SUBLANG_SPANISH_PANAMA 0x06 -# endif -# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC -# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07 -# endif -# ifndef SUBLANG_SPANISH_VENEZUELA -# define SUBLANG_SPANISH_VENEZUELA 0x08 -# endif -# ifndef SUBLANG_SPANISH_COLOMBIA -# define SUBLANG_SPANISH_COLOMBIA 0x09 -# endif -# ifndef SUBLANG_SPANISH_PERU -# define SUBLANG_SPANISH_PERU 0x0a -# endif -# ifndef SUBLANG_SPANISH_ARGENTINA -# define SUBLANG_SPANISH_ARGENTINA 0x0b -# endif -# ifndef SUBLANG_SPANISH_ECUADOR -# define SUBLANG_SPANISH_ECUADOR 0x0c -# endif -# ifndef SUBLANG_SPANISH_CHILE -# define SUBLANG_SPANISH_CHILE 0x0d -# endif -# ifndef SUBLANG_SPANISH_URUGUAY -# define SUBLANG_SPANISH_URUGUAY 0x0e -# endif -# ifndef SUBLANG_SPANISH_PARAGUAY -# define SUBLANG_SPANISH_PARAGUAY 0x0f -# endif -# ifndef SUBLANG_SPANISH_BOLIVIA -# define SUBLANG_SPANISH_BOLIVIA 0x10 -# endif -# ifndef SUBLANG_SPANISH_EL_SALVADOR -# define SUBLANG_SPANISH_EL_SALVADOR 0x11 -# endif -# ifndef SUBLANG_SPANISH_HONDURAS -# define SUBLANG_SPANISH_HONDURAS 0x12 -# endif -# ifndef SUBLANG_SPANISH_NICARAGUA -# define SUBLANG_SPANISH_NICARAGUA 0x13 -# endif -# ifndef SUBLANG_SPANISH_PUERTO_RICO -# define SUBLANG_SPANISH_PUERTO_RICO 0x14 -# endif -# ifndef SUBLANG_SWEDISH_FINLAND -# define SUBLANG_SWEDISH_FINLAND 0x02 -# endif -# ifndef SUBLANG_TAMAZIGHT_ARABIC -# define SUBLANG_TAMAZIGHT_ARABIC 0x01 -# endif -# ifndef SUBLANG_TAMAZIGHT_LATIN -# define SUBLANG_TAMAZIGHT_LATIN 0x02 -# endif -# ifndef SUBLANG_TIGRINYA_ETHIOPIA -# define SUBLANG_TIGRINYA_ETHIOPIA 0x00 -# endif -# ifndef SUBLANG_TIGRINYA_ERITREA -# define SUBLANG_TIGRINYA_ERITREA 0x01 -# endif -# ifndef SUBLANG_URDU_PAKISTAN -# define SUBLANG_URDU_PAKISTAN 0x01 -# endif -# ifndef SUBLANG_URDU_INDIA -# define SUBLANG_URDU_INDIA 0x02 -# endif -# ifndef SUBLANG_UZBEK_LATIN -# define SUBLANG_UZBEK_LATIN 0x01 -# endif -# ifndef SUBLANG_UZBEK_CYRILLIC -# define SUBLANG_UZBEK_CYRILLIC 0x02 -# endif -#endif /* HAVE_W32_SYSTEM */ - -/* XPG3 defines the result of 'setlocale (category, NULL)' as: - "Directs 'setlocale()' to query 'category' and return the current - setting of 'local'." - However it does not specify the exact format. Neither do SUSV2 and - ISO C 99. So we can use this feature only on selected systems (e.g. - those using GNU C Library). */ -#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2) -# define HAVE_LOCALE_NULL -#endif - -/* Determine the current locale's name, and canonicalize it into XPG syntax - language[_territory[.codeset]][@modifier] - The codeset part in the result is not reliable; the locale_charset() - should be used for codeset information instead. - The result must not be freed; it is statically allocated. */ - -static const char * -_nl_locale_name (int category, const char *categoryname) -{ - const char *retval; - -#ifndef HAVE_W32_SYSTEM - - /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'. - On some systems this can be done by the 'setlocale' function itself. */ -# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL - retval = setlocale (category, NULL); -# else - /* Setting of LC_ALL overwrites all other. */ - retval = getenv ("LC_ALL"); - if (retval == NULL || retval[0] == '\0') - { - /* Next comes the name of the desired category. */ - retval = getenv (categoryname); - if (retval == NULL || retval[0] == '\0') - { - /* Last possibility is the LANG environment variable. */ - retval = getenv ("LANG"); - if (retval == NULL || retval[0] == '\0') - /* We use C as the default domain. POSIX says this is - implementation defined. */ - retval = "C"; - } - } -# endif - - return retval; - -#else /* HAVE_W32_SYSTEM */ - - /* Return an XPG style locale name language[_territory][@modifier]. - Don't even bother determining the codeset; it's not useful in this - context, because message catalogs are not specific to a single - codeset. */ - - LCID lcid; - LANGID langid; - int primary, sub; - - /* Let the user override the system settings through environment - variables, as on POSIX systems. */ - retval = getenv ("LC_ALL"); - if (retval != NULL && retval[0] != '\0') - return retval; - retval = getenv (categoryname); - if (retval != NULL && retval[0] != '\0') - return retval; - retval = getenv ("LANG"); - if (retval != NULL && retval[0] != '\0') - return retval; - - /* Use native Win32 API locale ID. */ - lcid = GetThreadLocale (); - - /* Strip off the sorting rules, keep only the language part. */ - langid = LANGIDFROMLCID (lcid); - - /* Split into language and territory part. */ - primary = PRIMARYLANGID (langid); - sub = SUBLANGID (langid); - - /* Dispatch on language. - See also http://www.unicode.org/unicode/onlinedat/languages.html . - For details about languages, see http://www.ethnologue.com/ . */ - switch (primary) - { - case LANG_AFRIKAANS: return "af_ZA"; - case LANG_ALBANIAN: return "sq_AL"; - case LANG_AMHARIC: return "am_ET"; - case LANG_ARABIC: - switch (sub) - { - case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA"; - case SUBLANG_ARABIC_IRAQ: return "ar_IQ"; - case SUBLANG_ARABIC_EGYPT: return "ar_EG"; - case SUBLANG_ARABIC_LIBYA: return "ar_LY"; - case SUBLANG_ARABIC_ALGERIA: return "ar_DZ"; - case SUBLANG_ARABIC_MOROCCO: return "ar_MA"; - case SUBLANG_ARABIC_TUNISIA: return "ar_TN"; - case SUBLANG_ARABIC_OMAN: return "ar_OM"; - case SUBLANG_ARABIC_YEMEN: return "ar_YE"; - case SUBLANG_ARABIC_SYRIA: return "ar_SY"; - case SUBLANG_ARABIC_JORDAN: return "ar_JO"; - case SUBLANG_ARABIC_LEBANON: return "ar_LB"; - case SUBLANG_ARABIC_KUWAIT: return "ar_KW"; - case SUBLANG_ARABIC_UAE: return "ar_AE"; - case SUBLANG_ARABIC_BAHRAIN: return "ar_BH"; - case SUBLANG_ARABIC_QATAR: return "ar_QA"; - } - return "ar"; - case LANG_ARMENIAN: return "hy_AM"; - case LANG_ASSAMESE: return "as_IN"; - case LANG_AZERI: - switch (sub) - { - /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */ - case SUBLANG_AZERI_LATIN: return "az_AZ at latin"; - case SUBLANG_AZERI_CYRILLIC: return "az_AZ at cyrillic"; - } - return "az"; - case LANG_BASQUE: - return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */ - case LANG_BELARUSIAN: return "be_BY"; - case LANG_BENGALI: - switch (sub) - { - case SUBLANG_BENGALI_INDIA: return "bn_IN"; - case SUBLANG_BENGALI_BANGLADESH: return "bn_BD"; - } - return "bn"; - case LANG_BULGARIAN: return "bg_BG"; - case LANG_BURMESE: return "my_MM"; - case LANG_CAMBODIAN: return "km_KH"; - case LANG_CATALAN: return "ca_ES"; - case LANG_CHEROKEE: return "chr_US"; - case LANG_CHINESE: - switch (sub) - { - case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW"; - case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN"; - case SUBLANG_CHINESE_HONGKONG: return "zh_HK"; - case SUBLANG_CHINESE_SINGAPORE: return "zh_SG"; - case SUBLANG_CHINESE_MACAU: return "zh_MO"; - } - return "zh"; - case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN - * What used to be called Serbo-Croatian - * should really now be two separate - * languages because of political reasons. - * (Says tml, who knows nothing about Serbian - * or Croatian.) - * (I can feel those flames coming already.) - */ - switch (sub) - { - case SUBLANG_DEFAULT: return "hr_HR"; - case SUBLANG_SERBIAN_LATIN: return "sr_CS"; - case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS at cyrillic"; - } - return "hr"; - case LANG_CZECH: return "cs_CZ"; - case LANG_DANISH: return "da_DK"; - case LANG_DIVEHI: return "div_MV"; - case LANG_DUTCH: - switch (sub) - { - case SUBLANG_DUTCH: return "nl_NL"; - case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE"; - } - return "nl"; - case LANG_EDO: return "bin_NG"; - case LANG_ENGLISH: - switch (sub) - { - /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought - * English was the language spoken in England. - * Oh well. - */ - case SUBLANG_ENGLISH_US: return "en_US"; - case SUBLANG_ENGLISH_UK: return "en_GB"; - case SUBLANG_ENGLISH_AUS: return "en_AU"; - case SUBLANG_ENGLISH_CAN: return "en_CA"; - case SUBLANG_ENGLISH_NZ: return "en_NZ"; - case SUBLANG_ENGLISH_EIRE: return "en_IE"; - case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA"; - case SUBLANG_ENGLISH_JAMAICA: return "en_JM"; - case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */ - case SUBLANG_ENGLISH_BELIZE: return "en_BZ"; - case SUBLANG_ENGLISH_TRINIDAD: return "en_TT"; - case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW"; - case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH"; - case SUBLANG_ENGLISH_INDONESIA: return "en_ID"; - case SUBLANG_ENGLISH_HONGKONG: return "en_HK"; - case SUBLANG_ENGLISH_INDIA: return "en_IN"; - case SUBLANG_ENGLISH_MALAYSIA: return "en_MY"; - case SUBLANG_ENGLISH_SINGAPORE: return "en_SG"; - } - return "en"; - case LANG_ESTONIAN: return "et_EE"; - case LANG_FAEROESE: return "fo_FO"; - case LANG_FARSI: return "fa_IR"; - case LANG_FINNISH: return "fi_FI"; - case LANG_FRENCH: - switch (sub) - { - case SUBLANG_FRENCH: return "fr_FR"; - case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE"; - case SUBLANG_FRENCH_CANADIAN: return "fr_CA"; - case SUBLANG_FRENCH_SWISS: return "fr_CH"; - case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU"; - case SUBLANG_FRENCH_MONACO: return "fr_MC"; - case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */ - case SUBLANG_FRENCH_REUNION: return "fr_RE"; - case SUBLANG_FRENCH_CONGO: return "fr_CG"; - case SUBLANG_FRENCH_SENEGAL: return "fr_SN"; - case SUBLANG_FRENCH_CAMEROON: return "fr_CM"; - case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI"; - case SUBLANG_FRENCH_MALI: return "fr_ML"; - case SUBLANG_FRENCH_MOROCCO: return "fr_MA"; - case SUBLANG_FRENCH_HAITI: return "fr_HT"; - } - return "fr"; - case LANG_FRISIAN: return "fy_NL"; - case LANG_FULFULDE: return "ful_NG"; - case LANG_GAELIC: - switch (sub) - { - case 0x01: /* SCOTTISH */ return "gd_GB"; - case 0x02: /* IRISH */ return "ga_IE"; - } - return "C"; - case LANG_GALICIAN: return "gl_ES"; - case LANG_GEORGIAN: return "ka_GE"; - case LANG_GERMAN: - switch (sub) - { - case SUBLANG_GERMAN: return "de_DE"; - case SUBLANG_GERMAN_SWISS: return "de_CH"; - case SUBLANG_GERMAN_AUSTRIAN: return "de_AT"; - case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU"; - case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI"; - } - return "de"; - case LANG_GREEK: return "el_GR"; - case LANG_GUARANI: return "gn_PY"; - case LANG_GUJARATI: return "gu_IN"; - case LANG_HAUSA: return "ha_NG"; - case LANG_HAWAIIAN: - /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers) - or Hawaii Creole English ("cpe_US", 600000 speakers)? */ - return "cpe_US"; - case LANG_HEBREW: return "he_IL"; - case LANG_HINDI: return "hi_IN"; - case LANG_HUNGARIAN: return "hu_HU"; - case LANG_IBIBIO: return "nic_NG"; - case LANG_ICELANDIC: return "is_IS"; - case LANG_IGBO: return "ibo_NG"; - case LANG_INDONESIAN: return "id_ID"; - case LANG_INUKTITUT: return "iu_CA"; - case LANG_ITALIAN: - switch (sub) - { - case SUBLANG_ITALIAN: return "it_IT"; - case SUBLANG_ITALIAN_SWISS: return "it_CH"; - } - return "it"; - case LANG_JAPANESE: return "ja_JP"; - case LANG_KANNADA: return "kn_IN"; - case LANG_KANURI: return "kau_NG"; - case LANG_KASHMIRI: - switch (sub) - { - case SUBLANG_DEFAULT: return "ks_PK"; - case SUBLANG_KASHMIRI_INDIA: return "ks_IN"; - } - return "ks"; - case LANG_KAZAK: return "kk_KZ"; - case LANG_KONKANI: - /* FIXME: Adjust this when such locales appear on Unix. */ - return "kok_IN"; - case LANG_KOREAN: return "ko_KR"; - case LANG_KYRGYZ: return "ky_KG"; - case LANG_LAO: return "lo_LA"; - case LANG_LATIN: return "la_VA"; - case LANG_LATVIAN: return "lv_LV"; - case LANG_LITHUANIAN: return "lt_LT"; - case LANG_MACEDONIAN: return "mk_MK"; - case LANG_MALAY: - switch (sub) - { - case SUBLANG_MALAY_MALAYSIA: return "ms_MY"; - case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN"; - } - return "ms"; - case LANG_MALAYALAM: return "ml_IN"; - case LANG_MALTESE: return "mt_MT"; - case LANG_MANIPURI: - /* FIXME: Adjust this when such locales appear on Unix. */ - return "mni_IN"; - case LANG_MARATHI: return "mr_IN"; - case LANG_MONGOLIAN: - return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */ - case LANG_NEPALI: - switch (sub) - { - case SUBLANG_DEFAULT: return "ne_NP"; - case SUBLANG_NEPALI_INDIA: return "ne_IN"; - } - return "ne"; - case LANG_NORWEGIAN: - switch (sub) - { - case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO"; - case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO"; - } - return "no"; - case LANG_ORIYA: return "or_IN"; - case LANG_OROMO: return "om_ET"; - case LANG_PAPIAMENTU: return "pap_AN"; - case LANG_PASHTO: - return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */ - case LANG_POLISH: return "pl_PL"; - case LANG_PORTUGUESE: - switch (sub) - { - case SUBLANG_PORTUGUESE: return "pt_PT"; - /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT. - Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */ - case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR"; - } - return "pt"; - case LANG_PUNJABI: - switch (sub) - { - case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */ - } - return "pa"; - case LANG_RHAETO_ROMANCE: return "rm_CH"; - case LANG_ROMANIAN: - switch (sub) - { - case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO"; - } - return "ro"; - case LANG_RUSSIAN: - return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */ - case LANG_SAAMI: /* actually Northern Sami */ return "se_NO"; - case LANG_SANSKRIT: return "sa_IN"; - case LANG_SINDHI: - switch (sub) - { - case SUBLANG_SINDHI_INDIA: return "sd_IN"; - case SUBLANG_SINDHI_PAKISTAN: return "sd_PK"; - } - return "sd"; - case LANG_SINHALESE: return "si_LK"; - case LANG_SLOVAK: return "sk_SK"; - case LANG_SLOVENIAN: return "sl_SI"; - case LANG_SOMALI: return "so_SO"; - case LANG_SORBIAN: - /* FIXME: Adjust this when such locales appear on Unix. */ - return "wen_DE"; - case LANG_SPANISH: - switch (sub) - { - case SUBLANG_SPANISH: return "es_ES"; - case SUBLANG_SPANISH_MEXICAN: return "es_MX"; - case SUBLANG_SPANISH_MODERN: - return "es_ES at modern"; /* not seen on Unix */ - case SUBLANG_SPANISH_GUATEMALA: return "es_GT"; - case SUBLANG_SPANISH_COSTA_RICA: return "es_CR"; - case SUBLANG_SPANISH_PANAMA: return "es_PA"; - case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO"; - case SUBLANG_SPANISH_VENEZUELA: return "es_VE"; - case SUBLANG_SPANISH_COLOMBIA: return "es_CO"; - case SUBLANG_SPANISH_PERU: return "es_PE"; - case SUBLANG_SPANISH_ARGENTINA: return "es_AR"; - case SUBLANG_SPANISH_ECUADOR: return "es_EC"; - case SUBLANG_SPANISH_CHILE: return "es_CL"; - case SUBLANG_SPANISH_URUGUAY: return "es_UY"; - case SUBLANG_SPANISH_PARAGUAY: return "es_PY"; - case SUBLANG_SPANISH_BOLIVIA: return "es_BO"; - case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV"; - case SUBLANG_SPANISH_HONDURAS: return "es_HN"; - case SUBLANG_SPANISH_NICARAGUA: return "es_NI"; - case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR"; - } - return "es"; - case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */ - case LANG_SWAHILI: return "sw_KE"; - case LANG_SWEDISH: - switch (sub) - { - case SUBLANG_DEFAULT: return "sv_SE"; - case SUBLANG_SWEDISH_FINLAND: return "sv_FI"; - } - return "sv"; - case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */ - case LANG_TAGALOG: return "tl_PH"; - case LANG_TAJIK: return "tg_TJ"; - case LANG_TAMAZIGHT: - switch (sub) - { - /* FIXME: Adjust this when Tamazight locales appear on Unix. */ - case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA at arabic"; - case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA at latin"; - } - return "ber_MA"; - case LANG_TAMIL: - return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */ - case LANG_TATAR: return "tt_RU"; - case LANG_TELUGU: return "te_IN"; - case LANG_THAI: return "th_TH"; - case LANG_TIBETAN: return "bo_CN"; - case LANG_TIGRINYA: - switch (sub) - { - case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET"; - case SUBLANG_TIGRINYA_ERITREA: return "ti_ER"; - } - return "ti"; - case LANG_TSONGA: return "ts_ZA"; - case LANG_TSWANA: return "tn_BW"; - case LANG_TURKISH: return "tr_TR"; - case LANG_TURKMEN: return "tk_TM"; - case LANG_UKRAINIAN: return "uk_UA"; - case LANG_URDU: - switch (sub) - { - case SUBLANG_URDU_PAKISTAN: return "ur_PK"; - case SUBLANG_URDU_INDIA: return "ur_IN"; - } - return "ur"; - case LANG_UZBEK: - switch (sub) - { - case SUBLANG_UZBEK_LATIN: return "uz_UZ"; - case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ at cyrillic"; - } - return "uz"; - case LANG_VENDA: - /* FIXME: It's not clear whether Venda has the ISO 639-2 two-letter code - "ve" or not. - http://www.loc.gov/standards/iso639-2/englangn.html has it, but - http://lcweb.loc.gov/standards/iso639-2/codechanges.html doesn't, */ - return "ven_ZA"; /* or "ve_ZA"? */ - case LANG_VIETNAMESE: return "vi_VN"; - case LANG_WELSH: return "cy_GB"; - case LANG_XHOSA: return "xh_ZA"; - case LANG_YI: return "sit_CN"; - case LANG_YIDDISH: return "yi_IL"; - case LANG_YORUBA: return "yo_NG"; - case LANG_ZULU: return "zu_ZA"; - default: return "C"; - } - -#endif /* HAVE_W32_SYSTEM */ -} - -/* localname.c from gettext END. */ - -/* Support functions. */ - -typedef uint32_t u32; -typedef unsigned long ulong; - -static __inline__ u32 -do_swap_u32 (u32 i) -{ - return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24); -} - -#define SWAPIT(flag, data) ((flag) ? do_swap_u32(data) : (data)) - - -/* We assume to have `unsigned long int' value with at least 32 bits. */ -#define HASHWORDBITS 32 - -/* The so called `hashpjw' function by P.J. Weinberger - [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools, - 1986, 1987 Bell Telephone Laboratories, Inc.] */ - -static __inline__ ulong -hash_string( const char *str_param ) -{ - unsigned long int hval, g; - const char *str = str_param; - - hval = 0; - while (*str != '\0') - { - hval <<= 4; - hval += (unsigned long int) *str++; - g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4)); - if (g != 0) - { - hval ^= g >> (HASHWORDBITS - 8); - hval ^= g; - } - } - return hval; -} - - -/* Generic message catalog and gettext stuff. */ - -/* The magic number of the GNU message catalog format. */ -#define MAGIC 0x950412de -#define MAGIC_SWAPPED 0xde120495 - -/* Revision number of the currently used .mo (binary) file format. */ -#define MO_REVISION_NUMBER 0 - -/* Header for binary .mo file format. */ -struct mo_file_header -{ - /* The magic number. */ - u32 magic; - /* The revision number of the file format. */ - u32 revision; - /* The number of strings pairs. */ - u32 nstrings; - /* Offset of table with start offsets of original strings. */ - u32 orig_tab_offset; - /* Offset of table with start offsets of translation strings. */ - u32 trans_tab_offset; - /* Size of hashing table. */ - u32 hash_tab_size; - /* Offset of first hashing entry. */ - u32 hash_tab_offset; -}; - -struct string_desc -{ - /* Length of addressed string. */ - u32 length; - /* Offset of string in file. */ - u32 offset; -}; - - -struct overflow_space_s -{ - struct overflow_space_s *next; - u32 idx; - char d[1]; -}; - -struct loaded_domain -{ - char *data; - int must_swap; - u32 nstrings; - char *mapped; /* 0 = not yet mapped, 1 = mapped, - 2 = mapped to - overflow space */ - struct overflow_space_s *overflow_space; - struct string_desc *orig_tab; - struct string_desc *trans_tab; - u32 hash_size; - u32 *hash_tab; -}; - - -/* Free the domain data. */ -static void -free_domain (struct loaded_domain *domain) -{ - struct overflow_space_s *os, *os2; - free (domain->data); - free (domain->mapped); - for (os = domain->overflow_space; os; os = os2) - { - os2 = os->next; - free (os); - } - free (domain); -} - - -/* The gettext implementation; support functions. */ -static struct loaded_domain * -load_domain (const char *filename) -{ - FILE *fp; - size_t size; - struct stat st; - struct mo_file_header *data = NULL; - struct loaded_domain *domain = NULL; - size_t to_read; - char *read_ptr; - - fp = fopen (filename, "rb"); - if (!fp) - return NULL; - - /* Determine the file size. */ - if (fstat (fileno (fp), &st) - || (size = (size_t) st.st_size) != st.st_size - || size < sizeof (struct mo_file_header)) - { - fclose (fp); - return NULL; - } - - data = malloc (size); - if (!data) - { - fclose (fp); - return NULL; - } - - to_read = size; - read_ptr = (char *) data; - do - { - long int nb = fread (read_ptr, 1, to_read, fp); - if (nb < to_read) - { - fclose (fp); - free (data); - return NULL; - } - read_ptr += nb; - to_read -= nb; - } - while (to_read > 0); - fclose (fp); - - /* Using the magic number we can test whether it really is a message - catalog file. */ - if (data->magic != MAGIC && data->magic != MAGIC_SWAPPED) - { - /* The magic number is wrong: not a message catalog file. */ - free (data); - return NULL; - } - - domain = calloc (1, sizeof *domain); - if (!domain) - { - free (data); - return NULL; - } - domain->data = (char *) data; - domain->must_swap = data->magic != MAGIC; - - /* Fill in the information about the available tables. */ - switch (SWAPIT (domain->must_swap, data->revision)) - { - case 0: - - domain->nstrings = SWAPIT (domain->must_swap, data->nstrings); - domain->orig_tab = (struct string_desc *) - ((char *) data + SWAPIT (domain->must_swap, data->orig_tab_offset)); - domain->trans_tab = (struct string_desc *) - ((char *) data + SWAPIT (domain->must_swap, data->trans_tab_offset)); - domain->hash_size = SWAPIT (domain->must_swap, data->hash_tab_size); - domain->hash_tab = (u32 *) - ((char *) data + SWAPIT (domain->must_swap, data->hash_tab_offset)); - break; - - default: - /* This is an invalid revision. */ - free (data); - free (domain); - return NULL; - } - - /* Allocate an array to keep track of code page mappings. */ - domain->mapped = calloc (1, domain->nstrings); - if (!domain->mapped) - { - free (data); - free (domain); - return NULL; - } - - return domain; -} - - -/* Return a malloced string encoded in UTF-8 from the wide char input - string STRING. Caller must free this value. On failure returns - NULL; caller may use GetLastError to get the actual error number. - The result of calling this function with STRING set to NULL is not - defined. */ -static char * -wchar_to_native (const wchar_t *string) -{ - int n; - char *result; - - n = WideCharToMultiByte (CP_ACP, 0, string, -1, NULL, 0, NULL, NULL); - if (n < 0) - return NULL; - - result = malloc (n+1); - if (!result) - return NULL; - - n = WideCharToMultiByte (CP_ACP, 0, string, -1, result, n, NULL, NULL); - if (n < 0) - { - free (result); - return NULL; - } - return result; -} - - -static wchar_t * -native_to_wchar (const char *string) -{ - int n; - wchar_t *result; - - n = MultiByteToWideChar (CP_ACP, 0, string, -1, NULL, 0); - if (n < 0) - return NULL; - - result = malloc ((n+1) * sizeof *result); - if (!result) - return NULL; - - n = MultiByteToWideChar (CP_ACP, 0, string, -1, result, n); - if (n < 0) - { - free (result); - return NULL; - } - return result; -} - - -/* Return a malloced wide char string from an UTF-8 encoded input - string STRING. Caller must free this value. On failure returns - NULL; caller may use GetLastError to get the actual error number. - The result of calling this function with STRING set to NULL is not - defined. */ -wchar_t * -utf8_to_wchar (const char *string) -{ - int n; - wchar_t *result; - - n = MultiByteToWideChar (CP_UTF8, 0, string, -1, NULL, 0); - if (n < 0) - return NULL; - - result = malloc ((n+1) * sizeof *result); - if (!result) - return NULL; - - n = MultiByteToWideChar (CP_UTF8, 0, string, -1, result, n); - if (n < 0) - { - free (result); - return NULL; - } - return result; -} - - -/* Return a malloced string encoded in UTF-8 from the wide char input - string STRING. Caller must free this value. On failure returns - NULL; caller may use GetLastError to get the actual error number. - The result of calling this function with STRING set to NULL is not - defined. */ -char * -wchar_to_utf8 (const wchar_t *string) -{ - int n; - char *result; - - /* Note, that CP_UTF8 is not defined in Windows versions earlier - than NT.*/ - n = WideCharToMultiByte (CP_UTF8, 0, string, -1, NULL, 0, NULL, NULL); - if (n < 0) - return NULL; - - result = malloc (n + 1); - if (!result) - return NULL; - - n = WideCharToMultiByte (CP_UTF8, 0, string, -1, result, n, NULL, NULL); - if (n < 0) - { - free (result); - return NULL; - } - return result; -} - - -/* Convert UTF8 to the native codepage. This function is guaranteed - to never return NULL. Caller must free the return value. */ -char * -utf8_to_native (const char *string) -{ - wchar_t *wstring; - char *result; - - wstring = utf8_to_wchar (string); - if (!wstring) - return strdup ("[Error: utf8_to_wchar failed]"); - - result = wchar_to_native (wstring); - free (wstring); - if (!result) - result = strdup ("[Error: wchar_to_native failed]"); - - return result; -} - - -/* Convert native character set to utf-8. This is required if we want - to get an utf-8 string from a gettext translated function which - internally uses utf8_to_native. It is guaranteed that NULL is - never returned. Caller must free the return value. */ -char * -native_to_utf8 (const char *string) -{ - char *result; - wchar_t *wstring; - - wstring = native_to_wchar (string); - if (!wstring) - return strdup ("[Error: native_to_wchar failed]"); - - result = wchar_to_utf8 (wstring); - free (wstring); - if (!result) - result = strdup ("[Error: wchar_to_utf8 failed]"); - - return result; -} - - - -static const char* -get_string (struct loaded_domain *domain, u32 idx) -{ - struct overflow_space_s *os; - char *p; - - p = domain->data + SWAPIT (domain->must_swap, domain->trans_tab[idx].offset); - if (!domain->mapped[idx]) - { - size_t plen, buflen; - char *buf; - - domain->mapped[idx] = 1; - - plen = strlen (p); - buf = utf8_to_native (p); - buflen = strlen (buf); - if (buflen <= plen) - strcpy (p, buf); - else - { - /* There is not enough space for the translation - store it - in the overflow_space else and mark that in the mapped - array. Because we expect that this won't happen too - often, we use a simple linked list. */ - os = malloc (sizeof *os + buflen); - if (os) - { - os->idx = idx; - strcpy (os->d, buf); - os->next = domain->overflow_space; - domain->overflow_space = os; - p = os->d; - } - else - p = "ERROR in GETTEXT MALLOC"; - } - free (buf); - } - else if (domain->mapped[idx] == 2) - { - /* We need to get the string from the overflow_space. */ - for (os=domain->overflow_space; os; os = os->next) - if (os->idx == idx) - return (const char*) os->d; - p = "ERROR in GETTEXT\n"; - } - return (const char*) p; -} - - - -/* The domain we use. We only support one domain at this point. This - is why this implementation can not be shared. Bindtextdomain and - dgettext will simply cheat and always use this one domain. */ -static struct loaded_domain *the_domain; - - -/* Specify that the DOMAINNAME message catalog will be found - in DIRNAME rather than in the system locale data base. */ -char * -bindtextdomain (const char *domainname, const char *dirname) -{ - struct loaded_domain *domain = NULL; - const char *catval_full; - char *catval; - char *fname; - - /* DOMAINNAME is ignored. We only support one domain. */ - - /* DIRNAME is "$INSTALLDIR\share\locale". */ - - /* First found out the category value. */ - catval = NULL; - catval_full = _nl_locale_name (LC_MESSAGES, "LC_MESSAGES"); - - /* Normally, we would have to loop over all returned locales, and - search for the right file. See gettext intl/dcigettext.c for all - the gory details. Here, we only support the basic category, and - ignore everything else. */ - if (catval_full) - { - char *p; - - catval = malloc (strlen (catval_full) + 1); - if (catval) - { - strcpy (catval, catval_full); - p = strchr (catval, '_'); - if (p) - *p = '\0'; - } - } - if (!catval) - return NULL; - - /* Now build the filename string. The complete filename is this: - DIRNAME + \ + CATVAL + \LC_MESSAGES\ + DOMAINNAME + .mo */ - { - int len = strlen (dirname) + 1 + strlen (catval) + 13 - + strlen (domainname) + 3 + 1; - char *p; - - fname = malloc (len); - if (!fname) - { - free (catval); - return NULL; - } - - p = fname; - strcpy (p, dirname); - p += strlen (dirname); - *(p++) = '\\'; - strcpy (p, catval); - p += strlen (catval); - strcpy (p, "\\LC_MESSAGES\\"); - p += 13; - strcpy (p, domainname); - p += strlen (domainname); - strcpy (p, ".mo"); - } - - domain = load_domain (fname); - free (catval); - free (fname); - - /* We should not be invoked twice, but this is how you would do - it if it happened. */ - if (the_domain) - free_domain (the_domain); - the_domain = domain; - - /* For historic reasoins we are not allowed to return a const char*. */ - return (char*)dirname; -} - - -const char * -gettext (const char *msgid) -{ - struct loaded_domain *domain; - size_t act = 0; - size_t top, bottom; - - if (!(domain = the_domain)) - goto not_found; - - /* Locate the MSGID and its translation. */ - if (domain->hash_size > 2 && domain->hash_tab) - { - /* Use the hashing table. */ - u32 len = strlen (msgid); - u32 hash_val = hash_string (msgid); - u32 idx = hash_val % domain->hash_size; - u32 incr = 1 + (hash_val % (domain->hash_size - 2)); - u32 nstr = SWAPIT (domain->must_swap, domain->hash_tab[idx]); - - if (!nstr) - /* Hash table entry is empty. */ - goto not_found; - - if (SWAPIT (domain->must_swap, - domain->orig_tab[nstr - 1].length) == len - && !strcmp (msgid, - domain->data - + SWAPIT (domain->must_swap, - domain->orig_tab[nstr - 1].offset))) - return get_string (domain, nstr - 1); - - for(;;) - { - if (idx >= domain->hash_size - incr) - idx -= domain->hash_size - incr; - else - idx += incr; - - nstr = SWAPIT (domain->must_swap, domain->hash_tab[idx]); - if (!nstr) - /* Hash table entry is empty. */ - goto not_found; - - if (SWAPIT (domain->must_swap, - domain->orig_tab[nstr - 1].length) == len - && !strcmp (msgid, - domain->data - + SWAPIT (domain->must_swap, - domain->orig_tab[nstr - 1].offset))) - return get_string (domain, nstr-1); - } - /* NOTREACHED */ - } - - /* Now we try the default method: binary search in the sorted array - of messages. */ - bottom = 0; - top = domain->nstrings; - while (bottom < top) - { - int cmp_val; - - act = (bottom + top) / 2; - cmp_val = strcmp(msgid, domain->data - + SWAPIT (domain->must_swap, - domain->orig_tab[act].offset)); - if (cmp_val < 0) - top = act; - else if (cmp_val > 0) - bottom = act + 1; - else - return get_string (domain, act); - } - not_found: - return msgid; -} - - -char * -textdomain (const char *domainname) -{ - /* For now, support only one domain. */ - return (char*)domainname; -} - -char * -dgettext (const char *domainname, const char *msgid) -{ - /* For now, support only one domain. */ - return (char*)gettext (msgid); -} - -/* Return the locale name as used by gettext. The return value will - never be NULL. */ -const char * -gettext_localename (void) -{ - const char *s; - - s = _nl_locale_name (LC_MESSAGES, "LC_MESSAGES"); - return s? s:""; -} diff --git a/src/w32-gettext.h b/src/w32-gettext.h deleted file mode 100644 index e8cd0fa..0000000 --- a/src/w32-gettext.h +++ /dev/null @@ -1,84 +0,0 @@ -/* w32-gettext.h - A simple gettext implementation for Windows targets. - Copyright (C) 2005 g10 Code GmbH - - This file is part of libgpg-error. - - libgpg-error is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License - as published by the Free Software Foundation; either version 2.1 of - the License, or (at your option) any later version. - - libgpg-error is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with libgpg-error; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA - 02111-1307, USA. */ - -#ifndef W32_GETTEXT_H -#define W32_GETTEXT_H - -#if ENABLE_NLS - -#include -#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun)) -# define LC_MESSAGES 1729 -#endif - -#ifdef __cplusplus -extern "C" -{ -#if 0 -} -#endif -#endif - -/* Specify that the DOMAINNAME message catalog will be found - in DIRNAME rather than in the system locale data base. */ -char *bindtextdomain (const char *domainname, const char *dirname); - -const char *gettext (const char *msgid); - -char *textdomain (const char *domainname); - -char *dgettext (const char *domainname, const char *msgid); - -/* Return the localname as used by gettext. The return value will - never be NULL. */ -const char *gettext_localename (void); - -/* A pseudo function call that serves as a marker for the automated - extraction of messages, but does not call gettext(). The run-time - translation is done at a different place in the code. - The argument, String, should be a literal string. Concatenated strings - and other string expressions won't work. - The macro's expansion is not parenthesized, so that it is suitable as - initializer for static 'char[]' or 'const char[]' variables. */ -#define gettext_noop(String) String - - -#else /* ENABLE_NLS */ - -static inline const char *gettext_localename (void) { return ""; } - - -#endif /* !ENABLE_NLS */ - -/* Conversion function. */ -char *wchar_to_utf8 (const wchar_t *string); -wchar_t *utf8_to_wchar (const char *string); - -char *utf8_to_native (const char *string); -char *native_to_utf8 (const char *string); - -#ifdef __cplusplus -#if 0 -{ -#endif -} -#endif - -#endif /* ! W32_GETTEXT_H */ ----------------------------------------------------------------------- Summary of changes: NEWS | 2 + configure.ac | 3 + src/ChangeLog | 25 +- src/Makefile.am | 1 - src/client.cc | 119 +++-- src/gpgex.cc | 112 +++-- src/main.cc | 146 ++++- src/main.h | 25 +- src/w32-gettext.c | 1796 ----------------------------------------------------- src/w32-gettext.h | 84 --- 10 files changed, 321 insertions(+), 1992 deletions(-) delete mode 100644 src/w32-gettext.c delete mode 100644 src/w32-gettext.h hooks/post-receive -- GnupG extension for the Windows Explorer http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 26 17:12:35 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 26 Jun 2013 17:12:35 +0200 Subject: [git] GpgEX - branch, master, updated. gpgex-0.9.7-24-ge84489c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GnupG extension for the Windows Explorer". The branch, master has been updated via e84489cd5e3b2e6c6c8a8a252cb5b2028dbf3dd9 (commit) from 2ff96b6ed1742d86a5be7972d241e2cb9a18886b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e84489cd5e3b2e6c6c8a8a252cb5b2028dbf3dd9 Author: Werner Koch Date: Wed Jun 26 16:32:03 2013 +0200 Update one fuzzy in some PO files. diff --git a/po/ar.po b/po/ar.po index daae4fd..3e4298a 100644 --- a/po/ar.po +++ b/po/ar.po @@ -19,9 +19,9 @@ msgstr "" "X-Poedit-Language: Arabic\n" "X-Poedit-SourceCharset: utf-8\n" -#, c-format +#, fuzzy, c-format msgid "" -"Can not access Kleopatra:\r\n" +"Can not access the UI-server%s%s%s:\r\n" "%s" msgstr "" "?????????? ???????????? ?????? ??????????????????:\r\n" diff --git a/po/de.po b/po/de.po index 5fe8dbe..aaeccdf 100644 --- a/po/de.po +++ b/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: gpgex 0.0.0-svn10\n" "Report-Msgid-Bugs-To: bug-gpgex at g10code.com\n" -"PO-Revision-Date: 2013-06-24 09:14+0200\n" +"PO-Revision-Date: 2013-06-26 16:28+0200\n" "Last-Translator: Marcus Brinkmann \n" "Language-Team: German\n" "Language: \n" @@ -18,10 +18,10 @@ msgstr "" #, c-format msgid "" -"Can not access Kleopatra:\r\n" +"Can not access the UI-server%s%s%s:\r\n" "%s" msgstr "" -"Kann nicht auf Kleopatra zugreifen:\r\n" +"Fehler beim Zugriff auf den UI-Server%s%s%s:\\r\n" "%s" msgid "Help on GpgEX" diff --git a/po/es.po b/po/es.po index 7036835..b00a0aa 100644 --- a/po/es.po +++ b/po/es.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: GpgEX FIXME:VERSION\n" "Report-Msgid-Bugs-To: bug-gpgex at g10code.com\n" -"PO-Revision-Date: 2008-03-15 08:03+0100\n" +"PO-Revision-Date: 2013-06-26 16:29+0200\n" "Last-Translator: \n" "Language-Team: Spanish \n" "Language: es\n" @@ -18,10 +18,10 @@ msgstr "" #, c-format msgid "" -"Can not access Kleopatra:\r\n" +"Can not access the UI-server%s%s%s:\r\n" "%s" msgstr "" -"No se pudo acceder a Kleopatra:\r\n" +"No se pudo acceder a UI-server%s%s%s:\\r\n" "%s" msgid "Help on GpgEX" diff --git a/po/pt.po b/po/pt.po index 785d28f..4fb69cb 100644 --- a/po/pt.po +++ b/po/pt.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: GpgEX\n" "Report-Msgid-Bugs-To: bug-gpgex at g10code.com\n" -"PO-Revision-Date: 2010-07-18 18:51-0000\n" +"PO-Revision-Date: 2013-06-26 16:30+0200\n" "Last-Translator: Marco A.G.Pinto \n" "Language-Team: Portuguese \n" "Language: pt\n" @@ -21,10 +21,10 @@ msgstr "" #, c-format msgid "" -"Can not access Kleopatra:\r\n" +"Can not access the UI-server%s%s%s:\r\n" "%s" msgstr "" -"N?o ? poss?vel aceder a Kleopatra:\r\n" +"N?o ? poss?vel aceder a UI-server%s%s%s:\\r\n" "%s" msgid "Help on GpgEX" diff --git a/po/ru.po b/po/ru.po index 79a0120..eb666b0 100644 --- a/po/ru.po +++ b/po/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: GpgEX\n" "Report-Msgid-Bugs-To: bug-gpgex at g10code.com\n" -"PO-Revision-Date: 2008-03-23 21:39+0300\n" +"PO-Revision-Date: 2013-06-26 16:31+0200\n" "Last-Translator: Sergei Smirnov \n" "Language-Team: Sergei Smirnov \n" "Language: \n" @@ -19,10 +19,10 @@ msgstr "" #, c-format msgid "" -"Can not access Kleopatra:\r\n" +"Can not access the UI-server%s%s%s:\r\n" "%s" msgstr "" -"?????? ?????????????? ?? ?????????????????? Kleopatra:\r\n" +"?????? ?????????????? ?? ?????????????????? UI-server%s%s%s:\\r\n" "%s" msgid "Help on GpgEX" ----------------------------------------------------------------------- Summary of changes: po/ar.po | 4 ++-- po/de.po | 6 +++--- po/es.po | 6 +++--- po/pt.po | 6 +++--- po/ru.po | 6 +++--- 5 files changed, 14 insertions(+), 14 deletions(-) hooks/post-receive -- GnupG extension for the Windows Explorer http://git.gnupg.org From cvs at cvs.gnupg.org Wed Jun 26 23:52:30 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Wed, 26 Jun 2013 23:52:30 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-217-g136f190 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 136f190a2f20c6ec4d5c3ca3ac7f0440c14e4dc2 (commit) from 7777e68d0482c942f527e91c04adbcfb40bc8bef (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 136f190a2f20c6ec4d5c3ca3ac7f0440c14e4dc2 Author: Werner Koch Date: Wed Jun 26 23:23:18 2013 +0200 Fix Makefile regression. * agent/Makefile.am (gpg_agent_DEPENDENCIES): Remove cruft from wrong resolve conflict 2013-04-25. (gpg_agent_DEPENDENCIES): Remove obsolete gpg_agent_res_deps (gpg_agent_LDFLAGS): Remove obsolete gpg_agent_res_ldflags. -- This fixes 88e24341e57c96e31a25e92e09d67989e64cc1c1. Thanks to Christian Aistleitner for pinpointing this bug. Am sorry for accusing automake to have introduced this bug; I should have washed my own eyes. GnuPG-bug-id: 1511 diff --git a/agent/Makefile.am b/agent/Makefile.am index 92f8fc0..ff15d03 100644 --- a/agent/Makefile.am +++ b/agent/Makefile.am @@ -69,11 +69,8 @@ gpg_agent_LDADD = $(commonpth_libs) \ $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(NPTH_LIBS) \ $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV) \ $(resource_objs) -gpg_agent_LDFLAGS = $(extra_bin_ldflags) $(gpg_agent_res_ldflags) -gpg_agent_DEPENDENCIES = $(gpg_agent_res_deps) - $(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(PTH_LIBS) \ - $(GPG_ERROR_LIBS) $(LIBINTL) $(NETLIBS) $(LIBICONV) \ - $(resource_objs) +gpg_agent_LDFLAGS = $(extra_bin_ldflags) +gpg_agent_DEPENDENCIES = $(resource_objs) gpg_protect_tool_SOURCES = \ protect-tool.c \ ----------------------------------------------------------------------- Summary of changes: agent/Makefile.am | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Jun 27 00:04:01 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 27 Jun 2013 00:04:01 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-218-g95d496c Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 95d496cb7a897240c6f09ccb4e04926d59326cbc (commit) from 136f190a2f20c6ec4d5c3ca3ac7f0440c14e4dc2 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 95d496cb7a897240c6f09ccb4e04926d59326cbc Author: Werner Koch Date: Wed Jun 26 23:37:40 2013 +0200 Update AUTHORS. -- diff --git a/AUTHORS b/AUTHORS index 374111b..a915919 100644 --- a/AUTHORS +++ b/AUTHORS @@ -134,6 +134,12 @@ Yutaka Niibe Assigns Past and Future Changes Authors with a DCO ================== +Christian Aistleitner +2013-05-26:20130626112332.GA2228 at quelltextlich.at: + +Hans of Guardian +2013-06-26:D84473D7-F3F7-43D5-A9CE-16580B88D574 at guardianproject.info: + Werner Koch 2013-03-29:87620ahchj.fsf at vigenere.g10code.de: ----------------------------------------------------------------------- Summary of changes: AUTHORS | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org From cvs at cvs.gnupg.org Thu Jun 27 09:55:26 2013 From: cvs at cvs.gnupg.org (by Werner Koch) Date: Thu, 27 Jun 2013 09:55:26 +0200 Subject: [git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-220-g82c25e6 Message-ID: This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "The GNU Privacy Guard". The branch, master has been updated via 82c25e67a1669febb5332b3e9bc4652e6855fdca (commit) via 043e2728c813299fafcf62cd125ecf872b26179e (commit) from 95d496cb7a897240c6f09ccb4e04926d59326cbc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 82c25e67a1669febb5332b3e9bc4652e6855fdca Author: Werner Koch Date: Thu Jun 27 09:28:43 2013 +0200 Modernize two format string file name quotes. -- diff --git a/agent/command-ssh.c b/agent/command-ssh.c index 94538b3..39435aa 100644 --- a/agent/command-ssh.c +++ b/agent/command-ssh.c @@ -760,7 +760,7 @@ open_control_file (control_file_t *r_cf, int append) if (!stream) { err = gpg_error_from_syserror (); - log_error (_("can't create `%s': %s\n"), + log_error (_("can't create '%s': %s\n"), cf->fname, gpg_strerror (err)); goto leave; } @@ -772,7 +772,7 @@ open_control_file (control_file_t *r_cf, int append) if (!cf->fp) { err = gpg_error_from_syserror (); - log_error (_("can't open `%s': %s\n"), + log_error (_("can't open '%s': %s\n"), cf->fname, gpg_strerror (err)); goto leave; } commit 043e2728c813299fafcf62cd125ecf872b26179e Author: Werner Koch Date: Thu Jun 27 09:22:00 2013 +0200 Prepare for newer automake versions. * configure.ac (AM_INIT_AUTOMAKE): Replace 2 argument form by the option form. Add options from the top Makefile. (AM_CONFIG_HEADER): Rename to AC_CONFIG_HEADER. * Makefile.am (AUTOMAKE_OPTIONS): Remove. * kbx/Makefile.am: Remove INCLUDES. Include cmacros.am. FActor some AM_CPPFLAGS options to AM_CFLAGS. diff --git a/Makefile.am b/Makefile.am index c5ac11c..c9a7b50 100644 --- a/Makefile.am +++ b/Makefile.am @@ -19,7 +19,6 @@ ## Process this file with automake to produce Makefile.in ACLOCAL_AMFLAGS = -I m4 -I gl/m4 -AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip DISTCHECK_CONFIGURE_FLAGS = --enable-symcryptrun --enable-mailto --enable-gpgtar GITLOG_TO_CHANGELOG=gitlog-to-changelog diff --git a/configure.ac b/configure.ac index 5335e56..01530e0 100644 --- a/configure.ac +++ b/configure.ac @@ -63,10 +63,12 @@ PACKAGE=$PACKAGE_NAME PACKAGE_GT=${PACKAGE_NAME}2 VERSION=$PACKAGE_VERSION -AC_CONFIG_AUX_DIR(scripts) -AC_CONFIG_SRCDIR(sm/gpgsm.c) -AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE($PACKAGE, $VERSION) +AC_CONFIG_AUX_DIR([scripts]) +AC_CONFIG_SRCDIR([sm/gpgsm.c]) +AC_CONFIG_HEADER([config.h]) +# Note: For automake 1.13 add the option +# serial-tests +AM_INIT_AUTOMAKE([dist-bzip2 no-dist-gzip]) AC_CANONICAL_HOST AB_INIT diff --git a/kbx/Makefile.am b/kbx/Makefile.am index 894924e..d7edb25 100644 --- a/kbx/Makefile.am +++ b/kbx/Makefile.am @@ -18,12 +18,14 @@ ## Process this file with automake to produce Makefile.in -localedir = $(datadir)/locale -INCLUDES = -I../intl -DLOCALEDIR=\"$(localedir)\" - EXTRA_DIST = mkerrors -AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common -I$(top_srcdir)/intl \ - $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) + +AM_CPPFLAGS = -I$(top_srcdir)/gl -I$(top_srcdir)/common \ + -I$(top_srcdir)/intl + +include $(top_srcdir)/am/cmacros.am + +AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS) noinst_LIBRARIES = libkeybox.a bin_PROGRAMS = kbxutil ----------------------------------------------------------------------- Summary of changes: Makefile.am | 1 - agent/command-ssh.c | 4 ++-- configure.ac | 10 ++++++---- kbx/Makefile.am | 12 +++++++----- 4 files changed, 15 insertions(+), 12 deletions(-) hooks/post-receive -- The GNU Privacy Guard http://git.gnupg.org