diff --git a/apps/bsatool/bsatool.cpp b/apps/bsatool/bsatool.cpp index c0a6dcc81f..d87abc2850 100644 --- a/apps/bsatool/bsatool.cpp +++ b/apps/bsatool/bsatool.cpp @@ -1,4 +1,5 @@ #include +#include #include #include diff --git a/apps/essimporter/importer.cpp b/apps/essimporter/importer.cpp index d5ed43b8a0..35b92a4d08 100644 --- a/apps/essimporter/importer.cpp +++ b/apps/essimporter/importer.cpp @@ -1,7 +1,11 @@ #include "importer.hpp" + +#include + #include #include +#include #include #include diff --git a/apps/opencs/view/render/mousestate.cpp b/apps/opencs/view/render/mousestate.cpp index 206820194d..8aecc4a414 100644 --- a/apps/opencs/view/render/mousestate.cpp +++ b/apps/opencs/view/render/mousestate.cpp @@ -4,6 +4,8 @@ #include #include #include +#include +#include #include #include diff --git a/apps/opencs/view/render/overlaymask.cpp b/apps/opencs/view/render/overlaymask.cpp index 09f020354d..b43abb3ccf 100644 --- a/apps/opencs/view/render/overlaymask.cpp +++ b/apps/opencs/view/render/overlaymask.cpp @@ -1,5 +1,6 @@ #include "overlaymask.hpp" +#include #include #include diff --git a/apps/opencs/view/render/pagedworldspacewidget.cpp b/apps/opencs/view/render/pagedworldspacewidget.cpp index cf9edb5483..21fba4d4e8 100644 --- a/apps/opencs/view/render/pagedworldspacewidget.cpp +++ b/apps/opencs/view/render/pagedworldspacewidget.cpp @@ -12,6 +12,8 @@ #include #include #include +#include +#include #include #include "textoverlay.hpp" diff --git a/apps/opencs/view/render/textoverlay.cpp b/apps/opencs/view/render/textoverlay.cpp index c41d5f3180..14b60be935 100644 --- a/apps/opencs/view/render/textoverlay.cpp +++ b/apps/opencs/view/render/textoverlay.cpp @@ -5,9 +5,11 @@ #include #include +#include #include #include #include +#include #include #include #include diff --git a/apps/opencs/view/world/physicssystem.cpp b/apps/opencs/view/world/physicssystem.cpp index 2cbe17dcfa..891b175d5e 100644 --- a/apps/opencs/view/world/physicssystem.cpp +++ b/apps/opencs/view/world/physicssystem.cpp @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include #include diff --git a/apps/openmw/engine.cpp b/apps/openmw/engine.cpp index 4496490d42..9d40ebb1b0 100644 --- a/apps/openmw/engine.cpp +++ b/apps/openmw/engine.cpp @@ -4,6 +4,7 @@ #include #include +#include #include #include diff --git a/apps/openmw/mwworld/worldimp.cpp b/apps/openmw/mwworld/worldimp.cpp index f8de9f65b9..a1aa0166de 100644 --- a/apps/openmw/mwworld/worldimp.cpp +++ b/apps/openmw/mwworld/worldimp.cpp @@ -1,11 +1,15 @@ #include "worldimp.hpp" #if defined(_WIN32) && !defined(__MINGW32__) -#include +# if (_MSC_VER < 1900) +# include +# else +# include +# endif #elif defined HAVE_UNORDERED_MAP -#include +# include #else -#include +# include #endif #include "../mwbase/scriptmanager.hpp" #include "../mwscript/globalscripts.hpp" diff --git a/components/bsa/bsa_archive.cpp b/components/bsa/bsa_archive.cpp index 4f656f9c49..094b058fd9 100644 --- a/components/bsa/bsa_archive.cpp +++ b/components/bsa/bsa_archive.cpp @@ -104,7 +104,7 @@ public: void load() {} void unload() {} - DataStreamPtr open(const String& filename, bool readonly = true) const + virtual DataStreamPtr open(const String& filename, bool readonly = true) { index::const_iterator i = lookup_filename (filename); @@ -149,8 +149,8 @@ public: time_t getModifiedTime(const String&) { return 0; } - FileInfoListPtr findFileInfo(const String& pattern, bool recursive = true, - bool dirs = false) const + virtual FileInfoListPtr findFileInfo(const String& pattern, bool recursive = true, + bool dirs = false) { std::string normalizedPattern = normalize_path(pattern.begin(), pattern.end()); FileInfoListPtr ptr = FileInfoListPtr(new FileInfoList()); @@ -216,7 +216,7 @@ public: void load() {} void unload() {} - DataStreamPtr open(const String& filename, bool readonly = true) const + virtual DataStreamPtr open(const String& filename, bool readonly = true) { // Get a non-const reference to arc. This is a hack and it's all // OGRE's fault. You should NOT expect an open() command not to @@ -262,8 +262,8 @@ public: return ptr; } - FileInfoListPtr findFileInfo(const String& pattern, bool recursive = true, - bool dirs = false) const + virtual FileInfoListPtr findFileInfo(const String& pattern, bool recursive = true, + bool dirs = false) { std::string normalizedPattern = normalize_path(pattern.begin(), pattern.end()); FileInfoListPtr ptr = FileInfoListPtr(new FileInfoList()); diff --git a/components/files/configurationmanager.hpp b/components/files/configurationmanager.hpp index 5f0062c2e9..07b95f25a9 100644 --- a/components/files/configurationmanager.hpp +++ b/components/files/configurationmanager.hpp @@ -2,7 +2,11 @@ #define COMPONENTS_FILES_CONFIGURATIONMANAGER_HPP #if defined(_WIN32) && !defined(__MINGW32__) -#include +#if (_MSC_VER >= 1900) +#include +#else +#include +#endif #elif defined HAVE_UNORDERED_MAP #include #else diff --git a/components/settings/settings.cpp b/components/settings/settings.cpp index a9a78d0351..7827388b11 100644 --- a/components/settings/settings.cpp +++ b/components/settings/settings.cpp @@ -2,6 +2,7 @@ #include +#include // FIXME: workaround compilation error with OgreCommon.h included by OgreStringConverter.h #include #include diff --git a/components/terrain/terraingrid.cpp b/components/terrain/terraingrid.cpp index bb99ca23e4..feea61993d 100644 --- a/components/terrain/terraingrid.cpp +++ b/components/terrain/terraingrid.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include "chunk.hpp" diff --git a/libs/platform/strings.h b/libs/platform/strings.h index c0fbb1a1b2..305705044e 100644 --- a/libs/platform/strings.h +++ b/libs/platform/strings.h @@ -9,7 +9,9 @@ #elif defined(MSVC) || defined(_MSC_VER) # pragma warning(disable: 4996) # define strcasecmp stricmp -# define snprintf _snprintf +# if (_MSC_VER < 1900) +# define snprintf _snprintf +# endif #else # warning "Unable to determine your compiler, you should probably take a look here." # include // Just take a guess