From 80a99a255962422d1e86e85b6077e8b30eeeee19 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 13 Jun 2005 11:14:42 +0000 Subject: [PATCH] From Ken Sewell, fixed for x86_64 build. --- src/osgDB/FileUtils.cpp | 9 +++++++-- src/osgPlugins/flt/ReaderWriterATTR.cpp | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/osgDB/FileUtils.cpp b/src/osgDB/FileUtils.cpp index d8baa1783..2c0ea54e9 100644 --- a/src/osgDB/FileUtils.cpp +++ b/src/osgDB/FileUtils.cpp @@ -592,7 +592,7 @@ std::string osgDB::findFileInDirectory(const std::string& fileName,const std::st CFBundleRef myBundle; CFStringRef bundlePathString; FSRef f; - OSErr errCode; + OSErr errCode; // Start with the the Bundle PlugIns directory. // Unlike the Cocoa API, it seems that the PlugIn path is relative @@ -724,7 +724,7 @@ std::string osgDB::findFileInDirectory(const std::string& fileName,const std::st } else { - // had to comment out as it segfauls the OSX app otherwise + // had to comment out as it segfauls the OSX app otherwise // osg::notify( osg::DEBUG_INFO ) << "Couldn't find the Network Application Support Path" << std::endl; } } @@ -750,7 +750,12 @@ std::string osgDB::findFileInDirectory(const std::string& fileName,const std::st convertStringPathIntoFilePathList(ptr,filepath); } + +#if defined(__ia64__) || defined(__x86_64__) + convertStringPathIntoFilePathList("/usr/lib/:/usr/lib64/:/usr/local/lib/:/usr/local/lib64/",filepath); +#else convertStringPathIntoFilePathList("/usr/lib/:/usr/local/lib/",filepath); +#endif } diff --git a/src/osgPlugins/flt/ReaderWriterATTR.cpp b/src/osgPlugins/flt/ReaderWriterATTR.cpp index 42474cb1e..7f1ab2f8d 100644 --- a/src/osgPlugins/flt/ReaderWriterATTR.cpp +++ b/src/osgPlugins/flt/ReaderWriterATTR.cpp @@ -765,7 +765,7 @@ class ReaderWriterATTR : public osgDB::ReaderWriter { // Get the character index of the FLT_VER option in the option // string - unsigned int optionIndex = options->getOptionString().find("FLT_VER"); + std::string::size_type optionIndex = options->getOptionString().find("FLT_VER"); // Default to zero for the version if it's not found if (optionIndex == std::string::npos)