fixed some linux issues

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@186 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
pull/1/head
alil 2008-10-19 19:51:24 +00:00
parent 2da2835b29
commit c0148c090f
4 changed files with 14 additions and 5 deletions

View File

@ -611,7 +611,12 @@ void AC3DImporter::InternReadFile( const std::string& pFile,
// print the file format version to the console
unsigned int version = HexDigitToDecimal( buffer[4] );
char msg[3];::_itoa(version,msg,10);
char msg[3];
#if defined(_MSC_VER)
::_itoa(version,msg,10);
#else
snprintf(msg, 3, "%d", version); //itoa is not available under linux
#endif
DefaultLogger::get()->info(std::string("AC3D file format version: ") + msg);
std::vector<Material> materials;

View File

@ -105,10 +105,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# include "NFFLoader.h"
#endif
#ifndef AI_BUILD_NO_RAW_IMPORTER
# include "RAWLoader.h"
# include "RawLoader.h"
#endif
#ifndef AI_BUILD_NO_OFF_IMPORTER
# include "OffLoader.h"
# include "OFFLoader.h"
#endif
#ifndef AI_BUILD_NO_AC_IMPORTER
# include "ACLoader.h"

View File

@ -132,7 +132,11 @@ void DeterminePTypeHelperProcess::Execute( aiScene* pScene)
if (deg)
{
char s[64];
#if defined(_MSC_VER)
::_itoa(deg,s,10);
#else
snprintf(s, 64, "%d", deg); //itoa is not available under linux
#endif
DefaultLogger::get()->warn(std::string("Found ") + s + " degenerated primitives");
}
}

View File

@ -1,5 +1,5 @@
#include "assimpPCH.h"
#include "AssimpPCH.h"
#include "../include/aiAssert.h"
#ifdef _WIN32