aboutsummaryrefslogtreecommitdiffstats
path: root/common/sysutils.h
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2023-07-18 05:21:19 +0000
committerNIIBE Yutaka <[email protected]>2023-07-18 05:21:19 +0000
commit521ec40aea89a3e172874ccdef359e87b25f1242 (patch)
treeacb7d7542da29ba5b0c1e515a7f2f5a8cc9c6557 /common/sysutils.h
parentagent,build,w32: Fix use of SOCKET. (diff)
downloadgnupg-521ec40aea89a3e172874ccdef359e87b25f1242.tar.gz
gnupg-521ec40aea89a3e172874ccdef359e87b25f1242.zip
common,w32: Fix FD2INT macro.
* common/sysutils.h [HAVE_W32_SYSTEM] (FD2INT): Use intptr_t for 64-bit Windows. -- GnuPG-bug-id: 6598 Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'common/sysutils.h')
-rw-r--r--common/sysutils.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/common/sysutils.h b/common/sysutils.h
index 180e82df8..e34fff72f 100644
--- a/common/sysutils.h
+++ b/common/sysutils.h
@@ -38,7 +38,11 @@
typedef void *gnupg_fd_t;
#define GNUPG_INVALID_FD ((void*)(-1))
#define INT2FD(s) ((void *)(s))
-#define FD2INT(h) ((unsigned int)(h))
+# ifdef _WIN64
+# define FD2INT(h) ((intptr_t)(h))
+# else
+# define FD2INT(h) ((unsigned int)(h))
+# endif
#define FD_DBG(h) ((int)(intptr_t)(h))
#else
typedef int gnupg_fd_t;