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:
@ -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);
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user