+2012-01-28 Marc-André Lureau <marcandre.lureau@redhat.com> (tiny change)
+
+ accept4, fcntl, socket modules: Avoid warnings on x86_64 mingw64.
+ * lib/accept4.c (accept4): Use intptr_t to convert handle pointer to
+ an integer.
+ * lib/fcntl.c (dupfd): Likewise.
+ * lib/w32sock.h (SOCKET_TO_FD): Likewise.
+
2012-01-28 Bruno Haible <bruno@clisp.org>
fcntl: Avoid compilation error on native Windows.
/* Closing fd before allocating the new fd ensures that the new fd will
have the minimum possible value. */
close (fd);
- nfd = _open_osfhandle ((long) new_handle,
+ nfd = _open_osfhandle ((intptr_t) new_handle,
O_NOINHERIT | (flags & (O_TEXT | O_BINARY)));
if (nfd < 0)
{
result = -1;
break;
}
- duplicated_fd = _open_osfhandle ((long) new_handle, flags);
+ duplicated_fd = _open_osfhandle ((intptr_t) new_handle, flags);
if (duplicated_fd < 0)
{
CloseHandle (new_handle);
#include "msvc-nothrow.h"
#define FD_TO_SOCKET(fd) ((SOCKET) _get_osfhandle ((fd)))
-#define SOCKET_TO_FD(fh) (_open_osfhandle ((long) (fh), O_RDWR | O_BINARY))
+#define SOCKET_TO_FD(fh) (_open_osfhandle ((intptr_t) (fh), O_RDWR | O_BINARY))
static inline void
set_winsock_errno (void)