1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

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 <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2023-07-18 14:21:19 +09:00
parent ae188a3357
commit 521ec40aea
No known key found for this signature in database
GPG Key ID: 640114AF89DE6054

View File

@ -38,7 +38,11 @@
typedef void *gnupg_fd_t; typedef void *gnupg_fd_t;
#define GNUPG_INVALID_FD ((void*)(-1)) #define GNUPG_INVALID_FD ((void*)(-1))
#define INT2FD(s) ((void *)(s)) #define INT2FD(s) ((void *)(s))
# ifdef _WIN64
# define FD2INT(h) ((intptr_t)(h))
# else
# define FD2INT(h) ((unsigned int)(h)) # define FD2INT(h) ((unsigned int)(h))
# endif
#define FD_DBG(h) ((int)(intptr_t)(h)) #define FD_DBG(h) ((int)(intptr_t)(h))
#else #else
typedef int gnupg_fd_t; typedef int gnupg_fd_t;