[Pkg-gnupg-commit] [libassuan] 399/437: Changes to support W64.
Eric Dorland
eric at moszumanska.debian.org
Fri May 22 05:34:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
eric pushed a commit to branch master
in repository libassuan.
commit 6ba18ca32c8669fa76cc10de3382f78212ca51a8
Author: Werner Koch <wk at gnupg.org>
Date: Wed Jun 19 13:29:18 2013 +0200
Changes to support W64.
* configure.ac (have_dosish_system): Set for W64.
* src/assuan-defs.h (SOCKET2HANDLE, HANDLE2SOCKET): Add versions for
W64.
* src/assuan-handler.c (assuan_command_parse_fd) [W64]: Use strtoull
to parse an FD.
--
Note that these changes are not complete but merely sufficient to
allow building of GpgEX.
---
configure.ac | 1 +
src/assuan-defs.h | 13 ++++++++-----
src/assuan-handler.c | 6 +++---
3 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 67860a7..369a447 100644
--- a/configure.ac
+++ b/configure.ac
@@ -192,6 +192,7 @@ case "${host}" in
fi
;;
x86_64-*mingw32*)
+ have_dosish_system=yes
have_w32_system=yes
have_w64_system=yes
;;
diff --git a/src/assuan-defs.h b/src/assuan-defs.h
index f6cb9b4..63329c8 100644
--- a/src/assuan-defs.h
+++ b/src/assuan-defs.h
@@ -397,12 +397,15 @@ int _assuan_asprintf (char **buf, const char *fmt, ...);
#define DIM(v) (sizeof(v)/sizeof((v)[0]))
-#if HAVE_W32_SYSTEM
-#define SOCKET2HANDLE(s) ((void *)(s))
-#define HANDLE2SOCKET(h) ((unsigned int)(h))
+#if HAVE_W64_SYSTEM
+# define SOCKET2HANDLE(s) ((void *)(s))
+# define HANDLE2SOCKET(h) ((uintptr_t)(h))
+#elif HAVE_W32_SYSTEM
+# define SOCKET2HANDLE(s) ((void *)(s))
+# define HANDLE2SOCKET(h) ((unsigned int)(h))
#else
-#define SOCKET2HANDLE(s) (s)
-#define HANDLE2SOCKET(h) (h)
+# define SOCKET2HANDLE(s) (s)
+# define HANDLE2SOCKET(h) (h)
#endif
diff --git a/src/assuan-handler.c b/src/assuan-handler.c
index dca5968..2fa91b8 100644
--- a/src/assuan-handler.c
+++ b/src/assuan-handler.c
@@ -271,9 +271,9 @@ assuan_command_parse_fd (assuan_context_t ctx, char *line, assuan_fd_t *rfd)
line ++;
if (!digitp (*line))
return set_error (ctx, GPG_ERR_ASS_SYNTAX, "number required");
-#ifdef HAVE_W32_SYSTEM
- /* Fixme: For a W32/64bit system we will need to change the cast
- and the conversion function. */
+#if HAVE_W64_SYSTEM
+ *rfd = (void*)strtoull (line, &endp, 10);
+#elif HAVE_W32_SYSTEM
*rfd = (void*)strtoul (line, &endp, 10);
#else
*rfd = strtoul (line, &endp, 10);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libassuan.git
More information about the Pkg-gnupg-commit
mailing list