2 * src/interfaces/libpq/win32.h
4 #ifndef __win32_h_included
5 #define __win32_h_included
8 * Some compatibility functions
12 #define _ftime(a) ftime(a)
14 #define popen(a,b) _popen(a,b)
16 /* open provided elsewhere */
17 #define close(a) _close(a)
18 #define read(a,b,c) _read(a,b,c)
19 #define write(a,b,c) _write(a,b,c)
22 #undef EAGAIN /* doesn't apply on sockets */
24 #define EINTR WSAEINTR
26 #define EWOULDBLOCK WSAEWOULDBLOCK
29 #define ECONNRESET WSAECONNRESET
32 #define EINPROGRESS WSAEINPROGRESS
36 * support for handling Windows Socket errors
38 extern const char *winsock_strerror(int err, char *strerrbuf, size_t buflen);