--- gnutls.orig/lib/gnutls_buffers.c	2006-03-08 18:26:31.000000000 +0100
+++ gnutls/lib/gnutls_buffers.c	2006-03-08 18:25:58.000000000 +0100
@@ -244,7 +244,11 @@
 	    _gnutls_read_log("READ: %d returned from %d, errno=%d\n", i,
 			     fd, errno);
 
+#ifdef _WIN32
+	    if (WSAGetLastError() == WSAEWOULDBLOCK) {
+#else
 	    if (errno == EAGAIN || errno == EINTR) {
+#endif
 		if (sizeOfPtr - left > 0) {
 
 		    _gnutls_read_log("READ: returning %d bytes from %d\n",
@@ -635,7 +639,11 @@
 						     left);
 
 	if (i == -1) {
+#ifdef _WIN32
+	    if (WSAGetLastError() == WSAEWOULDBLOCK) {
+#else
 	    if (errno == EAGAIN || errno == EINTR) {
+#endif
 		session->internals.record_send_buffer_prev_size +=
 		    n - left;
 
