After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 58012 - xmlNanoHttp.c no EAGAIN, EINTR on win32
xmlNanoHttp.c no EAGAIN, EINTR on win32
Status: VERIFIED FIXED
Product: libxslt
Classification: Platform
Component: general
unspecified
Other Windows
: Normal normal
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on:
Blocks:
 
 
Reported: 2001-07-24 22:22 UTC by Tom Moog
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tom Moog 2001-07-24 22:22:29 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;
	    }
Comment 1 Daniel Veillard 2001-08-13 09:37:03 UTC
Okay this should have been fixed in CVS.
Double check by grabbing the cvs snapshots from
ftp://xmlsoft.org/

Daniel
Comment 2 Daniel Veillard 2001-08-15 15:30:41 UTC
Should be closed by 2.4.2, 

  thanks,

Daniel
Comment 3 Daniel Veillard 2001-08-15 15:30:59 UTC
Should be closed by 2.4.2, 

  thanks,

Daniel