39 #define libpq_gettext(x) (x)
54 WSAEINTR,
"Interrupted system call"
57 WSAEBADF,
"Bad file number"
60 WSAEACCES,
"Permission denied"
63 WSAEFAULT,
"Bad address"
66 WSAEINVAL,
"Invalid argument"
69 WSAEMFILE,
"Too many open sockets"
72 WSAEWOULDBLOCK,
"Operation would block"
75 WSAEINPROGRESS,
"Operation now in progress"
78 WSAEALREADY,
"Operation already in progress"
81 WSAENOTSOCK,
"Socket operation on non-socket"
84 WSAEDESTADDRREQ,
"Destination address required"
87 WSAEMSGSIZE,
"Message too long"
90 WSAEPROTOTYPE,
"Protocol wrong type for socket"
93 WSAENOPROTOOPT,
"Bad protocol option"
96 WSAEPROTONOSUPPORT,
"Protocol not supported"
99 WSAESOCKTNOSUPPORT,
"Socket type not supported"
102 WSAEOPNOTSUPP,
"Operation not supported on socket"
105 WSAEPFNOSUPPORT,
"Protocol family not supported"
108 WSAEAFNOSUPPORT,
"Address family not supported"
111 WSAEADDRINUSE,
"Address already in use"
114 WSAEADDRNOTAVAIL,
"Cannot assign requested address"
117 WSAENETDOWN,
"Network is down"
120 WSAENETUNREACH,
"Network is unreachable"
123 WSAENETRESET,
"Net connection reset"
126 WSAECONNABORTED,
"Software caused connection abort"
129 WSAECONNRESET,
"Connection reset by peer"
132 WSAENOBUFS,
"No buffer space available"
135 WSAEISCONN,
"Socket is already connected"
138 WSAENOTCONN,
"Socket is not connected"
141 WSAESHUTDOWN,
"Cannot send after socket shutdown"
144 WSAETOOMANYREFS,
"Too many references, cannot splice"
147 WSAETIMEDOUT,
"Connection timed out"
150 WSAECONNREFUSED,
"Connection refused"
153 WSAELOOP,
"Too many levels of symbolic links"
156 WSAENAMETOOLONG,
"File name too long"
159 WSAEHOSTDOWN,
"Host is down"
162 WSAEHOSTUNREACH,
"No route to host"
165 WSAENOTEMPTY,
"Directory not empty"
168 WSAEPROCLIM,
"Too many processes"
171 WSAEUSERS,
"Too many users"
174 WSAEDQUOT,
"Disc quota exceeded"
177 WSAESTALE,
"Stale NFS file handle"
180 WSAEREMOTE,
"Too many levels of remote in path"
183 WSASYSNOTREADY,
"Network system is unavailable"
186 WSAVERNOTSUPPORTED,
"Winsock version out of range"
189 WSANOTINITIALISED,
"WSAStartup not yet called"
192 WSAEDISCON,
"Graceful shutdown in progress"
195 WSAHOST_NOT_FOUND,
"Host not found"
198 WSATRY_AGAIN,
"NA Host not found / SERVFAIL"
201 WSANO_RECOVERY,
"Non recoverable FORMERR||REFUSED||NOTIMP"
204 WSANO_DATA,
"No host data of that type was found"
226 strcpy(
dest,
e->description);
268 #define DLLS_SIZE (sizeof(dlls)/sizeof(struct MessageDLL))
292 LOAD_LIBRARY_AS_DATAFILE);
298 flags = FORMAT_MESSAGE_FROM_SYSTEM
299 | FORMAT_MESSAGE_IGNORE_INSERTS
300 | (
dlls[
i].
handle ? FORMAT_MESSAGE_FROM_HMODULE : 0);
302 success = 0 != FormatMessage(flags,
304 MAKELANGID(LANG_ENGLISH, SUBLANG_DEFAULT),
305 strerrbuf, buflen - 64,
313 strerrbuf[buflen - 1] =
'\0';
314 offs = strlen(strerrbuf);
315 if (offs > (
int) buflen - 64)
#define pg_attribute_format_arg(a)
void err(int eval, const char *fmt,...)
static int LookupWSErrorMessage(DWORD err, char *dest)
static struct WSErrorEntry WSErrors[]
static struct MessageDLL dlls[]
const char * winsock_strerror(int err, char *strerrbuf, size_t buflen)