1 /* 2 * src/interfaces/libpq/win32.h 3 */ 4 #ifndef __win32_h_included 5 #define __win32_h_included 6 7 /* 8 * Some compatibility functions 9 */ 10 11 /* open provided elsewhere */ 12 #define close(a) _close(a) 13 #define read(a,b,c) _read(a,b,c) 14 #define write(a,b,c) _write(a,b,c) 15 16 #undef EAGAIN /* doesn't apply on sockets */ 17 #undef EINTR 18 #define EINTR WSAEINTR 19 #ifndef EWOULDBLOCK 20 #define EWOULDBLOCK WSAEWOULDBLOCK 21 #endif 22 #ifndef ECONNRESET 23 #define ECONNRESET WSAECONNRESET 24 #endif 25 #ifndef EINPROGRESS 26 #define EINPROGRESS WSAEINPROGRESS 27 #endif 28 29 /* 30 * support for handling Windows Socket errors 31 */ 32 extern const char *winsock_strerror(int err, char *strerrbuf, size_t buflen); 33 34 #endif 35