You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2009/06/30 14:32:24 UTC

svn commit: r789693 - in /xerces/c/trunk/src/xercesc/util/NetAccessors/Curl: CurlURLInputStream.cpp CurlURLInputStream.hpp

Author: amassari
Date: Tue Jun 30 12:32:24 2009
New Revision: 789693

URL: http://svn.apache.org/viewvc?rev=789693&view=rev
Log:
Include system-dependent files only if the appropriate macro is defined (XERCESC-1852)

Modified:
    xerces/c/trunk/src/xercesc/util/NetAccessors/Curl/CurlURLInputStream.cpp
    xerces/c/trunk/src/xercesc/util/NetAccessors/Curl/CurlURLInputStream.hpp

Modified: xerces/c/trunk/src/xercesc/util/NetAccessors/Curl/CurlURLInputStream.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/NetAccessors/Curl/CurlURLInputStream.cpp?rev=789693&r1=789692&r2=789693&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/NetAccessors/Curl/CurlURLInputStream.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/NetAccessors/Curl/CurlURLInputStream.cpp Tue Jun 30 12:32:24 2009
@@ -19,13 +19,25 @@
  * $Id$
  */
 
+#if HAVE_CONFIG_H
+  #include <config.h>
+#endif
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/time.h>
+#if HAVE_ERRNO_H
+  #include <errno.h>
+#endif
+#if HAVE_UNISTD_H
+  #include <unistd.h>
+#endif
+#if HAVE_SYS_TYPES_H
+  #include <sys/types.h>
+#endif
+#if HAVE_SYS_TIME_H
+  #include <sys/time.h>
+#endif
 
 #include <xercesc/util/XercesDefs.hpp>
 #include <xercesc/util/XMLNetAccessor.hpp>
@@ -310,10 +322,10 @@
         FD_ZERO(&readSet);
         FD_ZERO(&writeSet);
         FD_ZERO(&exceptSet);
-			
+
         // Ask curl for the file descriptors to wait on
         curl_multi_fdset(fMulti, &readSet, &writeSet, &exceptSet, &fdcnt);
-			
+
         // Wait on the file descriptors
         timeval tv;
         tv.tv_sec  = 2;

Modified: xerces/c/trunk/src/xercesc/util/NetAccessors/Curl/CurlURLInputStream.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/NetAccessors/Curl/CurlURLInputStream.hpp?rev=789693&r1=789692&r2=789693&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/NetAccessors/Curl/CurlURLInputStream.hpp (original)
+++ xerces/c/trunk/src/xercesc/util/NetAccessors/Curl/CurlURLInputStream.hpp Tue Jun 30 12:32:24 2009
@@ -103,10 +103,10 @@
     
     XMLURL				fURLSource;
     
-    unsigned long       fTotalBytesRead;
+    XMLSize_t           fTotalBytesRead;
     XMLByte*			fWritePtr;
-    unsigned long		fBytesRead;
-    unsigned long		fBytesToRead;
+    XMLSize_t           fBytesRead;
+    XMLSize_t           fBytesToRead;
     bool				fDataAvailable;
     
     // Overflow buffer for when curl writes more data to us



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org