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 2007/07/16 09:36:42 UTC

svn commit: r556533 - /xerces/c/trunk/src/xercesc/util/FileManagers/WindowsFileMgr.cpp

Author: amassari
Date: Mon Jul 16 00:36:41 2007
New Revision: 556533

URL: http://svn.apache.org/viewvc?view=rev&rev=556533
Log:
Be compatible with Platform SDK older than 2003

Modified:
    xerces/c/trunk/src/xercesc/util/FileManagers/WindowsFileMgr.cpp

Modified: xerces/c/trunk/src/xercesc/util/FileManagers/WindowsFileMgr.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/FileManagers/WindowsFileMgr.cpp?view=diff&rev=556533&r1=556532&r2=556533
==============================================================================
--- xerces/c/trunk/src/xercesc/util/FileManagers/WindowsFileMgr.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/FileManagers/WindowsFileMgr.cpp Mon Jul 16 00:36:41 2007
@@ -26,6 +26,9 @@
 #include <xercesc/util/XMLString.hpp>
 #include <xercesc/util/XMLUniDefs.hpp>
 
+#ifndef INVALID_SET_FILE_POINTER
+#define INVALID_SET_FILE_POINTER ((DWORD)-1)
+#endif
 
 XERCES_CPP_NAMESPACE_BEGIN
 
@@ -237,7 +240,7 @@
 		ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::CPtr_PointerIsZero, manager);
 
     // Seek to the start of the file
-    if (::SetFilePointer(f, 0, 0, FILE_BEGIN) == 0xFFFFFFFF)
+    if (::SetFilePointer(f, 0, 0, FILE_BEGIN) == INVALID_SET_FILE_POINTER)
         ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotResetFile, manager);
 }
 
@@ -265,7 +268,7 @@
 		ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::CPtr_PointerIsZero, manager);
 	
     DWORD high=0;
-    DWORD low=GetFileSize(f, &high);
+    DWORD low=::GetFileSize(f, &high);
     if(low==INVALID_FILE_SIZE && GetLastError()!=NO_ERROR)
         // TODO: find a better exception
 		ThrowXMLwithMemMgr(XMLPlatformUtilsException, XMLExcepts::File_CouldNotGetCurPos, manager);



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