comparison lib/w32sock.h @ 16326:067aa8df247a

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.
author Marc-André Lureau <marcandre.lureau@redhat.com>
date Sat, 28 Jan 2012 13:23:31 +0100
parents 8250f2777afc
children a712776b11ce
comparison
equal deleted inserted replaced
16325:67d40006deab 16326:067aa8df247a
27 27
28 /* Get _get_osfhandle(). */ 28 /* Get _get_osfhandle(). */
29 #include "msvc-nothrow.h" 29 #include "msvc-nothrow.h"
30 30
31 #define FD_TO_SOCKET(fd) ((SOCKET) _get_osfhandle ((fd))) 31 #define FD_TO_SOCKET(fd) ((SOCKET) _get_osfhandle ((fd)))
32 #define SOCKET_TO_FD(fh) (_open_osfhandle ((long) (fh), O_RDWR | O_BINARY)) 32 #define SOCKET_TO_FD(fh) (_open_osfhandle ((intptr_t) (fh), O_RDWR | O_BINARY))
33 33
34 static inline void 34 static inline void
35 set_winsock_errno (void) 35 set_winsock_errno (void)
36 { 36 {
37 int err = WSAGetLastError (); 37 int err = WSAGetLastError ();