[git] GnuPG - branch, master, updated. gnupg-2.1.0beta3-267-gcc9a0b6

by Werner Koch cvs at cvs.gnupg.org
Mon Nov 18 14:14:32 CET 2013


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  cc9a0b69b698ba436eaf777e5020532845b56236 (commit)
       via  798daaa1ddf73f64cf840fbdc1f4c5b9c4b4ec13 (commit)
      from  5499942571a88a1223a7318992605c6d29858866 (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 cc9a0b69b698ba436eaf777e5020532845b56236
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Nov 18 14:09:47 2013 +0100

    Make use of the *_NAME etc macros.
    
    Replace hardwired strings at many places with new macros from config.h
    and use the new strusage macro replacement feature.
    
    * common/asshelp.c (lock_spawning) [W32]: Change the names of the spawn
    sentinels.
    * agent/command.c (cmd_import_key): Use asprintf to create the prompt.

diff --git a/agent/command.c b/agent/command.c
index 938778a..4fa40d9 100644
--- a/agent/command.c
+++ b/agent/command.c
@@ -2065,10 +2065,16 @@ cmd_import_key (assuan_context_t ctx, char *line)
       if (!agent_key_available (grip))
         err = gpg_error (GPG_ERR_EEXIST);
       else
-        err = agent_ask_new_passphrase
-          (ctrl, _("Please enter the passphrase to protect the "
-                   "imported object within the GnuPG system."),
-           &passphrase);
+        {
+          char *prompt = xtryasprintf
+            (_("Please enter the passphrase to protect the "
+               "imported object within the %s system."), GNUPG_NAME);
+          if (!prompt)
+            err = gpg_error_from_syserror ();
+          else
+            err = agent_ask_new_passphrase (ctrl, prompt, &passphrase);
+          xfree (prompt);
+        }
       if (err)
         goto leave;
     }
diff --git a/agent/gpg-agent.c b/agent/gpg-agent.c
index ff129f9..ed664ea 100644
--- a/agent/gpg-agent.c
+++ b/agent/gpg-agent.c
@@ -335,7 +335,7 @@ my_strusage (int level)
 
   switch (level)
     {
-    case 11: p = "gpg-agent (GnuPG)";
+    case 11: p = "@GPG_AGENT@ (@GNUPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
@@ -351,10 +351,10 @@ my_strusage (int level)
       break;
 
     case 1:
-    case 40: p =  _("Usage: gpg-agent [options] (-h for help)");
+    case 40: p =  _("Usage: @GPG_AGENT@ [options] (-h for help)");
       break;
-    case 41: p =  _("Syntax: gpg-agent [options] [command [args]]\n"
-                    "Secret key management for GnuPG\n");
+    case 41: p =  _("Syntax: @GPG_AGENT@ [options] [command [args]]\n"
+                    "Secret key management for @GNUPG@\n");
     break;
 
     default: p = NULL;
@@ -608,7 +608,7 @@ main (int argc, char **argv )
   /* Please note that we may running SUID(ROOT), so be very CAREFUL
      when adding any stuff between here and the call to INIT_SECMEM()
      somewhere after the option parsing */
-  log_set_prefix ("gpg-agent", JNLIB_LOG_WITH_PREFIX|JNLIB_LOG_WITH_PID);
+  log_set_prefix (GPG_AGENT_NAME, JNLIB_LOG_WITH_PREFIX|JNLIB_LOG_WITH_PID);
 
   /* Make sure that our subsystems are ready.  */
   i18n_init ();
@@ -1044,10 +1044,10 @@ main (int argc, char **argv )
 
       /* Create the sockets.  */
       socket_name = create_socket_name
-        ("S.gpg-agent", "gpg-XXXXXX/S.gpg-agent");
+        (GPG_AGENT_SOCK_NAME, "gpg-XXXXXX/"GPG_AGENT_SOCK_NAME);
       if (opt.ssh_support)
 	socket_name_ssh = create_socket_name
-          ("S.gpg-agent.ssh", "gpg-XXXXXX/S.gpg-agent.ssh");
+          (GPG_AGENT_SSH_SOCK_NAME, "gpg-XXXXXX/"GPG_AGENT_SSH_SOCK_NAME);
 
       fd = create_server_socket (socket_name, 0, &socket_nonce);
       if (opt.ssh_support)
@@ -1064,7 +1064,8 @@ main (int argc, char **argv )
       fflush (NULL);
 #ifdef HAVE_W32_SYSTEM
       pid = getpid ();
-      es_printf ("set GPG_AGENT_INFO=%s;%lu;1\n", socket_name, (ulong)pid);
+      es_printf ("set %s=%s;%lu;1\n",
+                 GPG_AGENT_INFO_NAME, socket_name, (ulong)pid);
 #else /*!HAVE_W32_SYSTEM*/
       pid = fork ();
       if (pid == (pid_t)-1)
@@ -1095,8 +1096,8 @@ main (int argc, char **argv )
 #endif /*HAVE_SIGPROCMASK*/
 
           /* Create the info string: <name>:<pid>:<protocol_version> */
-          if (asprintf (&infostr, "GPG_AGENT_INFO=%s:%lu:1",
-                        socket_name, (ulong)pid ) < 0)
+          if (asprintf (&infostr, "%s=%s:%lu:1",
+                        GPG_AGENT_INFO_NAME, socket_name, (ulong)pid ) < 0)
             {
               log_error ("out of core\n");
               kill (pid, SIGTERM);
@@ -1193,7 +1194,7 @@ main (int argc, char **argv )
                 }
               else
                 {
-                  es_printf ( "%s; export GPG_AGENT_INFO;\n", infostr);
+                  es_printf ( "%s; export %s;\n", infostr, GPG_AGENT_INFO_NAME);
 		  if (opt.ssh_support)
 		    {
 		      es_printf ("%s; export SSH_AUTH_SOCK;\n",
@@ -2190,7 +2191,7 @@ check_own_socket (void)
   if (check_own_socket_running || shutdown_pending)
     return;  /* Still running or already shutting down.  */
 
-  sockname = make_filename (opt.homedir, "S.gpg-agent", NULL);
+  sockname = make_filename (opt.homedir, GPG_AGENT_SOCK_NAME, NULL);
   if (!sockname)
     return; /* Out of memory.  */
 
@@ -2219,7 +2220,7 @@ check_for_running_agent (int silent, int mode)
 
   if (!mode)
     {
-      infostr = getenv ("GPG_AGENT_INFO");
+      infostr = getenv (GPG_AGENT_INFO_NAME);
       if (!infostr || !*infostr)
         {
           if (!check_for_running_agent (silent, 1))
@@ -2236,7 +2237,8 @@ check_for_running_agent (int silent, int mode)
           if (!check_for_running_agent (silent, 1))
             return 0; /* Okay, its running on the standard socket. */
           if (!silent)
-            log_error (_("malformed GPG_AGENT_INFO environment variable\n"));
+            log_error (_("malformed %s environment variable\n"),
+                       GPG_AGENT_INFO_NAME);
           return -1;
         }
 
@@ -2258,7 +2260,7 @@ check_for_running_agent (int silent, int mode)
     }
   else /* MODE != 0 */
     {
-      infostr = make_filename (opt.homedir, "S.gpg-agent", NULL);
+      infostr = make_filename (opt.homedir, GPG_AGENT_SOCK_NAME, NULL);
       pid = (pid_t)(-1);
     }
 
diff --git a/agent/preset-passphrase.c b/agent/preset-passphrase.c
index 3f79336..e0cb77e 100644
--- a/agent/preset-passphrase.c
+++ b/agent/preset-passphrase.c
@@ -87,7 +87,7 @@ my_strusage (int level)
   const char *p;
   switch (level)
     {
-    case 11: p = "gpg-preset-passphrase (GnuPG)";
+    case 11: p = "gpg-preset-passphrase (@GNUPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
@@ -245,7 +245,7 @@ main (int argc, char **argv)
 
   /* Tell simple-pwquery about the the standard socket name.  */
   {
-    char *tmp = make_filename (opt_homedir, "S.gpg-agent", NULL);
+    char *tmp = make_filename (opt_homedir, GPG_AGENT_SOCK_NAME, NULL);
     simple_pw_set_socket (tmp);
     xfree (tmp);
   }
diff --git a/agent/protect-tool.c b/agent/protect-tool.c
index faa0e24..5e540cf 100644
--- a/agent/protect-tool.c
+++ b/agent/protect-tool.c
@@ -142,7 +142,7 @@ my_strusage (int level)
   const char *p;
   switch (level)
     {
-    case 11: p = "gpg-protect-tool (GnuPG)";
+    case 11: p = "gpg-protect-tool (" GNUPG_NAME ")";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
diff --git a/agent/w32main.c b/agent/w32main.c
index 06ad726..5ccbb5e 100644
--- a/agent/w32main.c
+++ b/agent/w32main.c
@@ -233,7 +233,7 @@ handle_taskbar (void *ctx)
   nid.hWnd = glob_hwnd;
   nid.uID = 1;
   nid.hIcon = LoadIcon (glob_hinst, MAKEINTRESOURCE (1));
-  mem2str (nid.szTip, "GnuPG Agent version "PACKAGE_VERSION,
+  mem2str (nid.szTip, GPG_AGENT_NAME " version "PACKAGE_VERSION,
            sizeof nid.szTip);
   Shell_NotifyIcon (NIM_ADD, &nid);
   DestroyIcon (nid.hIcon);
diff --git a/common/asshelp.c b/common/asshelp.c
index fe32854..cfbc3ac 100644
--- a/common/asshelp.c
+++ b/common/asshelp.c
@@ -265,9 +265,9 @@ lock_spawning (lock_spawn_t *lock, const char *homedir, const char *name,
 
   *lock = CreateMutexW
     (NULL, FALSE,
-     !strcmp (name, "agent")?   L"GnuPG_spawn_agent_sentinel":
-     !strcmp (name, "dirmngr")? L"GnuPG_spawn_dirmngr_sentinel":
-     /*                    */   L"GnuPG_spawn_unknown_sentinel");
+     !strcmp (name, "agent")?   L"spawn_"GNUPG_NAME"_agent_sentinel":
+     !strcmp (name, "dirmngr")? L"spawn_"GNUPG_NAME"_dirmngr_sentinel":
+     /*                    */   L"spawn_"GNUPG_NAME"_unknown_sentinel");
   if (!*lock)
     {
       log_error ("failed to create the spawn_%s mutex: %s\n",
@@ -378,7 +378,7 @@ start_new_gpg_agent (assuan_context_t *r_ctx,
     }
 
  restart:
-  infostr = force_pipe_server? NULL : getenv ("GPG_AGENT_INFO");
+  infostr = force_pipe_server? NULL : getenv (GPG_AGENT_INFO_NAME);
   if (!infostr || !*infostr)
     {
       char *sockname;
@@ -388,7 +388,7 @@ start_new_gpg_agent (assuan_context_t *r_ctx,
 
       /* First check whether we can connect at the standard
          socket.  */
-      sockname = make_filename (homedir, "S.gpg-agent", NULL);
+      sockname = make_filename (homedir, GPG_AGENT_SOCK_NAME, NULL);
       err = assuan_socket_connect (ctx, sockname, 0, 0);
 
       if (err)
@@ -517,7 +517,8 @@ start_new_gpg_agent (assuan_context_t *r_ctx,
       infostr = xstrdup (infostr);
       if ( !(p = strchr (infostr, PATHSEP_C)) || p == infostr)
         {
-          log_error (_("malformed GPG_AGENT_INFO environment variable\n"));
+          log_error (_("malformed %s environment variable\n"),
+                     GPG_AGENT_INFO_NAME);
           xfree (infostr);
           force_pipe_server = 1;
           goto restart;
diff --git a/common/audit.c b/common/audit.c
index e4522dc..103120a 100644
--- a/common/audit.c
+++ b/common/audit.c
@@ -1187,7 +1187,7 @@ audit_print_result (audit_ctx_t ctx, estream_t out, int use_html)
   clear_helptags (ctx);
 
   if (use_html)
-    es_fputs ("<div class=\"GnuPGAuditLog\">\n", ctx->outstream);
+    es_fputs ("<div class=\"" GNUPG_NAME "AuditLog\">\n", ctx->outstream);
 
   if (!ctx->log || !ctx->logused)
     {
diff --git a/common/gpgrlhelp.c b/common/gpgrlhelp.c
index cc6e9a1..e2fdb9a 100644
--- a/common/gpgrlhelp.c
+++ b/common/gpgrlhelp.c
@@ -92,6 +92,6 @@ gnupg_rl_initialize (void)
                             cleanup_after_signal,
                             readline,
                             add_history);
-  rl_readline_name = "GnuPG";
+  rl_readline_name = GNUPG_NAME;
 #endif
 }
diff --git a/common/homedir.c b/common/homedir.c
index faf9787..682df9a 100644
--- a/common/homedir.c
+++ b/common/homedir.c
@@ -221,7 +221,8 @@ default_homedir (void)
             {
               char *tmp;
 
-              tmp = read_w32_registry_string (NULL, "Software\\GNU\\GnuPG",
+              tmp = read_w32_registry_string (NULL,
+                                              "Software\\GNU\\" GNUPG_NAME,
                                               "HomeDir");
               if (tmp && !*tmp)
                 {
@@ -585,7 +586,7 @@ dirmngr_socket_name (void)
           s1 = s1buf;
         }
 # endif
-      s2 = DIRSEP_S "S.dirmngr";
+      s2 = DIRSEP_S DIRMNGR_SOCK_NAME;
       name = xmalloc (strlen (s1) + strlen (s2) + 1);
       strcpy (stpcpy (name, s1), s2);
       for (p=name; *p; p++)
@@ -594,7 +595,7 @@ dirmngr_socket_name (void)
     }
   return name;
 #else /*!HAVE_W32_SYSTEM*/
-  return GNUPG_LOCALSTATEDIR "/run/" PACKAGE_NAME "/S.dirmngr";
+  return GNUPG_LOCALSTATEDIR "/run/" PACKAGE_NAME "/"DIRMNGR_SOCK_NAME;
 #endif /*!HAVE_W32_SYSTEM*/
 }
 
@@ -639,7 +640,7 @@ gnupg_module_name (int which)
 #ifdef GNUPG_DEFAULT_DIRMNGR
       return GNUPG_DEFAULT_DIRMNGR;
 #else
-      X(bindir, "dirmngr");
+      X(bindir, DIRMNGR_NAME);
 #endif
 
     case GNUPG_MODULE_NAME_PROTECT_TOOL:
diff --git a/common/logging.c b/common/logging.c
index f78df91..e94cdaf 100644
--- a/common/logging.c
+++ b/common/logging.c
@@ -460,7 +460,7 @@ set_file_fd (const char *name, int fd)
     {
       HANDLE hd;
 
-      ActivateDevice (L"Drivers\\GnuPG_Log", 0);
+      ActivateDevice (L"Drivers\\"GNUPG_NAME"_Log", 0);
       /* Ignore a filename and write the debug output to the GPG2:
          device.  */
       hd = CreateFile (L"GPG2:", GENERIC_WRITE,
@@ -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",
+             : read_w32_registry_string (NULL, "Software\\GNU\\"GNUPG_NAME,
                                          "DefaultLogFile"));
       log_set_file (tmp && *tmp? tmp : NULL);
       jnlib_free (tmp);
diff --git a/common/simple-pwquery.c b/common/simple-pwquery.c
index 08f59d2..7dcc057 100644
--- a/common/simple-pwquery.c
+++ b/common/simple-pwquery.c
@@ -329,7 +329,7 @@ agent_open (int *rfd)
   int nread;
 
   *rfd = -1;
-  infostr = getenv ( "GPG_AGENT_INFO" );
+  infostr = getenv (GPG_AGENT_INFO_NAME);
   if ( !infostr || !*infostr )
     infostr = default_gpg_agent_info;
   if ( !infostr || !*infostr )
@@ -349,7 +349,7 @@ agent_open (int *rfd)
        || (p-infostr)+1 >= sizeof client_addr.sun_path )
     {
 #ifdef SPWQ_USE_LOGGING
-      log_error ( _("malformed GPG_AGENT_INFO environment variable\n"));
+      log_error (_("malformed %s environment variable\n"), GPG_AGENT_INFO_NAME);
 #endif
       return SPWQ_NO_AGENT;
     }
diff --git a/dirmngr/dirmngr-client.c b/dirmngr/dirmngr-client.c
index 21f7743..76f4710 100644
--- a/dirmngr/dirmngr-client.c
+++ b/dirmngr/dirmngr-client.c
@@ -140,7 +140,7 @@ my_strusage (int level)
 
   switch(level)
     {
-    case 11: p = "dirmngr-client (GnuPG)";
+    case 11: p = "dirmngr-client (@GNUPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
@@ -440,7 +440,7 @@ start_dirmngr (int only_daemon)
   assuan_context_t ctx;
   int try_default = 0;
 
-  infostr = opt.force_pipe_server? NULL : getenv ("DIRMNGR_INFO");
+  infostr = opt.force_pipe_server? NULL : getenv (DIRMNGR_INFO_NAME);
   if (only_daemon && (!infostr || !*infostr))
     {
       infostr = xstrdup (dirmngr_socket_name ());
@@ -502,7 +502,8 @@ start_dirmngr (int only_daemon)
         {
           if ( !(p = strchr (infostr, ':')) || p == infostr)
             {
-              log_error (_("malformed DIRMNGR_INFO environment variable\n"));
+              log_error (_("malformed %s environment variable\n"),
+                         DIRMNGR_INFO_NAME);
               xfree (infostr);
               if (only_daemon)
                 return NULL;
diff --git a/dirmngr/dirmngr.c b/dirmngr/dirmngr.c
index 58bf948..9f3e2ee 100644
--- a/dirmngr/dirmngr.c
+++ b/dirmngr/dirmngr.c
@@ -287,7 +287,7 @@ my_strusage( int level )
   const char *p;
   switch ( level )
     {
-    case 11: p = "dirmngr (GnuPG)";
+    case 11: p = "@DIRMNGR@ (@GNUPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
@@ -297,10 +297,10 @@ my_strusage( int level )
     case 19: p = _("Please report bugs to <@EMAIL@>.\n"); break;
     case 49: p = PACKAGE_BUGREPORT; break;
     case 1:
-    case 40: p = _("Usage: dirmngr [options] (-h for help)");
+    case 40: p = _("Usage: @DIRMNGR@ [options] (-h for help)");
       break;
-    case 41: p = _("Syntax: dirmngr [options] [command [args]]\n"
-                   "LDAP and OCSP access for GnuPG\n");
+    case 41: p = _("Syntax: @DIRMNGR@ [options] [command [args]]\n"
+                   "LDAP and OCSP access for @GNUPG@\n");
       break;
 
     default: p = NULL;
@@ -387,7 +387,7 @@ set_debug (void)
 static void
 wrong_args (const char *text)
 {
-  es_fputs (_("usage: dirmngr [options] "), es_stderr);
+  es_fprintf (es_stderr, _("usage: %s [options] "), DIRMNGR_NAME);
   es_fputs (text, es_stderr);
   es_putc ('\n', es_stderr);
   dirmngr_exit (2);
@@ -600,7 +600,7 @@ main (int argc, char **argv)
 #endif /*USE_W32_SERVICE*/
 
   set_strusage (my_strusage);
-  log_set_prefix ("dirmngr", 1|4);
+  log_set_prefix (DIRMNGR_NAME, 1|4);
 
   /* Make sure that our subsystems are ready.  */
   i18n_init ();
@@ -719,7 +719,7 @@ main (int argc, char **argv)
     }
 
   if (default_config)
-    configname = make_filename (opt.homedir, "dirmngr.conf", NULL );
+    configname = make_filename (opt.homedir, DIRMNGR_NAME".conf", NULL );
 
   argc = orig_argc;
   argv = orig_argv;
@@ -857,12 +857,12 @@ main (int argc, char **argv)
           log_info (_("NOTE: '%s' is not considered an option\n"), argv[i]);
     }
 
-  if (!access ("/etc/dirmngr", F_OK) && !strncmp (opt.homedir, "/etc/", 5))
+  if (!access ("/etc/"DIRMNGR_NAME, F_OK) && !strncmp (opt.homedir, "/etc/", 5))
     log_info
-      ("NOTE: DirMngr is now a proper part of GnuPG.  The configuration and"
+      ("NOTE: DirMngr is now a proper part of %s.  The configuration and"
        " other directory names changed.  Please check that no other version"
        " of dirmngr is still installed.  To disable this warning, remove the"
-       " directory '/etc/dirmngr'.\n");
+       " directory '/etc/dirmngr'.\n", GNUPG_NAME);
 
   if (gnupg_faked_time_p ())
     {
@@ -1017,7 +1017,8 @@ main (int argc, char **argv)
          start of the dirmngr.  */
 #ifdef HAVE_W32_SYSTEM
       pid = getpid ();
-      es_printf ("set DIRMNGR_INFO=%s;%lu;1\n", socket_name, (ulong) pid);
+      es_printf ("set %s=%s;%lu;1\n",
+                 DIRMNGR_INFO_NAME, socket_name, (ulong) pid);
 #else
       pid = fork();
       if (pid == (pid_t)-1)
@@ -1037,8 +1038,8 @@ main (int argc, char **argv)
           close (fd);
 
           /* Create the info string: <name>:<pid>:<protocol_version> */
-          if (asprintf (&infostr, "DIRMNGR_INFO=%s:%lu:1",
-                        socket_name, (ulong)pid ) < 0)
+          if (asprintf (&infostr, "%s=%s:%lu:1",
+                        DIRMNGR_INFO_NAME, socket_name, (ulong)pid ) < 0)
             {
               log_error (_("out of core\n"));
               kill (pid, SIGTERM);
@@ -1053,7 +1054,7 @@ main (int argc, char **argv)
             }
           else
             {
-              es_printf ( "%s; export DIRMNGR_INFO;\n", infostr);
+              es_printf ( "%s; export %s;\n", infostr, DIRMNGR_INFO_NAME);
             }
           free (infostr);
           exit (0);
diff --git a/dirmngr/dirmngr_ldap.c b/dirmngr/dirmngr_ldap.c
index 1b513ea..4e706d5 100644
--- a/dirmngr/dirmngr_ldap.c
+++ b/dirmngr/dirmngr_ldap.c
@@ -191,7 +191,7 @@ my_strusage (int level)
 
   switch(level)
     {
-    case 11: p = "dirmngr_ldap (GnuPG)";
+    case 11: p = "dirmngr_ldap (@GNUPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
diff --git a/g10/armor.c b/g10/armor.c
index 43ebb2e..9a43389 100644
--- a/g10/armor.c
+++ b/g10/armor.c
@@ -1079,7 +1079,7 @@ armor_filter( void *opaque, int control,
 	    iobuf_writestr(a,afx->eol);
 	    if( !opt.no_version )
 	      {
-		iobuf_writestr(a, "Version: GnuPG v"  VERSION " ("
+		iobuf_writestr(a, "Version: "GNUPG_NAME" v"  VERSION " ("
 			       PRINTABLE_OS_NAME ")" );
 		iobuf_writestr(a,afx->eol);
 	      }
diff --git a/g10/gpg.c b/g10/gpg.c
index 599948f..8e0aed0 100644
--- a/g10/gpg.c
+++ b/g10/gpg.c
@@ -819,7 +819,7 @@ my_strusage( int level )
   const char *p;
 
     switch( level ) {
-      case 11: p = "gpg (GnuPG)";
+      case 11: p = "@GPG@ (@GNUPG@)";
 	break;
       case 13: p = VERSION; break;
       case 17: p = PRINTABLE_OS_NAME; break;
@@ -845,10 +845,10 @@ my_strusage( int level )
 
       case 1:
       case 40:	p =
-	    _("Usage: gpg [options] [files] (-h for help)");
+	    _("Usage: @GPG@ [options] [files] (-h for help)");
 	break;
       case 41:	p =
-	    _("Syntax: gpg [options] [files]\n"
+	    _("Syntax: @GPG@ [options] [files]\n"
 	      "Sign, check, encrypt or decrypt\n"
 	      "Default operation depends on the input data\n");
 	break;
@@ -1833,8 +1833,8 @@ char *
 get_default_configname (void)
 {
   char *configname = NULL;
-  char *name = xstrdup ("gpg" EXTSEP_S "conf-" SAFE_VERSION);
-  char *ver = &name[strlen ("gpg" EXTSEP_S "conf-")];
+  char *name = xstrdup (GPG_NAME EXTSEP_S "conf-" SAFE_VERSION);
+  char *ver = &name[strlen (GPG_NAME EXTSEP_S "conf-")];
 
   do
     {
@@ -1860,7 +1860,7 @@ get_default_configname (void)
   xfree(name);
 
   if (! configname)
-    configname = make_filename (opt.homedir, "gpg" EXTSEP_S "conf", NULL);
+    configname = make_filename (opt.homedir, GPG_NAME EXTSEP_S "conf", NULL);
   if (! access (configname, R_OK))
     {
       /* Print a warning when both config files are present.  */
@@ -1942,12 +1942,12 @@ main (int argc, char **argv)
     /* Please note that we may running SUID(ROOT), so be very CAREFUL
        when adding any stuff between here and the call to
        secmem_init() somewhere after the option parsing. */
-    gnupg_reopen_std ("gpg");
+    gnupg_reopen_std (GPG_NAME);
     trap_unaligned ();
     gnupg_rl_initialize ();
     set_strusage (my_strusage);
     gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
-    log_set_prefix ("gpg", 1);
+    log_set_prefix (GPG_NAME, 1);
 
     /* Make sure that our subsystems are ready.  */
     i18n_init();
@@ -3418,7 +3418,7 @@ main (int argc, char **argv)
         || (cmd != aDeArmor && cmd != aEnArmor && cmd != aGPGConfTest) )
       {
 	if (!nrings || default_keyring)  /* Add default ring. */
-	    keydb_add_resource ("pubring" EXTSEP_S "gpg",
+	    keydb_add_resource ("pubring" EXTSEP_S GPGEXT_GPG,
                                 KEYDB_RESOURCE_FLAG_DEFAULT);
 	for (sl = nrings; sl; sl = sl->next )
           keydb_add_resource (sl->d, sl->flags);
diff --git a/g10/gpgv.c b/g10/gpgv.c
index 5cb9c55..c11d9d3 100644
--- a/g10/gpgv.c
+++ b/g10/gpgv.c
@@ -108,7 +108,7 @@ my_strusage( int level )
 
   switch (level)
     {
-    case 11: p = "gpgv (GnuPG)";
+    case 11: p = "@GPG at v (GnuPG)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
@@ -198,7 +198,7 @@ main( int argc, char **argv )
 
   /* Note: We open all keyrings in read-only mode.  */
   if (!nrings)  /* No keyring given: use default one. */
-    keydb_add_resource ("trustedkeys" EXTSEP_S "gpg",
+    keydb_add_resource ("trustedkeys" EXTSEP_S GPGEXT_GPG,
                         KEYDB_RESOURCE_FLAG_READONLY);
   for (sl = nrings; sl; sl = sl->next)
     keydb_add_resource (sl->d, KEYDB_RESOURCE_FLAG_READONLY);
diff --git a/g10/keygen.c b/g10/keygen.c
index 9c371bd..4bb8bba 100644
--- a/g10/keygen.c
+++ b/g10/keygen.c
@@ -2088,7 +2088,7 @@ ask_curve (void)
         continue;
 
       curves[idx].available = 1;
-      tty_printf (_("   (%d) %s\n"), idx + 1,
+      tty_printf ("   (%d) %s\n", idx + 1,
                   curves[idx].pretty_name?
                   curves[idx].pretty_name:curves[idx].name);
     }
@@ -2337,9 +2337,9 @@ ask_user_id (int mode, KBNODE keyblock)
       {
         /* TRANSLATORS: This is the new string telling the user what
            gpg is now going to do (i.e. ask for the parts of the user
-           ID).  Note that if you do not tyranslated this string, a
+           ID).  Note that if you do not translate this string, a
            different string will be used used, which might still have
-           a correct transaltion.  */
+           a correct translation.  */
 	const char *s1 =
           N_("\n"
              "GnuPG needs to construct a user ID to identify your key.\n"
diff --git a/g10/keyring.c b/g10/keyring.c
index ae02f9d..04f6eeb 100644
--- a/g10/keyring.c
+++ b/g10/keyring.c
@@ -1171,7 +1171,7 @@ create_tmp_file (const char *template,
    * works.  So we replace .gpg by .bak or .tmp
    */
   if (strlen (template) > 4
-      && !strcmp (template+strlen(template)-4, EXTSEP_S "gpg") )
+      && !strcmp (template+strlen(template)-4, EXTSEP_S GPGEXT_GPG) )
     {
       bakfname = xmalloc (strlen (template) + 1);
       strcpy (bakfname, template);
diff --git a/g10/openfile.c b/g10/openfile.c
index 704dcff..119c567 100644
--- a/g10/openfile.c
+++ b/g10/openfile.c
@@ -105,7 +105,7 @@ make_outfile_name( const char *iname )
 	return xstrdup("-");
 
     n = strlen(iname);
-    if( n > 4 && (    !CMP_FILENAME(iname+n-4, EXTSEP_S "gpg")
+    if( n > 4 && (    !CMP_FILENAME(iname+n-4, EXTSEP_S GPGEXT_GPG)
 		   || !CMP_FILENAME(iname+n-4, EXTSEP_S "pgp")
 		   || !CMP_FILENAME(iname+n-4, EXTSEP_S "sig")
 		   || !CMP_FILENAME(iname+n-4, EXTSEP_S "asc") ) ) {
@@ -255,7 +255,8 @@ open_outfile (int inp_fd, const char *iname, int mode, iobuf_t *a)
             {
               buf = xstrconcat (iname,
                                 (mode==1 ? EXTSEP_S "asc" :
-                                 mode==2 ? EXTSEP_S "sig" : EXTSEP_S "gpg"),
+                                 mode==2 ? EXTSEP_S "sig" :
+                                 /*     */ EXTSEP_S GPGEXT_GPG),
                                 NULL);
             }
           name = buf;
@@ -369,7 +370,7 @@ copy_options_file( const char *destdir )
 	xfree(fname);
 	return;
     }
-    strcpy(stpcpy(fname, destdir), DIRSEP_S "gpg" EXTSEP_S "conf" );
+    strcpy(stpcpy(fname, destdir), DIRSEP_S GPGEXT_GPG EXTSEP_S "conf" );
     oldmask=umask(077);
     if ( is_secured_filename (fname) )
       {
diff --git a/g10/server.c b/g10/server.c
index da9c28d..8bf7a08 100644
--- a/g10/server.c
+++ b/g10/server.c
@@ -709,7 +709,7 @@ gpg_server (ctrl_t ctrl)
   if (opt.verbose || opt.debug)
     {
       char *tmp = NULL;
-      const char *s1 = getenv ("GPG_AGENT_INFO");
+      const char *s1 = getenv (GPG_AGENT_INFO_NAME);
 
       tmp = xtryasprintf ("Home: %s\n"
                           "Config: %s\n"
diff --git a/g10/sign.c b/g10/sign.c
index cfac5de..e4d3290 100644
--- a/g10/sign.c
+++ b/g10/sign.c
@@ -1241,7 +1241,8 @@ clearsign_file( const char *fname, strlist_t locusr, const char *outfile )
 
     if( opt.not_dash_escaped )
       iobuf_writestr( out,
-		  "NotDashEscaped: You need GnuPG to verify this message" LF );
+                      "NotDashEscaped: You need "GPG_NAME
+                      " to verify this message" LF );
     iobuf_writestr(out, LF );
 
     if ( gcry_md_open (&textmd, 0, 0) )
diff --git a/g10/tdbio.c b/g10/tdbio.c
index 43e04b7..0a659b1 100644
--- a/g10/tdbio.c
+++ b/g10/tdbio.c
@@ -491,7 +491,7 @@ tdbio_set_dbname( const char *new_dbname, int create )
     }
 
     if(new_dbname==NULL)
-      fname=make_filename(opt.homedir,"trustdb" EXTSEP_S "gpg", NULL);
+      fname=make_filename(opt.homedir,"trustdb" EXTSEP_S GPGEXT_GPG, NULL);
     else if (*new_dbname != DIRSEP_C )
       {
 	if (strchr(new_dbname, DIRSEP_C) )
@@ -1239,7 +1239,7 @@ tdbio_read_record( ulong recnum, TRUSTREC *rec, int expected )
       case 0:  /* unused (free) record */
 	break;
       case RECTYPE_VER: /* version record */
-	if( memcmp(buf+1, "gpg", 3 ) ) {
+	if( memcmp(buf+1, GPGEXT_GPG, 3 ) ) {
 	    log_error( _("%s: not a trustdb file\n"), db_name );
 	    err = gpg_error (GPG_ERR_TRUSTDB);
 	}
@@ -1331,7 +1331,7 @@ tdbio_write_record( TRUSTREC *rec )
       case RECTYPE_VER: /* version record */
 	if( recnum )
 	    BUG();
-	memcpy(p-1, "gpg", 3 ); p += 2;
+	memcpy(p-1, GPGEXT_GPG, 3 ); p += 2;
 	*p++ = rec->r.ver.version;
 	*p++ = rec->r.ver.marginals;
 	*p++ = rec->r.ver.completes;
diff --git a/g13/g13.c b/g13/g13.c
index fca9e7a..8682114 100644
--- a/g13/g13.c
+++ b/g13/g13.c
@@ -212,17 +212,17 @@ my_strusage( int level )
 
   switch (level)
     {
-    case 11: p = "g13 (GnuPG)";
+    case 11: p = "@G13@ (@GNUPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
     case 19: p = _("Please report bugs to <" PACKAGE_BUGREPORT ">.\n");
       break;
     case 1:
-    case 40: p = _("Usage: g13 [options] [files] (-h for help)");
+    case 40: p = _("Usage: @G13@ [options] [files] (-h for help)");
       break;
     case 41:
-      p = _("Syntax: g13 [options] [files]\n"
+      p = _("Syntax: @G13@ [options] [files]\n"
             "Create, mount or unmount an encrypted file system container\n");
       break;
 
@@ -238,7 +238,7 @@ my_strusage( int level )
 static void
 wrong_args (const char *text)
 {
-  fputs (_("usage: g13 [options] "), stderr);
+  fprintf (stderr, _("usage: %s [options] "), G13_NAME);
   fputs (text, stderr);
   putc ('\n', stderr);
   g13_exit (2);
@@ -344,11 +344,11 @@ main ( int argc, char **argv)
 
   /*mtrace();*/
 
-  gnupg_reopen_std ("g13");
+  gnupg_reopen_std (G13_NAME);
   set_strusage (my_strusage);
   gcry_control (GCRYCTL_SUSPEND_SECMEM_WARN);
 
-  log_set_prefix ("g13", 1);
+  log_set_prefix (G13_NAME, 1);
 
   /* Make sure that our subsystems are ready.  */
   i18n_init ();
@@ -430,7 +430,7 @@ main ( int argc, char **argv)
 
   /* Set the default option file */
   if (default_config )
-    configname = make_filename (opt.homedir, "g13.conf", NULL);
+    configname = make_filename (opt.homedir, G13_NAME".conf", NULL);
 
   argc        = orig_argc;
   argv        = orig_argv;
@@ -577,7 +577,7 @@ main ( int argc, char **argv)
   configname = NULL;
 
   if (!opt.config_filename)
-    opt.config_filename = make_filename (opt.homedir, "g13.conf", NULL);
+    opt.config_filename = make_filename (opt.homedir, G13_NAME".conf", NULL);
 
   if (log_get_errorcount(0))
     g13_exit(2);
diff --git a/g13/server.c b/g13/server.c
index 31c961d..573f670 100644
--- a/g13/server.c
+++ b/g13/server.c
@@ -612,7 +612,7 @@ g13_server (ctrl_t ctrl)
   if (opt.verbose || opt.debug)
     {
       char *tmp = NULL;
-      const char *s1 = getenv ("GPG_AGENT_INFO");
+      const char *s1 = getenv (GPG_AGENT_INFO_NAME);
 
       tmp = xtryasprintf ("Home: %s\n"
                           "Config: %s\n"
diff --git a/kbx/kbxutil.c b/kbx/kbxutil.c
index 8b2b900..b0225e9 100644
--- a/kbx/kbxutil.c
+++ b/kbx/kbxutil.c
@@ -106,7 +106,7 @@ my_strusage( int level )
 {
     const char *p;
     switch( level ) {
-      case 11: p = "kbxutil (GnuPG)";
+      case 11: p = "kbxutil (@GNUPG@)";
 	break;
       case 13: p = VERSION; break;
       case 17: p = PRINTABLE_OS_NAME; break;
diff --git a/keyserver/curl-shim.h b/keyserver/curl-shim.h
index e37d816..0a11e7c 100644
--- a/keyserver/curl-shim.h
+++ b/keyserver/curl-shim.h
@@ -82,7 +82,7 @@ typedef struct
 typedef struct
 {
   const char **protocols;
-} curl_version_info_data; 
+} curl_version_info_data;
 
 #define CURL_ERROR_SIZE 256
 #define CURL_GLOBAL_DEFAULT 0
@@ -96,7 +96,7 @@ CURLcode curl_easy_perform(CURL *curl);
 void curl_easy_cleanup(CURL *curl);
 char *curl_escape(char *str,int len);
 #define curl_free(x) free(x)
-#define curl_version() "GnuPG curl-shim"
+#define curl_version() GNUPG_NAME" curl-shim"
 curl_version_info_data *curl_version_info(int type);
 
 struct curl_slist
diff --git a/keyserver/gpgkeys_curl.c b/keyserver/gpgkeys_curl.c
index 7a4ec52..fc4c6f3 100644
--- a/keyserver/gpgkeys_curl.c
+++ b/keyserver/gpgkeys_curl.c
@@ -99,7 +99,7 @@ get_key(char *getkey)
   return curl_err_to_gpg_err(res);
 }
 
-static void 
+static void
 show_help (FILE *fp)
 {
   fprintf (fp,"-h, --help\thelp\n");
@@ -124,7 +124,7 @@ main(int argc,char *argv[])
   /* Kludge to implement standard GNU options.  */
   if (argc > 1 && !strcmp (argv[1], "--version"))
     {
-      printf ("gpgkeys_curl (GnuPG) %s\n", VERSION);
+      printf ("gpgkeys_curl (%s) %s\n", GNUPG_NAME, VERSION);
       printf ("Uses: %s\n", curl_version());
       return 0;
     }
diff --git a/keyserver/gpgkeys_finger.c b/keyserver/gpgkeys_finger.c
index b3bbf34..673e956 100644
--- a/keyserver/gpgkeys_finger.c
+++ b/keyserver/gpgkeys_finger.c
@@ -337,7 +337,7 @@ main(int argc,char *argv[])
   /* Kludge to implement standard GNU options.  */
   if (argc > 1 && !strcmp (argv[1], "--version"))
     {
-      fputs ("gpgkeys_finger (GnuPG) " VERSION"\n", stdout);
+      fputs ("gpgkeys_finger ("GNUPG_NAME") " VERSION"\n", stdout);
       return 0;
     }
   else if (argc > 1 && !strcmp (argv[1], "--help"))
diff --git a/keyserver/gpgkeys_hkp.c b/keyserver/gpgkeys_hkp.c
index d96199f..6ecc8bb 100644
--- a/keyserver/gpgkeys_hkp.c
+++ b/keyserver/gpgkeys_hkp.c
@@ -354,7 +354,7 @@ get_name(const char *getkey)
       ret=KEYSERVER_NO_MEMORY;
       goto fail;
     }
-  
+
   fprintf(output,"NAME %s BEGIN\n",getkey);
 
   if(opt->verbose>2)
@@ -546,7 +546,7 @@ srv_replace(const char *srvtag)
 }
 #endif
 
-static void 
+static void
 show_help (FILE *fp)
 {
   fprintf (fp,"-h, --help\thelp\n");
@@ -570,7 +570,7 @@ main(int argc,char *argv[])
   /* Kludge to implement standard GNU options.  */
   if (argc > 1 && !strcmp (argv[1], "--version"))
     {
-      printf ("gpgkeys_hkp (GnuPG) %s\n", VERSION);
+      printf ("gpgkeys_hkp (%s) %s\n", GNUPG_NAME, VERSION);
       printf ("Uses: %s\n", curl_version());
       return 0;
     }
@@ -743,7 +743,7 @@ main(int argc,char *argv[])
       /* We're using libcurl, so fake SRV support via our wrapper.
 	 This isn't as good as true SRV support, as we do not try all
 	 possible targets at one particular level and work our way
-	 down the list, but it's better than nothing. */      
+	 down the list, but it's better than nothing. */
       srv_replace(srvtag);
 #else
       /* We're using our internal curl shim, so we can use its (true)
diff --git a/keyserver/gpgkeys_kdns.c b/keyserver/gpgkeys_kdns.c
index 12161d1..14651f9 100644
--- a/keyserver/gpgkeys_kdns.c
+++ b/keyserver/gpgkeys_kdns.c
@@ -115,9 +115,9 @@ get_key (adns_state adns_ctx, char *address)
       ret = KEYSERVER_KEY_NOT_FOUND;
       goto leave;
     }
-  if (answer->status != adns_s_ok) 
+  if (answer->status != adns_s_ok)
     {
-      fprintf (console, PGM": DNS query returned: %s (%s)\n", 
+      fprintf (console, PGM": DNS query returned: %s (%s)\n",
                adns_strerror (answer->status),
                adns_errabbrev (answer->status));
       ret = KEYSERVER_KEY_NOT_FOUND;
@@ -141,7 +141,7 @@ get_key (adns_state adns_ctx, char *address)
     }
   if ( datalen < 5 )
     {
-      fprintf (console, PGM": error: truncated CERT record\n"); 
+      fprintf (console, PGM": error: truncated CERT record\n");
       ret = KEYSERVER_KEY_NOT_FOUND;
       goto leave;
     }
@@ -155,7 +155,7 @@ get_key (adns_state adns_ctx, char *address)
       if ( datalen < 11 )
         {
           /* Gpg checks for a minium length of 11, thus we do the same.  */
-          fprintf (console, PGM": error: OpenPGP data to short\n"); 
+          fprintf (console, PGM": error: OpenPGP data to short\n");
           ret = KEYSERVER_KEY_NOT_FOUND;
           goto leave;
         }
@@ -166,11 +166,11 @@ get_key (adns_state adns_ctx, char *address)
       break;
 
     default:
-      fprintf (console, PGM": CERT type %d ignored\n", (data[0] <<8|data[1])); 
+      fprintf (console, PGM": CERT type %d ignored\n", (data[0] <<8|data[1]));
       ret = KEYSERVER_KEY_NOT_FOUND;
       goto leave;
     }
-  
+
   ret = 0; /* All fine.  */
 
  leave:
@@ -178,17 +178,17 @@ get_key (adns_state adns_ctx, char *address)
     fprintf (output, "\nNAME %s FAILED %d\n", address, ret);
   else
     fprintf (output, "\nNAME %s END\n", address);
-  adns_free (answer); 
+  adns_free (answer);
   xfree (name);
   return ret;
 }
 
 
 /* Print some help.  */
-static void 
+static void
 show_help (FILE *fp)
 {
-  fputs (PGM" (GnuPG) " VERSION"\n\n", fp);
+  fputs (PGM" ("GNUPG_NAME") " VERSION"\n\n", fp);
   fputs (" -h\thelp\n"
          " -V\tversion\n"
          " -o\toutput to this file\n"
@@ -233,7 +233,7 @@ main (int argc, char *argv[])
   /* Kludge to implement standard GNU options.  */
   if (argc > 1 && !strcmp (argv[1], "--version"))
     {
-      fputs (PGM" (GnuPG) " VERSION"\n", stdout);
+      fputs (PGM" ("GNUPG_NAME") " VERSION"\n", stdout);
       return 0;
     }
   else if (argc > 1 && !strcmp (argv[1], "--help"))
@@ -283,7 +283,7 @@ main (int argc, char *argv[])
 
   if (!output)
     output = stdout;
-  
+
   opt = init_ks_options();
   if(!opt)
     return KEYSERVER_NO_MEMORY;
@@ -292,10 +292,10 @@ main (int argc, char *argv[])
   while ( fgets(line,MAX_LINE,input) )
     {
       int err;
-      
+
       if(line[0]=='\n')
 	break;
-      
+
       err = parse_ks_options (line, opt);
       if (err > 0)
 	{
@@ -326,7 +326,7 @@ main (int argc, char *argv[])
       if (p)
         {
           *p++ = 0;
-          do 
+          do
             {
               pend = strchr (p, '&');
               if (pend)
@@ -371,7 +371,7 @@ main (int argc, char *argv[])
                strerror (errno));
       goto leave;
     }
-  
+
   if (opt->action == KS_GETNAME)
     {
       while ( fgets (line,MAX_LINE,input) )
@@ -379,11 +379,11 @@ main (int argc, char *argv[])
           if (line[0]=='\n' || !line[0] )
             break;
           line[strlen(line)-1] = 0;  /* Trim the trailing LF. */
-          
+
           akey = xtrymalloc (sizeof *akey);
           if (!akey)
             {
-              fprintf (console, 
+              fprintf (console,
                        PGM": out of memory while building key list\n");
               ret = KEYSERVER_NO_MEMORY;
               goto leave;
@@ -402,7 +402,7 @@ main (int argc, char *argv[])
                "key retrieval by name\n");
       goto leave;
     }
-  
+
   /* Send the response */
   fprintf (output, "VERSION %d\n", KEYSERVER_PROTO_VERSION);
   fprintf (output, "PROGRAM %s\n\n", VERSION);
@@ -413,13 +413,13 @@ main (int argc, char *argv[])
         fprintf (console, "User:\t\t%s\n", opt->opaque);
       fprintf (console, "Command:\tGET\n");
     }
-  
+
   for (akey = keylist; akey; akey = akey->next)
     {
       set_timeout (opt->timeout);
       if ( get_key (adns_ctx, akey->str) )
         failed++;
-    }      
+    }
   if (!failed)
     ret = KEYSERVER_OK;
 
diff --git a/keyserver/gpgkeys_ldap.c b/keyserver/gpgkeys_ldap.c
index 21ad8f7..f24a571 100644
--- a/keyserver/gpgkeys_ldap.c
+++ b/keyserver/gpgkeys_ldap.c
@@ -455,7 +455,7 @@ build_attrs(LDAPMod ***modlist,char *line)
 	  case 'R':
 	    revoked=1;
 	    break;
-	    
+
 	  case 'd':
 	  case 'D':
 	    disabled=1;
@@ -1037,7 +1037,7 @@ get_key(char *getkey)
   else
     {
       /* short key id */
-    
+
       sprintf(search,"(pgpkeyid=%.8s)",getkey);
     }
 
@@ -1767,12 +1767,12 @@ find_basekeyspacedn(void)
 	}
 
       ldap_msgfree(si_res);
-    }   
+    }
 
   return LDAP_SUCCESS;
 }
 
-static void 
+static void
 show_help (FILE *fp)
 {
   fprintf (fp,"-h, --help\thelp\n");
@@ -1794,7 +1794,7 @@ main(int argc,char *argv[])
   /* Kludge to implement standard GNU options.  */
   if (argc > 1 && !strcmp (argv[1], "--version"))
     {
-      fputs ("gpgkeys_ldap (GnuPG) " VERSION"\n", stdout);
+      fputs ("gpgkeys_ldap ("GNUPG_NAME") " VERSION"\n", stdout);
       return 0;
     }
   else if (argc > 1 && !strcmp (argv[1], "--help"))
diff --git a/po/de.po b/po/de.po
index 4a92b96..da0f13c 100644
--- a/po/de.po
+++ b/po/de.po
@@ -9,7 +9,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: gnupg-2.1.0\n"
 "Report-Msgid-Bugs-To: translations at gnupg.org\n"
-"PO-Revision-Date: 2012-08-24 10:19+0200\n"
+"PO-Revision-Date: 2013-11-18 14:05+0100\n"
 "Last-Translator: Werner Koch <wk at gnupg.org>\n"
 "Language-Team: German <de at li.org>\n"
 "Language: de\n"
@@ -99,14 +99,12 @@ msgstr "Passphrase"
 msgid "ssh keys greater than %d bits are not supported\n"
 msgstr "SSH Schlüssel von mehr als %d Bits werden nicht unterstützt\n"
 
-#, fuzzy, c-format
-#| msgid "can't create '%s': %s\n"
-msgid "can't create `%s': %s\n"
+#, c-format
+msgid "can't create '%s': %s\n"
 msgstr "'%s' kann nicht erzeugt werden: %s\n"
 
-#, fuzzy, c-format
-#| msgid "can't open '%s': %s\n"
-msgid "can't open `%s': %s\n"
+#, c-format
+msgid "can't open '%s': %s\n"
 msgstr "'%s' kann nicht geöffnet werden: %s\n"
 
 #, c-format
@@ -191,8 +189,7 @@ msgstr "PUK"
 msgid "Reset Code"
 msgstr "Rückstellcode"
 
-#, fuzzy, c-format
-#| msgid "%s%%0A%%0AUse the reader's keypad for input."
+#, c-format
 msgid "%s%%0A%%0AUse the reader's pinpad for input."
 msgstr "%s%%0A%%0AZur Eingabe die Tastatur des Kartenlesers verwenden."
 
@@ -377,15 +374,15 @@ msgstr ""
 "Berichte über Programmfehler bitte in englisch an <@EMAIL@>.\n"
 "Sinn- oder Schreibfehler in den deutschen Texten bitte an <de at li.org>.\n"
 
-msgid "Usage: gpg-agent [options] (-h for help)"
-msgstr "Aufruf: gpg-agent [Optionen] (-h für Hilfe)"
+msgid "Usage: @GPG_AGENT@ [options] (-h for help)"
+msgstr "Gebrauch: @GPG_AGENT@ [Optionen] [Kommando [Argumente]]"
 
 msgid ""
-"Syntax: gpg-agent [options] [command [args]]\n"
-"Secret key management for GnuPG\n"
+"Syntax: @GPG_AGENT@ [options] [command [args]]\n"
+"Secret key management for @GNUPG@\n"
 msgstr ""
-"Syntax: gpg-agent [Optionen] [Befehl [Argumente]]\n"
-"Verwaltung von geheimen Schlüsseln für GnuPG\n"
+"Syntax: @GPG_AGENT@ [Optionen] [Befehl [Argumente]]\n"
+"Verwaltung von geheimen Schlüsseln für @GNUPG@\n"
 
 #, c-format
 msgid "invalid debug-level '%s' given\n"
@@ -491,8 +488,9 @@ msgstr "%s %s angehalten\n"
 msgid "no gpg-agent running in this session\n"
 msgstr "Der gpg-agent läuft nicht für diese Session\n"
 
-msgid "malformed GPG_AGENT_INFO environment variable\n"
-msgstr "fehlerhaft aufgebaute GPG_AGENT_INFO - Umgebungsvariable\n"
+#, c-format
+msgid "malformed %s environment variable\n"
+msgstr "Fehlerhafte %s Variable\n"
 
 #, c-format
 msgid "gpg-agent protocol version %d is not supported\n"
@@ -970,10 +968,6 @@ msgstr "Dirmngr benutzbar"
 msgid "No help available for '%s'."
 msgstr "Keine Hilfe für '%s' vorhanden."
 
-#, c-format
-msgid "can't open '%s': %s\n"
-msgstr "'%s' kann nicht geöffnet werden: %s\n"
-
 msgid "ignoring garbage line"
 msgstr "Zeile mit nicht identifizierten Zeichen wird ignoriert"
 
@@ -1064,10 +1058,6 @@ msgid "error writing to '%s': %s\n"
 msgstr "Fehler beim Schreiben von %s: %s\n"
 
 #, c-format
-msgid "can't create '%s': %s\n"
-msgstr "'%s' kann nicht erzeugt werden: %s\n"
-
-#, c-format
 msgid "removing stale lockfile (created by %d)\n"
 msgstr "eine übriggebliebene Sperrdatei wird entfernt (erzeugt von %d)\n"
 
@@ -1173,10 +1163,8 @@ msgstr "nicht als Klartext darstellbar"
 msgid "failed to proxy %s inquiry to client\n"
 msgstr "Die %s \"inquiry\" konnte nicht an den Client weitergeleitet werden\n"
 
-#, fuzzy
-#| msgid "Enter passphrase\n"
 msgid "Enter passphrase: "
-msgstr "Geben Sie die Passphrase ein\n"
+msgstr "Geben Sie die Passphrase ein: "
 
 #, c-format
 msgid "OpenPGP card not available: %s\n"
@@ -1384,10 +1372,9 @@ msgstr "Ungültige Auswahl.\n"
 msgid "Please select where to store the key:\n"
 msgstr "Wählen Sie den Speicherort für den Schlüssel:\n"
 
-#, fuzzy, c-format
-#| msgid "read failed: %s\n"
+#, c-format
 msgid "KEYTOCARD failed: %s\n"
-msgstr "Lesen schlug fehl: %s\n"
+msgstr "Das KEYTOCARD Kommando schlug fehl: %s\n"
 
 msgid "quit this menu"
 msgstr "Menü verlassen"
@@ -1838,15 +1825,15 @@ msgstr ""
 " --list-keys [Namen]        Schlüssel anzeigen\n"
 " --fingerprint [Namen]      \"Fingerabdrücke\" anzeigen\n"
 
-msgid "Usage: gpg [options] [files] (-h for help)"
-msgstr "Aufruf: gpg [Optionen] [Dateien] (-h für Hilfe)"
+msgid "Usage: @GPG@ [options] [files] (-h for help)"
+msgstr "Aufruf: @GPG@ [Optionen] [Dateien] (-h für Hilfe)"
 
 msgid ""
-"Syntax: gpg [options] [files]\n"
+"Syntax: @GPG@ [options] [files]\n"
 "Sign, check, encrypt or decrypt\n"
 "Default operation depends on the input data\n"
 msgstr ""
-"Aufruf: gpg [Optionen] [Dateien]\n"
+"Aufruf: @GPG@ [Optionen] [Dateien]\n"
 "Signieren, prüfen, verschlüsseln, entschlüsseln.\n"
 "Die voreingestellte Operation ist abhängig von den Eingabedaten\n"
 
@@ -1995,10 +1982,9 @@ msgstr "Hinweis: %s ist nicht für den üblichen Gebrauch gedacht!\n"
 msgid "'%s' is not a valid signature expiration\n"
 msgstr "`%s' ist kein gültiges Signaturablaufdatum\n"
 
-#, fuzzy, c-format
-#| msgid "Invalid subject name '%s'\n"
+#, c-format
 msgid "invalid pinentry mode '%s'\n"
-msgstr "Ungültiger Subjekt-Name `%s'\n"
+msgstr "Ungültiger Subjekt-Name '%s'\n"
 
 #, c-format
 msgid "'%s' is not a valid character set\n"
@@ -3678,6 +3664,9 @@ msgstr "Die verlangte Schlüssellänge beträgt %u Bit\n"
 msgid "rounded to %u bits\n"
 msgstr "gerundet auf %u Bit\n"
 
+msgid "Please select which elliptic curve you want:\n"
+msgstr "Bitte wählen Sie, welche elliptische Kurve Sie möchten:\n"
+
 msgid ""
 "Please specify how long the key should be valid.\n"
 "         0 = key does not expire\n"
@@ -5433,6 +5422,9 @@ msgstr "Die Antwort enthält das RSA-Modulus nicht\n"
 msgid "response does not contain the RSA public exponent\n"
 msgstr "Antwort enthält den öffentlichen RSA-Exponenten nicht\n"
 
+msgid "response does not contain the EC public point\n"
+msgstr "Der öffentlichen EC Punkt fehlt in der Antwort\n"
+
 #, c-format
 msgid "using default PIN as %s\n"
 msgstr "Die Standard PIN wird für %s benutzt\n"
@@ -5568,8 +5560,6 @@ msgstr ""
 msgid "can't access %s - invalid OpenPGP card?\n"
 msgstr "Kann auf %s nicht zugreifen - ungültige OpenPGP-Karte?\n"
 
-#, fuzzy
-#| msgid "||Please enter your PIN at the reader's keypad"
 msgid "||Please enter your PIN at the reader's pinpad"
 msgstr "||Bitte die PIN auf der Tastatur des Kartenlesers eingeben"
 
@@ -5603,8 +5593,6 @@ msgstr "Den internen CCID Treiber nicht benutzen"
 msgid "|N|disconnect the card after N seconds of inactivity"
 msgstr "|N|Schalte die Karte nach N Sekunden Inaktivität ab"
 
-#, fuzzy
-#| msgid "do not use a reader's keypad"
 msgid "do not use a reader's pinpad"
 msgstr "Die Tastatur des Kartenlesers nicht benutzen"
 
@@ -5612,17 +5600,17 @@ msgid "deny the use of admin card commands"
 msgstr "Verweigere die Benutzung von \"Admin\"-Befehlen"
 
 msgid "use variable length input for pinpad"
-msgstr ""
+msgstr "Variable Längeneingabe für die Kartenlesertastatur benutzen"
 
-msgid "Usage: scdaemon [options] (-h for help)"
-msgstr "Aufruf: scdaemon [Optionen] (-h für Hilfe)"
+msgid "Usage: @SCDAEMON@ [options] (-h for help)"
+msgstr "Gebrauch: @SCDAEMON@ [Optionen] (-h für Hilfe)"
 
 msgid ""
 "Syntax: scdaemon [options] [command [args]]\n"
-"Smartcard daemon for GnuPG\n"
+"Smartcard daemon for @GNUPG@\n"
 msgstr ""
-"Syntax: scdaemon [Optionen] [Befehl [Argumente]]\n"
-"Smartcard Daemon für GnuPG\n"
+"Syntax: @SCDAEMON@ [Optionen] [Befehl [Argumente]]\n"
+"Smartcard Daemon für @GNUPG@\n"
 
 msgid "please use the option '--daemon' to run the program in the background\n"
 msgstr ""
@@ -6186,15 +6174,15 @@ msgstr "|NAME|Verschlüsselungsverfahren NAME benutzen"
 msgid "|NAME|use message digest algorithm NAME"
 msgstr "|NAME|Hashverfahren NAME benutzen"
 
-msgid "Usage: gpgsm [options] [files] (-h for help)"
-msgstr "Aufruf: gpgsm [Optionen] [Dateien] (-h für Hilfe)"
+msgid "Usage: @GPGSM@ [options] [files] (-h for help)"
+msgstr "Aufruf: @GPGSM@ [Optionen] [Dateien] (-h für Hilfe)"
 
 msgid ""
-"Syntax: gpgsm [options] [files]\n"
+"Syntax: @GPGSM@ [options] [files]\n"
 "Sign, check, encrypt or decrypt using the S/MIME protocol\n"
 "Default operation depends on the input data\n"
 msgstr ""
-"Syntax: gpgsm [Optionen] [Dateien]\n"
+"Syntax: @GPGSM@ [Optionen] [Dateien]\n"
 "Signieren, prüfen, ver- und entschlüsseln mittels S/MIME Protokoll\n"
 
 msgid "usage: gpgsm [options] "
@@ -7002,9 +6990,6 @@ msgstr "Offensichtlich ist kein Dirmngr vorhanden\n"
 msgid "no running dirmngr - starting one\n"
 msgstr "Dirmngr läuft nicht - ein neuer wird gestartet\n"
 
-msgid "malformed DIRMNGR_INFO environment variable\n"
-msgstr "Fehlerhafte DIRMNGR_INFO Variable\n"
-
 #, c-format
 msgid "dirmngr protocol version %d is not supported\n"
 msgstr "Dirmngr Protocol Version %d wird nicht unterstützt\n"
@@ -7108,22 +7093,23 @@ msgstr ""
 "(Im \"info\"-Handbuch findet sich eine vollständige Liste aller Kommandos "
 "und Optionen)\n"
 
-msgid "Usage: dirmngr [options] (-h for help)"
-msgstr "Gebrauch: dirmnr [Optionen] [Kommando [Argumente]]"
+msgid "Usage: @DIRMNGR@ [options] (-h for help)"
+msgstr "Gebrauch: @DIRMNGR@ [Optionen]"
 
 msgid ""
-"Syntax: dirmngr [options] [command [args]]\n"
-"LDAP and OCSP access for GnuPG\n"
+"Syntax: @DIRMNGR@ [options] [command [args]]\n"
+"LDAP and OCSP access for @GNUPG@\n"
 msgstr ""
-"Syntax: dirmngr [Optionen] [Kommando [Argumente]]\n"
-"LDAP und OCSP Zugriff für GnuPG\n"
+"Syntax: @DIRMNGR@ [Optionen] [Kommando [Argumente]]\n"
+"LDAP und OCSP Zugriff für @GNUPG@\n"
 
 #, c-format
 msgid "valid debug levels are: %s\n"
 msgstr "Gültige Debugebenen sind: %s\n"
 
-msgid "usage: dirmngr [options] "
-msgstr "Gebrauch: dirmngr [Optionen] "
+#, c-format
+msgid "usage: %s [options] "
+msgstr "Aufruf: %s [Optionen] "
 
 msgid "colons are not allowed in the socket name\n"
 msgstr "Doppelpunkte sind im Namen des Sockets nicht erlaubt\n"
@@ -7619,14 +7605,14 @@ msgstr "|DATEI|Beim Starten Kommandos aus DATEI lesen"
 msgid "run /subst on startup"
 msgstr "Nach dem Starten \"/subst\" ausführen"
 
-msgid "Usage: gpg-connect-agent [options] (-h for help)"
-msgstr "Aufruf: gpg-connect-agent [Optionen] (-h für Hilfe)"
+msgid "Usage: @GPG at -connect-agent [options] (-h for help)"
+msgstr "Aufruf: @GPG at -connect-agent [Optionen] (-h für Hilfe)"
 
 msgid ""
-"Syntax: gpg-connect-agent [options]\n"
+"Syntax: @GPG at -connect-agent [options]\n"
 "Connect to a running agent and send commands\n"
 msgstr ""
-"Syntax: gpg-connect-agent [Optionen]\n"
+"Syntax: @GPG at -connect-agent [Optionen]\n"
 "Mit einem laufenden Agenten verbinden und Befehle senden\n"
 
 #, c-format
@@ -7818,15 +7804,15 @@ msgstr "Als Ausgabedatei benutzen"
 msgid "activate changes at runtime, if possible"
 msgstr "Aktiviere Änderungen zur Laufzeit; falls möglich"
 
-msgid "Usage: gpgconf [options] (-h for help)"
-msgstr "Aufruf: gpgconf [Optionen] (-h für Hilfe)"
+msgid "Usage: @GPGCONF@ [options] (-h for help)"
+msgstr "Gebrauch: @GPGCONF@ [Optionen] (-h für Hilfe)"
 
 msgid ""
-"Syntax: gpgconf [options]\n"
-"Manage configuration options for tools of the GnuPG system\n"
+"Syntax: @GPGCONF@ [options]\n"
+"Manage configuration options for tools of the @GNUPG@ system\n"
 msgstr ""
-"Syntax: gpgconf {Optionen]\n"
-"Verwalte Konfigurationsoptionen für Programme des GnuPG Systems\n"
+"Syntax: @GPGCONF@ {Optionen]\n"
+"Verwalte Konfigurationsoptionen für Programme des @GNUPG@ Systems\n"
 
 msgid "usage: gpgconf [options] "
 msgstr "Aufruf: gpgconf [Optionen] "
@@ -7984,6 +7970,40 @@ msgstr ""
 "Syntax: gpg-check-pattern [optionen] Musterdatei\n"
 "Die von stdin gelesene Passphrase gegen die Musterdatei prüfen\n"
 
+#~ msgid "Usage: scdaemon [options] (-h for help)"
+#~ msgstr "Aufruf: scdaemon [Optionen] (-h für Hilfe)"
+
+#~ msgid "malformed GPG_AGENT_INFO environment variable\n"
+#~ msgstr "fehlerhaft aufgebaute GPG_AGENT_INFO - Umgebungsvariable\n"
+
+#~ msgid "   (%d) %s\n"
+#~ msgstr "   (%d) signieren\n"
+
+#~ msgid "Usage: gpgsm [options] [files] (-h for help)"
+#~ msgstr "Aufruf: gpgsm [Optionen] [Dateien] (-h für Hilfe)"
+
+#~ msgid "Usage: dirmngr [options] (-h for help)"
+#~ msgstr "Gebrauch: dirmnr [Optionen] [Kommando [Argumente]]"
+
+#~ msgid "usage: dirmngr [options] "
+#~ msgstr "Gebrauch: dirmngr [Optionen] "
+
+#~ msgid "Usage: gpgconf [options] (-h for help)"
+#~ msgstr "Aufruf: gpgconf [Optionen] (-h für Hilfe)"
+
+#~ msgid "Usage: gpg-agent [options] (-h for help)"
+#~ msgstr "Aufruf: gpg-agent [Optionen] (-h für Hilfe)"
+
+#, fuzzy
+#~| msgid "can't create '%s': %s\n"
+#~ msgid "can't create `%s': %s\n"
+#~ msgstr "'%s' kann nicht erzeugt werden: %s\n"
+
+#, fuzzy
+#~| msgid "can't open '%s': %s\n"
+#~ msgid "can't open `%s': %s\n"
+#~ msgstr "'%s' kann nicht geöffnet werden: %s\n"
+
 #~ msgid "too many entries in pk cache - disabled\n"
 #~ msgstr "zu viele Einträge im pk-Cache - abgeschaltet\n"
 
diff --git a/scd/apdu.c b/scd/apdu.c
index dd45e99..ffc727c 100644
--- a/scd/apdu.c
+++ b/scd/apdu.c
@@ -1833,7 +1833,7 @@ pcsc_vendor_specific_init (int slot)
       reader_table[slot].is_spr532 = 1;
       reader_table[slot].pinpad_varlen_supported = 1;
     }
-  else if (vendor == 0x046a && product == 0x003e  /* Cherry ST-2xxx */
+  else if ((vendor == 0x046a && product == 0x003e)  /* Cherry ST-2xxx */
            || vendor == 0x0c4b /* Tested with Reiner cyberJack GO */
            || vendor == 0x1a44 /* Tested with Vasco DIGIPASS 920 */
            || vendor == 0x234b /* Tested with FSIJ Gnuk Token */
diff --git a/scd/pcsc-wrapper.c b/scd/pcsc-wrapper.c
index 86e4afb..f39a5dd 100644
--- a/scd/pcsc-wrapper.c
+++ b/scd/pcsc-wrapper.c
@@ -53,7 +53,7 @@
 
 /* Allow for a standalone build. */
 #ifdef VERSION
-#define MYVERSION_LINE PGM " (GnuPG) " VERSION
+#define MYVERSION_LINE PGM " ("GNUPG_NAME") " VERSION
 #define BUGREPORT_LINE "\nReport bugs to <bug-gnupg at gnu.org>.\n"
 #else
 #define MYVERSION_LINE PGM
diff --git a/scd/scdaemon.c b/scd/scdaemon.c
index 4f9b369..daa4eea 100644
--- a/scd/scdaemon.c
+++ b/scd/scdaemon.c
@@ -243,7 +243,7 @@ my_strusage (int level)
 
   switch (level)
     {
-    case 11: p = "scdaemon (GnuPG)";
+    case 11: p = "@SCDAEMON@ (@GNUPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
@@ -260,10 +260,10 @@ my_strusage (int level)
       p = ver_ksba;
       break;
     case 1:
-    case 40: p =  _("Usage: scdaemon [options] (-h for help)");
+    case 40: p =  _("Usage: @SCDAEMON@ [options] (-h for help)");
       break;
     case 41: p =  _("Syntax: scdaemon [options] [command [args]]\n"
-                    "Smartcard daemon for GnuPG\n");
+                    "Smartcard daemon for @GNUPG@\n");
     break;
 
     default: p = NULL;
diff --git a/sm/gpgsm.c b/sm/gpgsm.c
index fa56a39..bf5b102 100644
--- a/sm/gpgsm.c
+++ b/sm/gpgsm.c
@@ -524,17 +524,17 @@ my_strusage( int level )
 
   switch (level)
     {
-    case 11: p = "gpgsm (GnuPG)";
+    case 11: p = "@GPGSM@ (@GNUPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
     case 19: p = _("Please report bugs to <@EMAIL@>.\n"); break;
 
     case 1:
-    case 40: p = _("Usage: gpgsm [options] [files] (-h for help)");
+    case 40: p = _("Usage: @GPGSM@ [options] [files] (-h for help)");
       break;
     case 41:
-      p = _("Syntax: gpgsm [options] [files]\n"
+      p = _("Syntax: @GPGSM@ [options] [files]\n"
             "Sign, check, encrypt or decrypt using the S/MIME protocol\n"
             "Default operation depends on the input data\n");
       break;
diff --git a/sm/server.c b/sm/server.c
index 385eb53..74caf6c 100644
--- a/sm/server.c
+++ b/sm/server.c
@@ -1294,7 +1294,7 @@ gpgsm_server (certlist_t default_recplist)
   if (opt.verbose || opt.debug)
     {
       char *tmp = NULL;
-      const char *s1 = getenv ("GPG_AGENT_INFO");
+      const char *s1 = getenv (GPG_AGENT_INFO_NAME);
 
       if (asprintf (&tmp,
                     "Home: %s\n"
diff --git a/tools/ccidmon.c b/tools/ccidmon.c
index 884eab1..1137bab 100644
--- a/tools/ccidmon.c
+++ b/tools/ccidmon.c
@@ -810,7 +810,7 @@ main (int argc, char **argv)
         }
       else if (!strcmp (*argv, "--version"))
         {
-          fputs (PGM " (GnuPG) " PACKAGE_VERSION "\n", stdout);
+          fputs (PGM " ("GNUPG_NAME") " PACKAGE_VERSION "\n", stdout);
           exit (0);
         }
       else if (!strcmp (*argv, "--help"))
diff --git a/tools/gpg-check-pattern.c b/tools/gpg-check-pattern.c
index 12922c6..2db9ae5 100644
--- a/tools/gpg-check-pattern.c
+++ b/tools/gpg-check-pattern.c
@@ -135,7 +135,7 @@ my_strusage (int level)
   const char *p;
   switch (level)
     {
-    case 11: p = "gpg-check-pattern (GnuPG)";
+    case 11: p = "gpg-check-pattern (@GnuPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
diff --git a/tools/gpg-connect-agent.c b/tools/gpg-connect-agent.c
index c22e129..6288a97 100644
--- a/tools/gpg-connect-agent.c
+++ b/tools/gpg-connect-agent.c
@@ -182,17 +182,17 @@ my_strusage( int level )
 
   switch (level)
     {
-    case 11: p = "gpg-connect-agent (GnuPG)";
+    case 11: p = "@GPG at -connect-agent (@GNUPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
     case 19: p = _("Please report bugs to <@EMAIL@>.\n"); break;
 
     case 1:
-    case 40: p = _("Usage: gpg-connect-agent [options] (-h for help)");
+    case 40: p = _("Usage: @GPG at -connect-agent [options] (-h for help)");
       break;
     case 41:
-      p = _("Syntax: gpg-connect-agent [options]\n"
+      p = _("Syntax: @GPG at -connect-agent [options]\n"
             "Connect to a running agent and send commands\n");
       break;
     case 31: p = "\nHome: "; break;
diff --git a/tools/gpgconf-comp.c b/tools/gpgconf-comp.c
index ffe7eab..024417e 100644
--- a/tools/gpgconf-comp.c
+++ b/tools/gpgconf-comp.c
@@ -58,7 +58,7 @@
 #if defined(HAVE_W32_SYSTEM) && !defined(HAVE_W32CE_SYSTEM)
 #define GPGNAME "gpg2"
 #else
-#define GPGNAME "gpg"
+#define GPGNAME GPG_NAME
 #endif
 
 

@@ -180,15 +180,15 @@ static struct
 } gc_backend[GC_BACKEND_NR] =
   {
     { NULL },		/* GC_BACKEND_ANY dummy entry.  */
-    { "GnuPG", GPGNAME, GNUPG_MODULE_NAME_GPG,
+    { GNUPG_NAME, GPGNAME, GNUPG_MODULE_NAME_GPG,
       NULL, "gpgconf-gpg.conf" },
-    { "GPGSM", "gpgsm", GNUPG_MODULE_NAME_GPGSM,
+    { "GPGSM", GPGSM_NAME, GNUPG_MODULE_NAME_GPGSM,
       NULL, "gpgconf-gpgsm.conf" },
-    { "GPG Agent", "gpg-agent", GNUPG_MODULE_NAME_AGENT,
+    { "GPG Agent", GPG_AGENT_NAME, GNUPG_MODULE_NAME_AGENT,
       gpg_agent_runtime_change, "gpgconf-gpg-agent.conf" },
-    { "SCDaemon", "scdaemon", GNUPG_MODULE_NAME_SCDAEMON,
+    { "SCDaemon", SCDAEMON_NAME, GNUPG_MODULE_NAME_SCDAEMON,
       scdaemon_runtime_change, "gpgconf-scdaemon.conf" },
-    { "DirMngr", "dirmngr", GNUPG_MODULE_NAME_DIRMNGR,
+    { "DirMngr", DIRMNGR_NAME, GNUPG_MODULE_NAME_DIRMNGR,
       NULL, "gpgconf-dirmngr.conf" },
     { "DirMngr LDAP Server List", NULL, 0,
       NULL, "ldapserverlist-file", "LDAP Server" },
@@ -1215,8 +1215,8 @@ my_dgettext (const char *domain, const char *msgid)
           switched_codeset = 1;
           bind_textdomain_codeset (PACKAGE_GT, "utf-8");
 
-          bindtextdomain ("dirmngr", LOCALEDIR);
-          bind_textdomain_codeset ("dirmngr", "utf-8");
+          bindtextdomain (DIRMNGR_NAME, LOCALEDIR);
+          bind_textdomain_codeset (DIRMNGR_NAME, "utf-8");
 
         }
 
diff --git a/tools/gpgconf.c b/tools/gpgconf.c
index c586bb3..a9bf491 100644
--- a/tools/gpgconf.c
+++ b/tools/gpgconf.c
@@ -98,18 +98,18 @@ my_strusage( int level )
 
   switch (level)
     {
-    case 11: p = "gpgconf (GnuPG)";
+    case 11: p = "@GPGCONF@ (@GNUPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
     case 19: p = _("Please report bugs to <@EMAIL@>.\n"); break;
 
     case 1:
-    case 40: p = _("Usage: gpgconf [options] (-h for help)");
+    case 40: p = _("Usage: @GPGCONF@ [options] (-h for help)");
       break;
     case 41:
-      p = _("Syntax: gpgconf [options]\n"
-            "Manage configuration options for tools of the GnuPG system\n");
+      p = _("Syntax: @GPGCONF@ [options]\n"
+            "Manage configuration options for tools of the @GNUPG@ system\n");
       break;
 
     default: p = NULL; break;
@@ -350,10 +350,11 @@ main (int argc, char **argv)
       es_fprintf (outfp, "dirmngr-socket:%s\n",
                   gc_percent_escape (dirmngr_socket_name ()));
       {
-        char *infostr = getenv ("GPG_AGENT_INFO");
+        char *infostr = getenv (GPG_AGENT_INFO_NAME);
 
         if (!infostr || !*infostr)
-          infostr = make_filename (default_homedir (), "S.gpg-agent", NULL);
+          infostr = make_filename (default_homedir (),
+                                   GPG_AGENT_SOCK_NAME, NULL);
         else
           {
             char *tmp;
diff --git a/tools/gpgsplit.c b/tools/gpgsplit.c
index 1c1cee4..928e283 100644
--- a/tools/gpgsplit.c
+++ b/tools/gpgsplit.c
@@ -54,9 +54,9 @@ static void split_packets (const char *fname);
 enum cmd_and_opt_values {
   aNull = 0,
   oVerbose	  = 'v',
-  oPrefix       = 'p',                          
-  oUncompress   = 500,                      
-  oSecretToPublic,                      
+  oPrefix       = 'p',
+  oUncompress   = 500,
+  oSecretToPublic,
   oNoSplit,
 
   aTest
@@ -81,7 +81,7 @@ my_strusage (int level)
   const char *p;
   switch (level)
     {
-    case 11: p = "gpgsplit (GnuPG)";
+    case 11: p = "gpgsplit (@GNUPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
@@ -95,7 +95,7 @@ my_strusage (int level)
                   "Syntax: gpgsplit [options] [files]\n"
                   "Split an OpenPGP message into packets\n";
     break;
-    
+
     default:	p = NULL;
     }
   return p;
@@ -114,7 +114,7 @@ main (int argc, char **argv)
 #endif
   log_set_prefix ("gpgsplit", JNLIB_LOG_WITH_PREFIX);
   set_strusage (my_strusage);
-  
+
   pargs.argc = &argc;
   pargs.argv = &argv;
   pargs.flags=  1;  /* do not remove the args */
@@ -130,7 +130,7 @@ main (int argc, char **argv)
         default : pargs.err = 2; break;
 	}
     }
-  
+
   if (log_get_errorcount(0))
     g10_exit (2);
 
@@ -138,12 +138,12 @@ main (int argc, char **argv)
     split_packets (NULL);
   else
     {
-      for ( ;argc; argc--, argv++) 
+      for ( ;argc; argc--, argv++)
         split_packets (*argv);
     }
-  
+
   g10_exit (0);
-  return 0; 
+  return 0;
 }
 
 
@@ -168,7 +168,7 @@ pkttype_to_string (int pkttype)
     case PKT_SECRET_KEY    : s = "secret_key"; break;
     case PKT_PUBLIC_KEY    : s = "public_key"; break;
     case PKT_SECRET_SUBKEY : s = "secret_subkey"; break;
-    case PKT_COMPRESSED    : 
+    case PKT_COMPRESSED    :
       s = opt_uncompress? "uncompressed":"compressed";
       break;
     case PKT_ENCRYPTED     : s = "encrypted"; break;
@@ -191,17 +191,17 @@ pkttype_to_string (int pkttype)
 
 /*
  * Create a new filename and a return a pointer to a statically
- * allocated buffer 
+ * allocated buffer
  */
 static char *
 create_filename (int pkttype)
 {
   static unsigned int partno = 0;
   static char *name;
-  
-  if (!name) 
+
+  if (!name)
     name = xmalloc (strlen (opt_prefix) + 100 );
-  
+
   assert (pkttype < 1000 && pkttype >= 0 );
   partno++;
   sprintf (name, "%s%06u-%03d" EXTSEP_S "%.40s",
@@ -227,7 +227,7 @@ static int
 read_u32 (FILE *fp, unsigned long *rn)
 {
   size_t tmp;
-  
+
   if (read_u16 (fp, &tmp))
     return -1;
   *rn = tmp << 16;
@@ -239,9 +239,9 @@ read_u32 (FILE *fp, unsigned long *rn)
 
 static int
 write_old_header (FILE *fp, int pkttype, unsigned int len)
-{     
+{
   int ctb = (0x80 | ((pkttype & 15)<<2));
-  
+
   if (len < 256)
     ;
   else if (len < 65536)
@@ -271,7 +271,7 @@ write_old_header (FILE *fp, int pkttype, unsigned int len)
 
 static int
 write_new_header (FILE *fp, int pkttype, unsigned int len)
-{     
+{
   if ( putc ((0xc0 | (pkttype & 0x3f)), fp) == EOF )
     return -1;
 
@@ -313,9 +313,9 @@ public_key_length (const unsigned char *buf, size_t buflen)
   int nmpis;
 
   /*   byte version number (3 or 4)
-       u32  creation time 
+       u32  creation time
        [u16  valid days (version 3 only)]
-       byte algorithm 
+       byte algorithm
        n    MPIs (n and e) */
   if (!buflen)
     return 0;
@@ -368,7 +368,7 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout)
   unsigned int inbufsize, outbufsize;
   int c,zinit_done, zrc, nread, count;
   size_t n;
-              
+
   memset (&zs, 0, sizeof zs);
   inbufsize = 2048;
   inbuf = xmalloc (inbufsize);
@@ -376,7 +376,7 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout)
   outbuf = xmalloc (outbufsize);
   zs.avail_in = 0;
   zinit_done = 0;
-              
+
   do
     {
       if (zs.avail_in < inbufsize)
@@ -387,11 +387,11 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout)
 	  count = inbufsize - n;
 	  for (nread=0;
 	       nread < count && (c=getc (fpin)) != EOF;
-	       nread++) 
+	       nread++)
 	    inbuf[n+nread] = c;
-                      
+
 	  n += nread;
-	  if (nread < count && algo == 1) 
+	  if (nread < count && algo == 1)
 	    {
 	      inbuf[n] = 0xFF; /* chew dummy byte */
 	      n++;
@@ -400,12 +400,12 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout)
 	}
       zs.next_out = (Bytef *) outbuf;
       zs.avail_out = outbufsize;
-                    
-      if (!zinit_done) 
+
+      if (!zinit_done)
 	{
 	  zrc = (algo == 1? inflateInit2 ( &zs, -13)
 		 : inflateInit ( &zs ));
-	  if (zrc != Z_OK) 
+	  if (zrc != Z_OK)
 	    {
 	      log_fatal ("zlib problem: %s\n", zs.msg? zs.msg :
 			 zrc == Z_MEM_ERROR ? "out of core" :
@@ -431,17 +431,17 @@ handle_zlib(int algo,FILE *fpin,FILE *fpout)
 	      else
 		log_fatal ("zlib inflate problem: rc=%d\n", zrc );
 	    }
-	  for (n=0; n < outbufsize - zs.avail_out; n++) 
+	  for (n=0; n < outbufsize - zs.avail_out; n++)
 	    {
 	      if (putc (outbuf[n], fpout) == EOF )
 		return 1;
 	    }
 	}
-    } 
+    }
   while (zrc != Z_STREAM_END && zrc != Z_BUF_ERROR);
   {
     int i;
-    
+
     fputs ("Left over bytes:", stderr);
     for (i=0; i < zs.avail_in; i++)
       fprintf (stderr, " %02X", zs.next_in[i]);
@@ -462,7 +462,7 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout)
   unsigned int inbufsize, outbufsize;
   int c,zinit_done, zrc, nread, count;
   size_t n;
-              
+
   memset (&bzs, 0, sizeof bzs);
   inbufsize = 2048;
   inbuf = xmalloc (inbufsize);
@@ -470,7 +470,7 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout)
   outbuf = xmalloc (outbufsize);
   bzs.avail_in = 0;
   zinit_done = 0;
-              
+
   do
     {
       if (bzs.avail_in < inbufsize)
@@ -481,11 +481,11 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout)
 	  count = inbufsize - n;
 	  for (nread=0;
 	       nread < count && (c=getc (fpin)) != EOF;
-	       nread++) 
+	       nread++)
 	    inbuf[n+nread] = c;
-                      
+
 	  n += nread;
-	  if (nread < count && algo == 1) 
+	  if (nread < count && algo == 1)
 	    {
 	      inbuf[n] = 0xFF; /* chew dummy byte */
 	      n++;
@@ -494,11 +494,11 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout)
 	}
       bzs.next_out = outbuf;
       bzs.avail_out = outbufsize;
-                    
-      if (!zinit_done) 
+
+      if (!zinit_done)
 	{
 	  zrc = BZ2_bzDecompressInit(&bzs,0,0);
-	  if (zrc != BZ_OK) 
+	  if (zrc != BZ_OK)
 	    log_fatal ("bz2lib problem: %d\n",zrc);
 	  zinit_done = 1;
 	}
@@ -509,13 +509,13 @@ handle_bzip2(int algo,FILE *fpin,FILE *fpout)
 	    ; /* eof */
 	  else if (zrc != BZ_OK && zrc != BZ_PARAM_ERROR)
 	    log_fatal ("bz2lib inflate problem: %d\n", zrc );
-	  for (n=0; n < outbufsize - bzs.avail_out; n++) 
+	  for (n=0; n < outbufsize - bzs.avail_out; n++)
 	    {
 	      if (putc (outbuf[n], fpout) == EOF )
 		return 1;
 	    }
 	}
-    } 
+    }
   while (zrc != BZ_STREAM_END && zrc != BZ_PARAM_ERROR);
   BZ2_bzDecompressEnd(&bzs);
 
@@ -532,7 +532,7 @@ write_part (FILE *fpin, unsigned long pktlen,
   int c, first;
   unsigned char *p;
   const char *outname = create_filename (pkttype);
-  
+
 #if defined(__riscos__) && defined(USE_ZLIBRISCOS)
   static int initialized = 0;
 
@@ -546,7 +546,7 @@ write_part (FILE *fpin, unsigned long pktlen,
       if (opt_verbose)
         log_info ("writing '%s'\n", outname);
       fpout = fopen (outname, "wb");
-      if (!fpout) 
+      if (!fpout)
         {
           log_error ("error creating '%s': %s\n", outname, strerror(errno));
           /* stop right now, otherwise we would mess up the sequence
@@ -563,10 +563,10 @@ write_part (FILE *fpin, unsigned long pktlen,
 
       pkttype = pkttype == PKT_SECRET_KEY? PKT_PUBLIC_KEY:PKT_PUBLIC_SUBKEY;
 
-      for (i=0; i < pktlen; i++) 
+      for (i=0; i < pktlen; i++)
         {
           c = getc (fpin);
-          if (c == EOF) 
+          if (c == EOF)
             goto read_error;
           blob[i] = c;
         }
@@ -577,17 +577,17 @@ write_part (FILE *fpin, unsigned long pktlen,
           g10_exit (1);
         }
       if ( (hdr[0] & 0x40) )
-        { 
+        {
           if (write_new_header (fpout, pkttype, len))
             goto write_error;
         }
       else
-        { 
+        {
           if (write_old_header (fpout, pkttype, len))
             goto write_error;
         }
 
-      for (i=0; i < len; i++) 
+      for (i=0; i < len; i++)
         {
           if ( putc (blob[i], fpout) == EOF )
             goto write_error;
@@ -605,12 +605,12 @@ write_part (FILE *fpin, unsigned long pktlen,
             goto write_error;
         }
     }
-  
+
   first = 1;
   while (partial)
     {
       size_t partlen;
-      
+
       if (partial == 1)
         { /* openpgp */
           if (first )
@@ -619,11 +619,11 @@ write_part (FILE *fpin, unsigned long pktlen,
               assert( c >= 224 && c < 255 );
               first = 0;
             }
-          else if ((c = getc (fpin)) == EOF ) 
+          else if ((c = getc (fpin)) == EOF )
             goto read_error;
           else
             hdr[hdrlen++] = c;
-            
+
           if (c < 192)
             {
               pktlen = c;
@@ -632,7 +632,7 @@ write_part (FILE *fpin, unsigned long pktlen,
           else if (c < 224 )
             {
               pktlen = (c - 192) * 256;
-              if ((c = getc (fpin)) == EOF) 
+              if ((c = getc (fpin)) == EOF)
                 goto read_error;
               hdr[hdrlen++] = c;
               pktlen += c + 192;
@@ -656,9 +656,9 @@ write_part (FILE *fpin, unsigned long pktlen,
                     goto write_error;
                 }
               partlen = 1 << (c & 0x1f);
-              for (; partlen; partlen--) 
+              for (; partlen; partlen--)
                 {
-                  if ((c = getc (fpin)) == EOF) 
+                  if ((c = getc (fpin)) == EOF)
                     goto read_error;
                   if ( putc (c, fpout) == EOF )
                     goto write_error;
@@ -672,17 +672,17 @@ write_part (FILE *fpin, unsigned long pktlen,
             goto read_error;
           hdr[hdrlen++] = partlen >> 8;
           hdr[hdrlen++] = partlen;
-          for (p=hdr; hdrlen; p++, hdrlen--) 
+          for (p=hdr; hdrlen; p++, hdrlen--)
             {
               if ( putc (*p, fpout) == EOF )
                 goto write_error;
             }
           if (!partlen)
             partial = 0; /* end of packet */
-          for (; partlen; partlen--) 
+          for (; partlen; partlen--)
             {
               c = getc (fpin);
-              if (c == EOF) 
+              if (c == EOF)
                 goto read_error;
               if ( putc (c, fpout) == EOF )
                 goto write_error;
@@ -693,7 +693,7 @@ write_part (FILE *fpin, unsigned long pktlen,
           pktlen = 0;
           partial = 0;
           hdrlen = 0;
-          if (opt_uncompress) 
+          if (opt_uncompress)
             {
               if ((c = getc (fpin)) == EOF)
                 goto read_error;
@@ -718,7 +718,7 @@ write_part (FILE *fpin, unsigned long pktlen,
             }
           else
             {
-              while ( (c=getc (fpin)) != EOF ) 
+              while ( (c=getc (fpin)) != EOF )
                 {
                   if ( putc (c, fpout) == EOF )
                     goto write_error;
@@ -729,33 +729,33 @@ write_part (FILE *fpin, unsigned long pktlen,
 	}
     }
 
-  for (p=hdr; hdrlen; p++, hdrlen--) 
+  for (p=hdr; hdrlen; p++, hdrlen--)
     {
       if ( putc (*p, fpout) == EOF )
         goto write_error;
     }
-  
+
   /* standard packet or last segment of partial length encoded packet */
-  for (; pktlen; pktlen--) 
+  for (; pktlen; pktlen--)
     {
       c = getc (fpin);
-      if (c == EOF) 
+      if (c == EOF)
         goto read_error;
       if ( putc (c, fpout) == EOF )
         goto write_error;
     }
-  
+
  ready:
   if ( !opt_no_split && fclose (fpout) )
     log_error ("error closing '%s': %s\n", outname, strerror (errno));
   return 0;
-  
- write_error:    
+
+ write_error:
   log_error ("error writing '%s': %s\n", outname, strerror (errno));
   if (!opt_no_split)
     fclose (fpout);
   return 2;
-  
+
  read_error:
   if (!opt_no_split)
     {
@@ -776,12 +776,12 @@ do_split (FILE *fp)
   int partial = 0;
   unsigned char header[20];
   int header_idx = 0;
-  
+
   ctb = getc (fp);
   if (ctb == EOF)
     return 3; /* ready */
   header[header_idx++] = ctb;
-  
+
   if (!(ctb & 0x80))
     {
       log_error("invalid CTB %02x\n", ctb );
@@ -799,19 +799,19 @@ do_split (FILE *fp)
       else if ( c < 224 )
         {
           pktlen = (c - 192) * 256;
-          if( (c = getc (fp)) == EOF ) 
+          if( (c = getc (fp)) == EOF )
             return -1;
           header[header_idx++] = c;
           pktlen += c + 192;
 	}
-      else if ( c == 255 ) 
+      else if ( c == 255 )
         {
           if (read_u32 (fp, &pktlen))
             return -1;
           header[header_idx++] = pktlen >> 24;
           header[header_idx++] = pktlen >> 16;
           header[header_idx++] = pktlen >> 8;
-          header[header_idx++] = pktlen; 
+          header[header_idx++] = pktlen;
 	}
       else
         { /* partial body length */
@@ -822,7 +822,7 @@ do_split (FILE *fp)
   else
     {
       int lenbytes;
-      
+
       pkttype = (ctb>>2)&0xf;
       lenbytes = ((ctb&3)==3)? 0 : (1<<(ctb & 3));
       if (!lenbytes )
@@ -835,13 +835,13 @@ do_split (FILE *fp)
 	}
       else
         {
-          for ( ; lenbytes; lenbytes-- ) 
+          for ( ; lenbytes; lenbytes-- )
             {
               pktlen <<= 8;
-              if( (c = getc (fp)) == EOF ) 
+              if( (c = getc (fp)) == EOF )
                 return -1;
               header[header_idx++] = c;
-              
+
               pktlen |= c;
 	    }
 	}
@@ -856,18 +856,18 @@ split_packets (const char *fname)
 {
   FILE *fp;
   int rc;
-  
+
   if (!fname || !strcmp (fname, "-"))
     {
       fp = stdin;
       fname = "-";
     }
-  else if ( !(fp = fopen (fname,"rb")) ) 
+  else if ( !(fp = fopen (fname,"rb")) )
     {
       log_error ("can't open '%s': %s\n", fname, strerror (errno));
       return;
     }
-  
+
   while ( !(rc = do_split (fp)) )
     ;
   if ( rc > 0 )
@@ -876,7 +876,7 @@ split_packets (const char *fname)
     log_error ("error reading '%s': %s\n", fname, strerror (errno));
   else
     log_error ("premature EOF while reading '%s'\n", fname );
-  
+
   if ( fp != stdin )
     fclose (fp);
 }
diff --git a/tools/gpgtar-extract.c b/tools/gpgtar-extract.c
index d0e4620..1ea3597 100644
--- a/tools/gpgtar-extract.c
+++ b/tools/gpgtar-extract.c
@@ -51,7 +51,7 @@ extract_regular (estream_t stream, const char *dirname,
     }
   else
     err = 0;
-  
+
   outfp = es_fopen (fname, "wb");
   if (!outfp)
     {
@@ -98,7 +98,7 @@ extract_directory (const char *dirname, tar_header_t hdr)
   gpg_error_t err;
   char *fname;
   size_t prefixlen;
-  
+
   prefixlen = strlen (dirname) + 1;
   fname = strconcat (dirname, "/", hdr->name, NULL);
   if (!fname)
@@ -124,7 +124,7 @@ extract_directory (const char *dirname, tar_header_t hdr)
              original error code in case of a failure.  */
           char *p;
           int rc = 0;
-          
+
           for (p = fname+prefixlen; (p = strchr (p, '/')); p++)
             {
               *p = 0;
@@ -166,8 +166,8 @@ extract (estream_t stream, const char *dirname, tar_header_t hdr)
 #endif /*HAVE_DOSISH_SYSTEM*/
 
   if (!n
-      || strstr (hdr->name, "//") 
-      || strstr (hdr->name, "/../") 
+      || strstr (hdr->name, "//")
+      || strstr (hdr->name, "/../")
       || !strncmp (hdr->name, "../", 3)
       || (n >= 3 && !strcmp (hdr->name+n-3, "/.." )))
     {
@@ -208,7 +208,7 @@ create_directory (const char *dirprefix)
 
   /* Remove common suffixes.  */
   n = strlen (dirprefix);
-  if (n > 4 && (!compare_filenames    (dirprefix + n - 4, EXTSEP_S "gpg")
+  if (n > 4 && (!compare_filenames    (dirprefix + n - 4, EXTSEP_S GPGEXT_GPG)
                 || !compare_filenames (dirprefix + n - 4, EXTSEP_S "pgp")
                 || !compare_filenames (dirprefix + n - 4, EXTSEP_S "asc")
                 || !compare_filenames (dirprefix + n - 4, EXTSEP_S "pem")
@@ -283,7 +283,7 @@ gpgtar_extract (const char *filename)
         }
     }
   else
-    stream = es_stdin; 
+    stream = es_stdin;
 
   if (stream == es_stdin)
     es_set_binary (es_stdin);
@@ -323,7 +323,7 @@ gpgtar_extract (const char *filename)
       header = gpgtar_read_header (stream);
       if (!header)
         goto leave;
-     
+
       if (extract (stream, dirname, header))
         goto leave;
       xfree (header);
diff --git a/tools/gpgtar.c b/tools/gpgtar.c
index 3c31054..e484986 100644
--- a/tools/gpgtar.c
+++ b/tools/gpgtar.c
@@ -115,7 +115,7 @@ my_strusage( int level )
 
   switch (level)
     {
-    case 11: p = "gpgtar (GnuPG)";
+    case 11: p = "@GPGTAR@ (@GNUPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
diff --git a/tools/symcryptrun.c b/tools/symcryptrun.c
index 4074c6e..eff14c9 100644
--- a/tools/symcryptrun.c
+++ b/tools/symcryptrun.c
@@ -200,7 +200,7 @@ my_strusage (int level)
 
   switch (level)
     {
-    case 11: p = "symcryptrun (GnuPG)";
+    case 11: p = "symcryptrun (@GNUPG@)";
       break;
     case 13: p = VERSION; break;
     case 17: p = PRINTABLE_OS_NAME; break;
@@ -1010,7 +1010,7 @@ main (int argc, char **argv)
 
   /* Tell simple-pwquery about the the standard socket name.  */
   {
-    char *tmp = make_filename (opt.homedir, "S.gpg-agent", NULL);
+    char *tmp = make_filename (opt.homedir, GPG_AGENT_SOCK_NAME, NULL);
     simple_pw_set_socket (tmp);
     xfree (tmp);
   }
diff --git a/tools/watchgnupg.c b/tools/watchgnupg.c
index 060aa04..4f4d54d 100644
--- a/tools/watchgnupg.c
+++ b/tools/watchgnupg.c
@@ -39,7 +39,7 @@
 
 /* Allow for a standalone build on most systems. */
 #ifdef VERSION
-#define MYVERSION_LINE PGM " (GnuPG) " VERSION
+#define MYVERSION_LINE PGM " ("GNUPG_NAME") " VERSION
 #define BUGREPORT_LINE "\nReport bugs to <bug-gnupg at gnu.org>.\n"
 #else
 #define MYVERSION_LINE PGM " (standalone build) " __DATE__

commit 798daaa1ddf73f64cf840fbdc1f4c5b9c4b4ec13
Author: Werner Koch <wk at gnupg.org>
Date:   Mon Nov 18 13:46:52 2013 +0100

    Add strusage macro replacement feature.
    
    * common/argparse.c (writechar): New.
    (writestrings): Add macro replacement feature.
    (show_help): Remove specialized @EMAIL@ replacement.
    * configure.ac (GNUPG_NAME, GPG_NAME, GPGSM_NAME): Define.
    (GPG_AGENT_NAME, DIRMNGR_NAME, G13_NAME, GPGCONF_NAME): Define.
    (GPGTAR_NAME, GPG_AGENT_INFO_NAME, GPG_AGENT_SOCK_NAME): Define.
    (GPG_AGENT_SSH_SOCK_NAME, DIRMNGR_INFO_NAME): Define.
    (DIRMNGR_SOCK_NAME): Define.
    
    Signed-off-by: Werner Koch <wk at gnupg.org>

diff --git a/common/argparse.c b/common/argparse.c
index 6a90920..c9930ea 100644
--- a/common/argparse.c
+++ b/common/argparse.c
@@ -185,6 +185,19 @@ argparse_register_outfnc (int (*fnc)(int, const char *))
 }
 
 
+static void
+writechar (int is_error, int c)
+{
+  char tmp[2];
+
+  tmp[0] = c;
+  tmp[1] = 0;
+  if (custom_outfnc)
+    custom_outfnc (is_error? 2:1, tmp);
+  else
+    fputs (tmp, is_error? stderr : stdout);
+}
+
 /* Write STRING and all following const char * arguments either to
    stdout or, if IS_ERROR is set, to stderr.  The list of strings must
    be terminated by a NULL.  */
@@ -201,11 +214,64 @@ writestrings (int is_error, const char *string, ...)
       va_start (arg_ptr, string);
       do
         {
-          if (custom_outfnc)
-            custom_outfnc (is_error? 2:1, s);
+          const char *s2, *s3;
+
+          /* Check whether to substitute a macro. */
+          if (s && (s2 = strchr (s, '@')) && s2[1] >= 'A' && s2[1] <= 'Z'
+              && (s3 = (strchr (s2+1, '@'))))
+            {
+              /* Might be.  */
+              static struct {
+                const char *name;
+                const char *value;
+              } macros[] = {
+#             ifdef PACKAGE_BUGREPORT
+                { "EMAIL", PACKAGE_BUGREPORT },
+#             else
+                { "EMAIL", "bug at example.org" },
+#             endif
+                { "GNUPG",     GNUPG_NAME },
+                { "GPG",       GPG_NAME },
+                { "GPGSM",     GPGSM_NAME },
+                { "GPG_AGENT", GPG_AGENT_NAME },
+                { "SCDAEMON",  SCDAEMON_NAME },
+                { "DIRMNGR",   DIRMNGR_NAME },
+                { "G13",       G13_NAME },
+                { "GPGCONF",   GPGCONF_NAME },
+                { "GPGTAR",    GPGTAR_NAME }
+              };
+              int idx;
+
+              s2++;
+              for (idx=0; idx < DIM (macros); idx++)
+                if (strlen (macros[idx].name) == (s3 - s2)
+                    && !memcmp (macros[idx].name, s2, (s3 - s2)))
+                  break;
+              s2--;
+              if (idx < DIM (macros)) /* Found.  Print and substitute.  */
+                {
+                  for (; s < s2; s++, count++)
+                    writechar (is_error, *s);
+                  count += writestrings (is_error, macros[idx].value, NULL);
+                  s3++;
+                }
+              else /* Not found.  Print macro as is. */
+                {
+                  for (; s < s3; s++, count++)
+                    writechar (is_error, *s);
+                }
+              /* Now recurse so that remaining macros are also
+                 substituted. */
+              count += writestrings (is_error, s3, NULL);
+            }
           else
-            fputs (s, is_error? stderr : stdout);
-          count += strlen (s);
+            {
+              if (custom_outfnc)
+                custom_outfnc (is_error? 2:1, s);
+              else
+                fputs (s, is_error? stderr : stdout);
+              count += strlen (s);
+            }
         }
       while ((s = va_arg (arg_ptr, const char *)));
       va_end (arg_ptr);
@@ -1222,35 +1288,8 @@ show_help (ARGPARSE_OPTS *opts, unsigned int flags)
     }
   if ( (s=strusage(19)) )
     {
-      /* bug reports to ... */
-      char *s2;
-
       writestrings (0, "\n", NULL);
-      s2 = strstr (s, "@EMAIL@");
-      if (s2)
-        {
-          if (s2-s)
-            {
-              const char *s3;
-
-              for (s3=s; s3 < s2; s3++)
-                {
-                  tmp[0] = *s3;
-                  tmp[1] = 0;
-                  writestrings (0, tmp, NULL);
-                }
-            }
-#ifdef PACKAGE_BUGREPORT
-          writestrings (0, PACKAGE_BUGREPORT, NULL);
-#else
-          writestrings (0, "bug at example.org", NULL);
-#endif
-          s2 += 7;
-          if (*s2)
-            writestrings (0, s2, NULL);
-        }
-      else
-        writestrings (0, s, NULL);
+      writestrings (0, s, NULL);
     }
   flushstrings (0);
   exit(0);
diff --git a/configure.ac b/configure.ac
index e20a70c..fa841c4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1574,6 +1574,32 @@ if test "$build_g13" = yes ; then
 fi
 
 
+#
+# Define Name strings
+#
+AC_DEFINE_UNQUOTED(GNUPG_NAME, "GnuPG", [The name of the project])
+AC_DEFINE_UNQUOTED(GPG_NAME, "gpg", [The name of the OpenPGP tool])
+AC_DEFINE_UNQUOTED(GPGSM_NAME, "gpgsm", [The name of the S/MIME tool])
+AC_DEFINE_UNQUOTED(GPG_AGENT_NAME, "gpg-agent", [The name of the agent])
+AC_DEFINE_UNQUOTED(SCDAEMON_NAME, "scdaemon", [The name of the scdaemon])
+AC_DEFINE_UNQUOTED(DIRMNGR_NAME, "dirmngr", [The name of the dirmngr])
+AC_DEFINE_UNQUOTED(G13_NAME, "g13", [The name of the g13 tool])
+AC_DEFINE_UNQUOTED(GPGCONF_NAME, "gpgconf", [The name of the gpgconf tool])
+AC_DEFINE_UNQUOTED(GPGTAR_NAME, "gpgtar", [The name of the gpgtar tool])
+
+AC_DEFINE_UNQUOTED(GPG_AGENT_INFO_NAME, "GPG_AGENT_INFO",
+                   [The name of the agent info envvar])
+AC_DEFINE_UNQUOTED(GPG_AGENT_SOCK_NAME, "S.gpg-agent",
+                   [The name of the agent socket])
+AC_DEFINE_UNQUOTED(GPG_AGENT_SSH_SOCK_NAME, "S.gpg-agent.ssh",
+                   [The name of the agent socket for ssh])
+AC_DEFINE_UNQUOTED(DIRMNGR_INFO_NAME, "DIRMNGR_INFO",
+                   [The name of the dirmngr info envvar])
+AC_DEFINE_UNQUOTED(DIRMNGR_SOCK_NAME, "S.dirmngr",
+                   [The name of the dirmngr socket])
+
+AC_DEFINE_UNQUOTED(GPGEXT_GPG, "gpg", [The standard binary file suffix])
+
 
 #
 # Provide information about the build.

-----------------------------------------------------------------------

Summary of changes:
 agent/command.c            |   14 ++--
 agent/gpg-agent.c          |   32 +++++----
 agent/preset-passphrase.c  |    4 +-
 agent/protect-tool.c       |    2 +-
 agent/w32main.c            |    2 +-
 common/argparse.c          |  103 ++++++++++++++++++---------
 common/asshelp.c           |   13 ++--
 common/audit.c             |    2 +-
 common/gpgrlhelp.c         |    2 +-
 common/homedir.c           |    9 +--
 common/logging.c           |    4 +-
 common/simple-pwquery.c    |    4 +-
 configure.ac               |   26 +++++++
 dirmngr/dirmngr-client.c   |    7 +-
 dirmngr/dirmngr.c          |   29 ++++----
 dirmngr/dirmngr_ldap.c     |    2 +-
 g10/armor.c                |    2 +-
 g10/gpg.c                  |   18 ++---
 g10/gpgv.c                 |    4 +-
 g10/keygen.c               |    6 +-
 g10/keyring.c              |    2 +-
 g10/openfile.c             |    7 +-
 g10/server.c               |    2 +-
 g10/sign.c                 |    3 +-
 g10/tdbio.c                |    6 +-
 g13/g13.c                  |   16 ++---
 g13/server.c               |    2 +-
 kbx/kbxutil.c              |    2 +-
 keyserver/curl-shim.h      |    4 +-
 keyserver/gpgkeys_curl.c   |    4 +-
 keyserver/gpgkeys_finger.c |    2 +-
 keyserver/gpgkeys_hkp.c    |    8 +--
 keyserver/gpgkeys_kdns.c   |   40 +++++------
 keyserver/gpgkeys_ldap.c   |   10 +--
 po/de.po                   |  166 +++++++++++++++++++++++++-------------------
 scd/apdu.c                 |    2 +-
 scd/pcsc-wrapper.c         |    2 +-
 scd/scdaemon.c             |    6 +-
 sm/gpgsm.c                 |    6 +-
 sm/server.c                |    2 +-
 tools/ccidmon.c            |    2 +-
 tools/gpg-check-pattern.c  |    2 +-
 tools/gpg-connect-agent.c  |    6 +-
 tools/gpgconf-comp.c       |   16 ++---
 tools/gpgconf.c            |   13 ++--
 tools/gpgsplit.c           |  164 +++++++++++++++++++++----------------------
 tools/gpgtar-extract.c     |   16 ++---
 tools/gpgtar.c             |    2 +-
 tools/symcryptrun.c        |    4 +-
 tools/watchgnupg.c         |    2 +-
 50 files changed, 452 insertions(+), 352 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list