Mercurial > hg > svcore
changeset 1217:046f05fa31f3 msvc2015_64
Merge from branch "3.0-integration"
author | Chris Cannam |
---|---|
date | Tue, 18 Oct 2016 14:04:06 +0100 |
parents | c811991a5efa (diff) f50ded4b951c (current diff) |
children | 6b847a59d908 |
files | data/fileio/MatrixFile.cpp data/fileio/MatrixFile.h svcore.pro |
diffstat | 8 files changed, 36 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- 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 {
--- 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 <ctime> -#include <sys/time.h> #include <map> #include "RealTime.h" @@ -41,6 +39,11 @@ #endif #endif +#ifndef NO_TIMING +#include <ctime> +#include <sys/time.h> +#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<clock_t, RealTime> TimePair; typedef std::pair<int, TimePair> ProfilePair; typedef std::map<const char *, ProfilePair> ProfileMap; @@ -70,6 +76,7 @@ ProfileMap m_profiles; LastCallMap m_lastCalls; WorstCallMap m_worstCalls; +#endif static Profiles* m_instance; };
--- 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 <sstream> #include "RealTime.h" -#include "sys/time.h" #include "Debug.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 <vamp-hostsdk/RealTime.h> -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
--- 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 <iostream> #include <cassert> -#include <unistd.h> +//#include <unistd.h> #include <time.h> TempDirectory *
--- 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 <iostream> + +#ifdef _MSC_VER +#include <io.h> +#define _lseek lseek +#else #include <unistd.h> +#endif + #include <cstdio> //#define DEBUG_FILE_READ_THREAD 1
--- 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
--- 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 <BaseTsd.h> +typedef SSIZE_T ssize_t; +#endif + extern "C" { /* usleep is now in mingw void usleep(unsigned long usec);