# HG changeset patch # User Chris Cannam # Date 1476795846 -3600 # Node ID 046f05fa31f3bf8e4358280b656ff76400f8f9cf # Parent c811991a5efafa9fee2966795c6ea6a2d1211422# Parent f50ded4b951c9ba4938b881ccefa2d9fa8e82030 Merge from branch "3.0-integration" diff -r f50ded4b951c -r 046f05fa31f3 base/Profiler.cpp --- a/base/Profiler.cpp Tue Oct 18 14:03:35 2016 +0100 +++ b/base/Profiler.cpp Tue Oct 18 14:04:06 2016 +0100 @@ -47,15 +47,11 @@ dump(); } +#ifndef NO_TIMING void Profiles::accumulate( -#ifndef NO_TIMING const char* id, clock_t time, RealTime rt -#else - const char*, clock_t, RealTime -#endif ) { -#ifndef NO_TIMING ProfilePair &pair(m_profiles[id]); ++pair.first; pair.second.first += time; @@ -72,8 +68,8 @@ if (rt > worstPair.second) { worstPair.second = rt; } +} #endif -} void Profiles::dump() const { diff -r f50ded4b951c -r 046f05fa31f3 base/Profiler.h --- a/base/Profiler.h Tue Oct 18 14:03:35 2016 +0100 +++ b/base/Profiler.h Tue Oct 18 14:04:06 2016 +0100 @@ -25,8 +25,6 @@ #include "system/System.h" -#include -#include #include #include "RealTime.h" @@ -41,6 +39,11 @@ #endif #endif +#ifndef NO_TIMING +#include +#include +#endif + /** * Profiling classes */ @@ -56,12 +59,15 @@ static Profiles* getInstance(); ~Profiles(); +#ifndef NO_TIMING void accumulate(const char* id, clock_t time, RealTime rt); +#endif void dump() const; protected: Profiles(); +#ifndef NO_TIMING typedef std::pair TimePair; typedef std::pair ProfilePair; typedef std::map ProfileMap; @@ -70,6 +76,7 @@ ProfileMap m_profiles; LastCallMap m_lastCalls; WorstCallMap m_worstCalls; +#endif static Profiles* m_instance; }; diff -r f50ded4b951c -r 046f05fa31f3 base/RealTime.cpp --- a/base/RealTime.cpp Tue Oct 18 14:03:35 2016 +0100 +++ b/base/RealTime.cpp Tue Oct 18 14:04:06 2016 +0100 @@ -24,7 +24,6 @@ #include #include "RealTime.h" -#include "sys/time.h" #include "Debug.h" diff -r f50ded4b951c -r 046f05fa31f3 base/RealTime.h --- a/base/RealTime.h Tue Oct 18 14:03:35 2016 +0100 +++ b/base/RealTime.h Tue Oct 18 14:04:06 2016 +0100 @@ -28,7 +28,11 @@ #include -struct timeval; +#ifdef _MSC_VER +#include "winsock.h" // struct timeval is in here +#else +#include "sys/time.h" +#endif /** * RealTime represents time values to nanosecond precision diff -r f50ded4b951c -r 046f05fa31f3 base/TempDirectory.cpp --- a/base/TempDirectory.cpp Tue Oct 18 14:03:35 2016 +0100 +++ b/base/TempDirectory.cpp Tue Oct 18 14:04:06 2016 +0100 @@ -25,7 +25,7 @@ #include #include -#include +//#include #include TempDirectory * diff -r f50ded4b951c -r 046f05fa31f3 data/fileio/FileReadThread.cpp --- a/data/fileio/FileReadThread.cpp Tue Oct 18 14:03:35 2016 +0100 +++ b/data/fileio/FileReadThread.cpp Tue Oct 18 14:04:06 2016 +0100 @@ -19,7 +19,14 @@ #include "base/Thread.h" #include + +#ifdef _MSC_VER +#include +#define _lseek lseek +#else #include +#endif + #include //#define DEBUG_FILE_READ_THREAD 1 diff -r f50ded4b951c -r 046f05fa31f3 svcore.pro --- a/svcore.pro Tue Oct 18 14:03:35 2016 +0100 +++ b/svcore.pro Tue Oct 18 14:04:06 2016 +0100 @@ -17,8 +17,10 @@ LIBS += -L../sv-dependency-builds/win32-mingw/lib } win32-msvc* { - INCLUDEPATH += ../sv-dependency-builds/win32-msvc/include - LIBS += -L../sv-dependency-builds/win32-msvc/lib + # We actually expect MSVC to be used only for 64-bit builds, + # though the qmake spec is still called win32-msvc* + INCLUDEPATH += ../sv-dependency-builds/win64-msvc/include + LIBS += -L../sv-dependency-builds/win64-msvc/lib } macx* { INCLUDEPATH += ../sv-dependency-builds/osx/include @@ -30,6 +32,9 @@ macx* { DEFINES += HAVE_COREAUDIO } + win32-msvc* { + DEFINES += NOMINMAX + } } CONFIG += staticlib qt thread warn_on stl rtti exceptions c++11 diff -r f50ded4b951c -r 046f05fa31f3 system/System.h --- a/system/System.h Tue Oct 18 14:03:35 2016 +0100 +++ b/system/System.h Tue Oct 18 14:04:06 2016 +0100 @@ -59,6 +59,11 @@ #define getpid _getpid +#if defined(_MSC_VER) +#include +typedef SSIZE_T ssize_t; +#endif + extern "C" { /* usleep is now in mingw void usleep(unsigned long usec);