[mapguide-commits] r7244 - in sandbox/adsk/2.4j: Common/Foundation/System Server/src/Common/Manager Server/src/Services/Tile

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Dec 6 17:54:39 PST 2012


Author: hubu
Date: 2012-12-06 17:54:38 -0800 (Thu, 06 Dec 2012)
New Revision: 7244

Modified:
   sandbox/adsk/2.4j/Common/Foundation/System/FileUtil.cpp
   sandbox/adsk/2.4j/Common/Foundation/System/FileUtil.h
   sandbox/adsk/2.4j/Server/src/Common/Manager/LogManager.cpp
   sandbox/adsk/2.4j/Server/src/Services/Tile/ServerTileService.cpp
Log:
Submit on behalf of Andy Zhang
Fix ticket http://trac.osgeo.org/mapguide/ticket/2195.

Modified: sandbox/adsk/2.4j/Common/Foundation/System/FileUtil.cpp
===================================================================
--- sandbox/adsk/2.4j/Common/Foundation/System/FileUtil.cpp	2012-12-06 18:12:24 UTC (rev 7243)
+++ sandbox/adsk/2.4j/Common/Foundation/System/FileUtil.cpp	2012-12-07 01:54:38 UTC (rev 7244)
@@ -203,7 +203,7 @@
 /// </summary>
 ///----------------------------------------------------------------------------
 
-bool MgFileUtil::GetFileStatus(CREFSTRING pathname, struct _stat& statInfo,
+bool MgFileUtil::GetFileStatus(CREFSTRING pathname, struct _stat64& statInfo,
     bool strict)
 {
     bool success = false;
@@ -227,7 +227,7 @@
         ACE_MT(ACE_GUARD_RETURN(ACE_Recursive_Thread_Mutex, ace_mon, sm_mutex, false));
 
 #ifdef _WIN32
-        success = ::_wstat(path.c_str(), &statInfo) == 0;
+        success = ::_wstat64(path.c_str(), &statInfo) == 0;
 #else
         success = ::stat(MgUtil::WideCharToMultiByte(path).c_str(), &statInfo) == 0;
 #endif
@@ -263,7 +263,7 @@
 
 bool MgFileUtil::PathnameExists(CREFSTRING pathname)
 {
-    struct _stat statInfo;
+    struct _stat64 statInfo;
 
     return GetFileStatus(pathname, statInfo);
 }
@@ -277,7 +277,7 @@
 bool MgFileUtil::IsDirectory(CREFSTRING pathname)
 {
     bool result = false;
-    struct _stat statInfo;
+    struct _stat64 statInfo;
 
     if (GetFileStatus(pathname, statInfo))
     {
@@ -744,7 +744,7 @@
 bool MgFileUtil::IsFile(CREFSTRING pathname)
 {
     bool result = false;
-    struct _stat statInfo;
+    struct _stat64 statInfo;
 
     if (GetFileStatus(pathname, statInfo))
     {
@@ -1145,7 +1145,7 @@
 ///
 MgDateTime MgFileUtil::GetFileCreationTime(CREFSTRING pathname)
 {
-    struct _stat statInfo;
+    struct _stat64 statInfo;
 
     if (GetFileStatus(pathname, statInfo, true))
     {
@@ -1161,7 +1161,7 @@
 ///
 MgDateTime MgFileUtil::GetFileModificationTime(CREFSTRING pathname)
 {
-    struct _stat statInfo;
+    struct _stat64 statInfo;
 
     if (GetFileStatus(pathname, statInfo, true))
     {
@@ -1177,7 +1177,7 @@
 ///
 INT64 MgFileUtil::GetFileSize(CREFSTRING pathname)
 {
-    struct _stat statInfo;
+    struct _stat64 statInfo;
 
     if (GetFileStatus(pathname, statInfo, true))
     {

Modified: sandbox/adsk/2.4j/Common/Foundation/System/FileUtil.h
===================================================================
--- sandbox/adsk/2.4j/Common/Foundation/System/FileUtil.h	2012-12-06 18:12:24 UTC (rev 7243)
+++ sandbox/adsk/2.4j/Common/Foundation/System/FileUtil.h	2012-12-07 01:54:38 UTC (rev 7244)
@@ -28,7 +28,7 @@
     #include <sys/file.h>
 
     #define _rmdir rmdir
-    #define _stat stat
+    #define _stat64 stat
 #endif
 
 class MG_FOUNDATION_API ACE_Recursive_Thread_Mutex;
@@ -67,7 +67,7 @@
     static void AppendSlashToEndOfPath(REFSTRING path);
     static void RemoveSlashFromEndOfPath(REFSTRING path);
 
-    static bool GetFileStatus(CREFSTRING pathname, struct _stat& statInfo,
+    static bool GetFileStatus(CREFSTRING pathname, struct _stat64& statInfo,
         bool strict = false);
     static bool PathnameExists(CREFSTRING pathname);
 

Modified: sandbox/adsk/2.4j/Server/src/Common/Manager/LogManager.cpp
===================================================================
--- sandbox/adsk/2.4j/Server/src/Common/Manager/LogManager.cpp	2012-12-06 18:12:24 UTC (rev 7243)
+++ sandbox/adsk/2.4j/Server/src/Common/Manager/LogManager.cpp	2012-12-07 01:54:38 UTC (rev 7244)
@@ -2233,7 +2233,7 @@
     STRING path;
     int statResult;
 #ifdef _WIN32
-    struct _stat statBuf;
+    struct _stat64 statBuf;
 #else
     struct stat statBuf;
 #endif
@@ -2246,7 +2246,7 @@
         path = m_path + name;
 
 #ifdef _WIN32
-        statResult = ::_wstat(path.c_str(), &statBuf);
+        statResult = ::_wstat64(path.c_str(), &statBuf);
 #else
         statResult = ::stat(MgUtil::WideCharToMultiByte(path).c_str(),
             &statBuf);

Modified: sandbox/adsk/2.4j/Server/src/Services/Tile/ServerTileService.cpp
===================================================================
--- sandbox/adsk/2.4j/Server/src/Services/Tile/ServerTileService.cpp	2012-12-06 18:12:24 UTC (rev 7243)
+++ sandbox/adsk/2.4j/Server/src/Services/Tile/ServerTileService.cpp	2012-12-07 01:54:38 UTC (rev 7244)
@@ -94,7 +94,7 @@
 bool MgServerTileService::DetectTileLockFile(CREFSTRING lockPathname)
 {
     bool found = false;
-    struct _stat lockFileInfo;
+    struct _stat64 lockFileInfo;
 
     // Check the lock file to see if another thread/process is writing the tile file.
     while (MgFileUtil::GetFileStatus(lockPathname, lockFileInfo))



More information about the mapguide-commits mailing list