diff --git a/applications/osgviewer/osgviewer.cpp b/applications/osgviewer/osgviewer.cpp index 248e9e891..4ea476a9b 100644 --- a/applications/osgviewer/osgviewer.cpp +++ b/applications/osgviewer/osgviewer.cpp @@ -14,6 +14,7 @@ #include #include +#include #include #include @@ -31,7 +32,6 @@ #include #include -#include #include diff --git a/include/osg/Types b/include/osg/Types new file mode 100644 index 000000000..9613dfb92 --- /dev/null +++ b/include/osg/Types @@ -0,0 +1,30 @@ +/* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2004 Robert Osfield + * + * This library is open source and may be redistributed and/or modified under + * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or + * (at your option) any later version. The full license is in LICENSE file + * included with this distribution, and on the openscenegraph.org website. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * OpenSceneGraph Public License for more details. +*/ + +#ifndef __OSG_TYPES +#define __OSG_TYPES + +#ifdef _MSC_VER +typedef __int8 int8_t; +typedef unsigned __int8 uint8_t; +typedef __int16 int16_t; +typedef unsigned __int16 uint16_t; +typedef __int32 int32_t; +typedef unsigned __int32 uint32_t; +typedef __int64 int64_t; +typedef unsigned __int64 uint64_t; +#else +#include +#endif + +#endif // __OSG_TYPES diff --git a/src/osgPlugins/ktx/ReaderWriterKTX.h b/src/osgPlugins/ktx/ReaderWriterKTX.h index 051b59b46..71bd4d899 100644 --- a/src/osgPlugins/ktx/ReaderWriterKTX.h +++ b/src/osgPlugins/ktx/ReaderWriterKTX.h @@ -12,19 +12,7 @@ */ #include - -#ifdef _MSC_VER -typedef __int8 int8_t; -typedef unsigned __int8 uint8_t; -typedef __int16 int16_t; -typedef unsigned __int16 uint16_t; -typedef __int32 int32_t; -typedef unsigned __int32 uint32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#else -#include -#endif +#include struct KTXTexHeader { diff --git a/src/osgPlugins/osg/BinaryStreamOperator.h b/src/osgPlugins/osg/BinaryStreamOperator.h index 3505dfb56..479a844e1 100644 --- a/src/osgPlugins/osg/BinaryStreamOperator.h +++ b/src/osgPlugins/osg/BinaryStreamOperator.h @@ -2,15 +2,9 @@ #define OSG2_BINARYSTREAMOPERATOR #include +#include #include -#if defined(_MSC_VER) -typedef unsigned __int32 uint32_t; -typedef __int32 int32_t; -#else -#include -#endif - class BinaryOutputIterator : public osgDB::OutputIterator { @@ -107,7 +101,7 @@ public: virtual void writeWrappedString( const std::string& str ) { writeString( str ); } - + protected: std::vector _beginPositions; }; @@ -258,7 +252,7 @@ public: virtual void readWrappedString( std::string& str ) { readString( str ); } - + virtual void advanceToCurrentEndBracket() { if ( _supportBinaryBrackets && _beginPositions.size()>0 ) diff --git a/src/osgPlugins/pvr/ReaderWriterPVR.cpp b/src/osgPlugins/pvr/ReaderWriterPVR.cpp index c41b0d906..a1a6d6dca 100644 --- a/src/osgPlugins/pvr/ReaderWriterPVR.cpp +++ b/src/osgPlugins/pvr/ReaderWriterPVR.cpp @@ -19,20 +19,7 @@ #include #include -#if defined(_MSC_VER) -typedef UINT64 uint64_t; -typedef INT64 int64_t; -typedef UINT32 uint32_t; -typedef INT32 int32_t; -typedef UINT16 uint16_t; -typedef UINT8 uint8_t; -#else -#if defined __sun || defined __hpux -#include -#else -#include -#endif -#endif +#include using namespace osg;