Header And Logo

PostgreSQL
| The world's most advanced open source database.

win32.h

Go to the documentation of this file.
00001 /*
00002  * src/interfaces/libpq/win32.h
00003  */
00004 #ifndef __win32_h_included
00005 #define __win32_h_included
00006 
00007 /*
00008  * Some compatibility functions
00009  */
00010 #ifdef __BORLANDC__
00011 #define _timeb timeb
00012 #define _ftime(a) ftime(a)
00013 #define _errno errno
00014 #define popen(a,b) _popen(a,b)
00015 #else
00016 /* open provided elsewhere */
00017 #define close(a) _close(a)
00018 #define read(a,b,c) _read(a,b,c)
00019 #define write(a,b,c) _write(a,b,c)
00020 #endif
00021 
00022 #undef EAGAIN                   /* doesn't apply on sockets */
00023 #undef EINTR
00024 #define EINTR WSAEINTR
00025 #ifndef EWOULDBLOCK
00026 #define EWOULDBLOCK WSAEWOULDBLOCK
00027 #endif
00028 #ifndef ECONNRESET
00029 #define ECONNRESET WSAECONNRESET
00030 #endif
00031 #ifndef EINPROGRESS
00032 #define EINPROGRESS WSAEINPROGRESS
00033 #endif
00034 
00035 /*
00036  * support for handling Windows Socket errors
00037  */
00038 extern const char *winsock_strerror(int err, char *strerrbuf, size_t buflen);
00039 
00040 #endif