aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/libpq/fe-misc.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-07-20 17:45:06 +0000
committerBruce Momjian <bruce@momjian.us>2001-07-20 17:45:06 +0000
commit8c79f3c4a30177e8c160fdd158813d4d8318cf5a (patch)
treead7931e28ab84f5fc30e25239129e404880fb440 /src/interfaces/libpq/fe-misc.c
parent8f75c1b0c79868fcdde584b91e96ba05e862c255 (diff)
downloadpostgresql-8c79f3c4a30177e8c160fdd158813d4d8318cf5a.tar.gz
postgresql-8c79f3c4a30177e8c160fdd158813d4d8318cf5a.zip
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
Diffstat (limited to 'src/interfaces/libpq/fe-misc.c')
-rw-r--r--src/interfaces/libpq/fe-misc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c
index af7998ce97c..6a4d753cebf 100644
--- a/src/interfaces/libpq/fe-misc.c
+++ b/src/interfaces/libpq/fe-misc.c
@@ -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