From 8882fb697e7a0ea0f8ed8a7f1feabe2116201d8e Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 14 Dec 2015 17:59:45 +0000 Subject: [PATCH] From Wojciech Lewandowski, Visual Studio 2008 compatibility fix Two fixed files: osgPlugins/osgjs/JSON_Objects osgPlugins/stl/ReaderWriterSTL.cpp. They did not compile with VS 2008 (recent master from Github). It looks like they defined stdint types (missing in VS 2008) but code using them also included header. Errors were caused by minor differences in signed int definitions. I just removed own definitions and added include instead. It solves the problem and makes the code clearer now. --- src/osgPlugins/osgjs/JSON_Objects | 16 +--------------- src/osgPlugins/stl/ReaderWriterSTL.cpp | 18 +----------------- 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/src/osgPlugins/osgjs/JSON_Objects b/src/osgPlugins/osgjs/JSON_Objects index 351b58293..3977f6d3b 100644 --- a/src/osgPlugins/osgjs/JSON_Objects +++ b/src/osgPlugins/osgjs/JSON_Objects @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -18,21 +19,6 @@ #include "json_stream" -#ifdef WIN32 - #if defined(__MINGW32__) || (!defined(_MSC_VER) || _MSC_VER<1600) - typedef unsigned __int8 uint8_t; - typedef unsigned __int16 uint16_t; - typedef unsigned __int32 uint32_t; - typedef signed __int8 int8_t; - typedef signed __int16 int16_t; - typedef signed __int32 int32_t; - #else - #include - #endif -#else - #include -#endif - class WriteVisitor; struct Vec5 diff --git a/src/osgPlugins/stl/ReaderWriterSTL.cpp b/src/osgPlugins/stl/ReaderWriterSTL.cpp index 947f30072..b951609b6 100644 --- a/src/osgPlugins/stl/ReaderWriterSTL.cpp +++ b/src/osgPlugins/stl/ReaderWriterSTL.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -43,23 +44,6 @@ #include #include - - -#if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600) - -typedef unsigned __int8 uint8_t; -typedef unsigned __int16 uint16_t; -typedef unsigned __int32 uint32_t; -typedef signed __int8 int8_t; -typedef signed __int16 int16_t; -typedef signed __int32 int32_t; - -#else - -#include - -#endif - #include struct STLOptionsStruct {