summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2024-06-06 01:56:27 +0200
committerNIIBE Yutaka <gniibe@fsij.org>2024-06-06 01:56:27 +0200
commite02880d5126fdb96710170632f8f2564d14242fd (patch)
tree6e5977433c2ca64b83c9bc88f5d5c52bb07d54e2 /common
parentgpg: Add magic parameter "default" to --quick-add-adsk. (diff)
downloadgnupg2-e02880d5126fdb96710170632f8f2564d14242fd.tar.xz
gnupg2-e02880d5126fdb96710170632f8f2564d14242fd.zip
common:w32: Fix for 64-bit Windows.
* common/exectool.c (gnupg_exec_tool_stream): 64-bit Windows is LLP64. -- GnuPG-bug-id: 7139 Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'common')
-rw-r--r--common/exectool.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/common/exectool.c b/common/exectool.c
index d8326e77b..ce424fc49 100644
--- a/common/exectool.c
+++ b/common/exectool.c
@@ -407,8 +407,13 @@ gnupg_exec_tool_stream (const char *pgmname, const char *argv[],
Yeah, that is an ugly non-thread safe hack but it safes us to
create a copy of the array. */
#ifdef HAVE_W32_SYSTEM
+# ifdef _WIN64
+ snprintf (extrafdbuf, sizeof extrafdbuf, "-&%llu",
+ (unsigned long long)exceptclose[i]);
+# else
snprintf (extrafdbuf, sizeof extrafdbuf, "-&%lu",
(unsigned long)exceptclose[i]);
+# endif
#else
snprintf (extrafdbuf, sizeof extrafdbuf, "-&%d", exceptclose[i]);
#endif