--- postgresql-9.2.4/src/interfaces/libpq/fe-secure.c.orig	2013-08-15 10:10:44.039355056 -0500
+++ postgresql-9.2.4/src/interfaces/libpq/fe-secure.c	2013-08-15 10:22:57.767650717 -0500
@@ -433,12 +433,20 @@
 #if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
 				case EWOULDBLOCK:
 #endif
+#ifndef WIN32
 				case EINTR:
+#else
+				case WSAEWOULDBLOCK:
+				case WSAEINTR:
+#endif
 					/* no error message, caller is expected to retry */
 					break;
 
 #ifdef ECONNRESET
 				case ECONNRESET:
+#ifdef WIN32
+				case WSAECONNRESET:
+#endif
 					printfPQExpBuffer(&conn->errorMessage,
 									  libpq_gettext(
 								"server closed the connection unexpectedly\n"
@@ -617,7 +625,12 @@
 #if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
 				case EWOULDBLOCK:
 #endif
+#ifndef WIN32
 				case EINTR:
+#else
+				case WSAEWOULDBLOCK:
+				case WSAEINTR:
+#endif
 					/* no error message, caller is expected to retry */
 					break;
 
@@ -629,6 +642,9 @@
 #ifdef ECONNRESET
 				case ECONNRESET:
 #endif
+#ifdef WIN32
+				case WSAECONNRESET:
+#endif
 					printfPQExpBuffer(&conn->errorMessage,
 									  libpq_gettext(
 								"server closed the connection unexpectedly\n"
