[xml] Building on Win32



When building the latest version from anonymous CVS on WIN 32,
compilation failed on nanohttp.c because EAGAIN and EINTR are not
defined.  The following patch corrects this.

--
Brian Stafford

Index: nanohttp.c
===================================================================
RCS file: /cvs/gnome/gnome-xml/nanohttp.c,v
retrieving revision 1.44
diff -u -r1.44 nanohttp.c
--- nanohttp.c  2001/07/25 20:25:21     1.44
+++ nanohttp.c  2001/07/31 14:59:08
@@ -415,7 +415,9 @@
             if (nsent>0)
                 total_sent += nsent;
            else if ( ( nsent == -1 ) &&
+#if defined(EAGAIN) && EAGAIN != EWOULDBLOCK
                      ( socket_errno( ) != EAGAIN ) &&
+#endif
                        ( socket_errno( ) != EWOULDBLOCK ) ) {
                xmlGenericError( xmlGenericErrorContext,
                                "xmlNanoHTTPSend error:  %s",
@@ -540,7 +542,11 @@
        FD_ZERO(&rfd);
        FD_SET(ctxt->fd, &rfd);

-       if ( (select(ctxt->fd+1, &rfd, NULL, NULL, &tv)<1) && (errno != EINTR) )
+       if ( (select(ctxt->fd+1, &rfd, NULL, NULL, &tv)<1)
+#if defined(EINTR)
+            && (errno != EINTR)
+#endif
+          )
                return(0);
     }
     return(0);






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]