]> granicus.if.org Git - postgresql/blob - src/interfaces/libpq/win32.h
Additional spelling corrections
[postgresql] / src / interfaces / libpq / win32.h
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 #ifdef __BORLANDC__
11 #define _timeb timeb
12 #define _ftime(a) ftime(a)
13 #define _errno errno
14 #define popen(a,b) _popen(a,b)
15 #else
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)
20 #endif
21
22 #undef EAGAIN                                   /* doesn't apply on sockets */
23 #undef EINTR
24 #define EINTR WSAEINTR
25 #ifndef EWOULDBLOCK
26 #define EWOULDBLOCK WSAEWOULDBLOCK
27 #endif
28 #ifndef ECONNRESET
29 #define ECONNRESET WSAECONNRESET
30 #endif
31 #ifndef EINPROGRESS
32 #define EINPROGRESS WSAEINPROGRESS
33 #endif
34
35 /*
36  * support for handling Windows Socket errors
37  */
38 extern const char *winsock_strerror(int err, char *strerrbuf, size_t buflen);
39
40 #endif