[Pkg-gnupg-commit] [gpgme] 21/412: w32: Improve locating gpgconf on 64 bit systems.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Thu Sep 22 21:26:06 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch master
in repository gpgme.
commit a82e9b182f62966207cad0972be6fa284329a5a1
Author: Werner Koch <wk at gnupg.org>
Date: Wed Oct 28 16:26:03 2015 +0100
w32: Improve locating gpgconf on 64 bit systems.
* src/w32-util.c (find_program_at_standard_place): Fallback to
CSIDL_PROGRAM_FILESX86.
Signed-off-by: Werner Koch <wk at gnupg.org>
---
src/w32-util.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/w32-util.c b/src/w32-util.c
index f611b6c..3600b28 100644
--- a/src/w32-util.c
+++ b/src/w32-util.c
@@ -409,8 +409,13 @@ find_program_at_standard_place (const char *name)
char path[MAX_PATH];
char *result = NULL;
- /* See http://wiki.tcl.tk/17492 for details on compatibility. */
- if (SHGetSpecialFolderPathA (NULL, path, CSIDL_PROGRAM_FILES, 0))
+ /* See http://wiki.tcl.tk/17492 for details on compatibility.
+
+ We First try the generic place and then fallback to the x86
+ (i.e. 32 bit) place. This will prefer a 64 bit of the program
+ over a 32 bit version on 64 bit Windows if installed. */
+ if (SHGetSpecialFolderPathA (NULL, path, CSIDL_PROGRAM_FILES, 0)
+ || SHGetSpecialFolderPathA (NULL, path, CSIDL_PROGRAM_FILESX86, 0))
{
result = malloc (strlen (path) + 1 + strlen (name) + 1);
if (result)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gpgme.git
More information about the Pkg-gnupg-commit
mailing list