* gnutls.c (emacs_gnutls_write): If we're trying to write before
gnutls is ready, return EAGAIN as the errno.
+2010-10-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnutls.c (emacs_gnutls_write): If we're trying to write before
+ gnutls is ready, return EAGAIN as the errno.
+
2010-10-10 Dan Nicolaescu <dann@ics.uci.edu>
* vm-limit.c:
register int rtnval, bytes_written;
gnutls_session_t state = proc->gnutls_state;
- if (proc->gnutls_initstage != GNUTLS_STAGE_READY)
+ if (proc->gnutls_initstage != GNUTLS_STAGE_READY) {
+#ifdef EWOULDBLOCK
+ errno = EWOULDBLOCK;
+#endif
+#ifdef EAGAIN
+ errno = EAGAIN;
+#endif
return -1;
+ }
bytes_written = 0;