From cf7387693da99a088dbf758bfe41e6b1373fca25 Mon Sep 17 00:00:00 2001 From: Andrew Dowsey Date: Mon, 8 Dec 2014 22:07:17 +0000 Subject: [PATCH] Fixed use of old 'stat' function that leads to vs build not being able to access large files --- .../include/spatialindex/tools/Tools.h | 2 +- .../src/storagemanager/DiskStorageManager.cc | 14 +++++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/spatialindex-src-1.8.5/include/spatialindex/tools/Tools.h b/spatialindex-src-1.8.5/include/spatialindex/tools/Tools.h index e6586b238..f75a92740 100644 --- a/spatialindex-src-1.8.5/include/spatialindex/tools/Tools.h +++ b/spatialindex-src-1.8.5/include/spatialindex/tools/Tools.h @@ -40,7 +40,7 @@ // Nuke this annoying warning. See http://www.unknownroad.com/rtfm/VisualStudio/warningC4251.html #pragma warning( disable: 4251 ) -#pragma warning( disable: 1125 ) +//#pragma warning( disable: 1125 ) #endif #include diff --git a/spatialindex-src-1.8.5/src/storagemanager/DiskStorageManager.cc b/spatialindex-src-1.8.5/src/storagemanager/DiskStorageManager.cc index 817fec661..daaefe07c 100644 --- a/spatialindex-src-1.8.5/src/storagemanager/DiskStorageManager.cc +++ b/spatialindex-src-1.8.5/src/storagemanager/DiskStorageManager.cc @@ -29,6 +29,7 @@ #include // For checking if a file exists - hobu +#define _USE_INT64 1 // awd97 - needed for large file support on VS2010 #include #include @@ -58,20 +59,31 @@ bool CheckFilesExists(Tools::PropertySet& ps) if (dat_name.m_varType != Tools::VT_EMPTY) idx = std::string(dat_name.m_val.pcVal); if (fn.m_varType != Tools::VT_EMPTY) filename = std::string(fn.m_val.pcVal); +#if (defined _WIN32 || defined _WIN64 || defined WIN32 || defined WIN64) && !defined __GNUC__ + struct __stat64 stats; +#else struct stat stats; - +#endif std::ostringstream os; int ret; os << filename <<"."<