w32: Add macro for the registry key.
authorWerner Koch <wk@gnupg.org>
Wed, 8 Jan 2014 10:47:07 +0000 (11:47 +0100)
committerWerner Koch <wk@gnupg.org>
Wed, 8 Jan 2014 10:47:07 +0000 (11:47 +0100)
* configure.ac (GNUPG_REGISTRY_DIR) [W32]: New ac-define.
* common/homedir.c (default_homedir): Use it.
* common/logging.c (do_logv): Use it.

common/homedir.c
common/logging.c
configure.ac

index 682df9a..77622a1 100644 (file)
@@ -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)
                 {
index e94cdaf..2b5bb2d 100644 (file)
@@ -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);
index fa841c4..a206188 100644 (file)
@@ -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.