1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-29 10:41:53 +03:00

i've spotted a following problem using DBD::Pg under win32. winsock

functions do not set errno, so some normal conditions are treated as
fatal errors. e.g. fetching large tuples fails, as at some point recv()
returns EWOULDBLOCK. here's a patch, which replaces errno with
WSAGetLastError(). i've tried to to affect non-win32 code.

Dmitry Yurtaev
This commit is contained in:
Bruce Momjian
2001-07-20 17:45:06 +00:00
parent 8f75c1b0c7
commit 8c79f3c4a3
4 changed files with 36 additions and 18 deletions

View File

@ -25,13 +25,17 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.51 2001/07/15 13:45:04 petere Exp $
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.52 2001/07/20 17:45:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres_fe.h"
#include <errno.h>
#include <signal.h>
#include <time.h>
#ifdef WIN32
#include "win32.h"
#else
@ -39,10 +43,6 @@
#include <sys/time.h>
#endif
#include <errno.h>
#include <signal.h>
#include <time.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
#endif