[svn] dirmngr - r309 - trunk/src
svn author marcus
cvs at cvs.gnupg.org
Tue Sep 30 16:41:40 CEST 2008
Author: marcus
Date: 2008-09-30 16:41:40 +0200 (Tue, 30 Sep 2008)
New Revision: 309
Modified:
trunk/src/ChangeLog
trunk/src/get-path.c
Log:
2008-09-30 Marcus Brinkmann <marcus at g10code.com>
* get-path.c (get_dirmngr_ldap_path): Revert last change.
Instead, use dirmngr_libexecdir().
(find_program_at_standard_place): Don't define for now.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2008-09-30 13:09:32 UTC (rev 308)
+++ trunk/src/ChangeLog 2008-09-30 14:41:40 UTC (rev 309)
@@ -1,5 +1,11 @@
2008-09-30 Marcus Brinkmann <marcus at g10code.com>
+ * get-path.c (get_dirmngr_ldap_path): Revert last change.
+ Instead, use dirmngr_libexecdir().
+ (find_program_at_standard_place): Don't define for now.
+
+2008-09-30 Marcus Brinkmann <marcus at g10code.com>
+
* get-path.c (dirmngr_cachedir): Make COMP a pointer to const to
silence gcc warning.
(get_dirmngr_ldap_path): Look for dirmngr_ldap in the installation
Modified: trunk/src/get-path.c
===================================================================
--- trunk/src/get-path.c 2008-09-30 13:09:32 UTC (rev 308)
+++ trunk/src/get-path.c 2008-09-30 14:41:40 UTC (rev 309)
@@ -237,6 +237,7 @@
}
+#if 0
static char *
find_program_in_inst_dir (const char *name)
{
@@ -290,18 +291,23 @@
return result;
}
#endif
+#endif
const char *
get_dirmngr_ldap_path (void)
{
- static const char *pgmname;
+ static char *pgmname;
#ifdef HAVE_W32_SYSTEM
- if (!pgmname)
- pgmname = find_program_in_inst_dir ("dirmngr_ldap.exe");
- if (!pgmname)
- pgmname = find_program_at_standard_place ("GNU\\GnuPG\\dirmngr_ldap.exe");
+ if (! pgmname)
+ {
+ const char *dir = dirmngr_libexecdir ();
+ const char *exe = "\\dirmngr_ldap.exe";
+ pgmname = malloc (strlen (dir) + strlen (exe) + 1);
+ if (pgmname)
+ strcpy (stpcpy (pgmname, dir), exe);
+ }
#endif
if (!pgmname)
pgmname = DIRMNGR_LIBEXECDIR "/dirmngr_ldap";
More information about the Gnupg-commits
mailing list