1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

Per discussion earlier today, here is a fix that lets ereport() on win32

report socket errors.

Magnus Hagander
This commit is contained in:
Bruce Momjian
2004-04-22 03:51:24 +00:00
parent a4d9d3e028
commit b00d50d365
3 changed files with 42 additions and 3 deletions

View File

@ -37,7 +37,7 @@
*
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.134 2004/04/16 12:59:05 momjian Exp $
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.135 2004/04/22 03:51:09 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -1661,6 +1661,11 @@ useful_strerror(int errnum)
static char errorstr_buf[48];
const char *str;
#ifdef WIN32
/* Winsock error code range, per WinError.h */
if (errnum >= 10000 && errnum <= 11999)
return pgwin32_socket_strerror(errnum);
#endif
str = strerror(errnum);
/*