GNOME Bugzilla – Bug 58012
xmlNanoHttp.c no EAGAIN, EINTR on win32
Last modified: 2009-08-15 18:40:50 UTC
File strio.h near line 45 ========================= Errors when NDEBUG already defined. Replace with: #ifndef DEBUG #ifndef NDEBUG # define NDEBUG #endif #endif File win32config.h near line 24 ============================== Missing: #define EINTR WSAEINTR File nanoHttp.c near line 407 ============================ EAGAIN is undefined in win32 Fix using #ifdefined(EAGAIN) as in previous version of libxml: static int xmlNanoHTTPSend(xmlNanoHTTPCtxtPtr ctxt, const char * xmt_ptr, int outlen) { int total_sent = 0; if ( (ctxt->state & XML_NANO_HTTP_WRITE) && (xmt_ptr != NULL ) ) { while (total_sent < outlen) { int nsent = send(ctxt->fd, xmt_ptr + total_sent, outlen - total_sent, 0); if (nsent>0) total_sent += nsent; #if defined(EAGAIN) && EAGAIN != EWOULDBLOCK else if ( ( nsent == -1 ) && ( socket_errno( ) != EAGAIN ) && ( socket_errno( ) != EWOULDBLOCK ) ) { #else else if ( ( nsent == -1 ) && ( socket_errno( ) != EWOULDBLOCK ) ) { #endif xmlGenericError( xmlGenericErrorContext, "xmlNanoHTTPSend error: %s", strerror( socket_errno( ) ) ); if ( total_sent == 0 ) total_sent = -1; break; }
Okay this should have been fixed in CVS. Double check by grabbing the cvs snapshots from ftp://xmlsoft.org/ Daniel
Should be closed by 2.4.2, thanks, Daniel