diff --git a/src/estream.c b/src/estream.c --- a/src/estream.c +++ b/src/estream.c @@ -152,7 +152,7 @@ #endif #ifdef HAVE_W32_SYSTEM -# define IS_INVALID_FD(a) ((void*)(a) == (void*)(-1)) /* ?? FIXME. */ +# define IS_INVALID_FD(a) ((intptr_t)(a) == (-1)) #else # define IS_INVALID_FD(a) ((a) == -1) #endif @@ -4531,7 +4531,7 @@ #ifdef HAVE_W32CE_SYSTEM int fd = (int)file; #else - int fd = _open_osfhandle ((long)file, 0); + int fd = _open_osfhandle ((intptr_t)file, 0); if (fd == -1) { CloseHandle (file); diff --git a/src/spawn-w32.c b/src/spawn-w32.c --- a/src/spawn-w32.c +++ b/src/spawn-w32.c @@ -62,9 +62,9 @@ * FIXME: With Windows 64 this is no longer true. */ #define fd_to_handle(a) ((HANDLE)(a)) -#define handle_to_fd(a) ((int)(a)) +#define handle_to_fd(a) ((intptr_t)(a)) #define pid_to_handle(a) ((HANDLE)(a)) -#define handle_to_pid(a) ((int)(a)) +#define handle_to_pid(a) ((intptr_t)(a)) /* Return the maximum number of currently allowed open file