aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-01-08 10:47:07 +0000
committerWerner Koch <[email protected]>2014-01-08 10:47:07 +0000
commit75ba215ebd8be7e14b26bb53ef3c7d41e4ce1e02 (patch)
tree3e3f63f0e8e680db32b261ea91091de7499cd96e
parentgpg: Change --show-session-key to print the session key earlier. (diff)
downloadgnupg-75ba215ebd8be7e14b26bb53ef3c7d41e4ce1e02.tar.gz
gnupg-75ba215ebd8be7e14b26bb53ef3c7d41e4ce1e02.zip
w32: Add macro for the registry key.
* configure.ac (GNUPG_REGISTRY_DIR) [W32]: New ac-define. * common/homedir.c (default_homedir): Use it. * common/logging.c (do_logv): Use it.
-rw-r--r--common/homedir.c2
-rw-r--r--common/logging.c2
-rw-r--r--configure.ac5
3 files changed, 7 insertions, 2 deletions
diff --git a/common/homedir.c b/common/homedir.c
index 682df9ab0..77622a1d4 100644
--- a/common/homedir.c
+++ b/common/homedir.c
@@ -222,7 +222,7 @@ default_homedir (void)
char *tmp;
tmp = read_w32_registry_string (NULL,
- "Software\\GNU\\" GNUPG_NAME,
+ GNUPG_REGISTRY_DIR,
"HomeDir");
if (tmp && !*tmp)
{
diff --git a/common/logging.c b/common/logging.c
index e94cdaf3e..2b5bb2db1 100644
--- a/common/logging.c
+++ b/common/logging.c
@@ -636,7 +636,7 @@ do_logv (int level, int ignore_arg_ptr, const char *fmt, va_list arg_ptr)
tmp = (no_registry
? NULL
- : read_w32_registry_string (NULL, "Software\\GNU\\"GNUPG_NAME,
+ : read_w32_registry_string (NULL, GNUPG_REGISTRY_DIR,
"DefaultLogFile"));
log_set_file (tmp && *tmp? tmp : NULL);
jnlib_free (tmp);
diff --git a/configure.ac b/configure.ac
index fa841c4c9..a206188ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1600,6 +1600,11 @@ AC_DEFINE_UNQUOTED(DIRMNGR_SOCK_NAME, "S.dirmngr",
AC_DEFINE_UNQUOTED(GPGEXT_GPG, "gpg", [The standard binary file suffix])
+if test "$have_w32_system" = yes; then
+ AC_DEFINE_UNQUOTED(GNUPG_REGISTRY_DIR, "\\Software\\GNU\\GnuPG",
+ [The directory part of the W32 registry keys])
+fi
+
#
# Provide information about the build.