Robert Osfield wrote:
> a CVS update. If there are tweaks you have to do could please send
> them along to osg-submissions.
Robert,
I do have a submission for the path problem in src/osgDB/FileNameUtils.cpp
Cygwin but I was unclear if you want submissions to osg-submission in the form
of a patch or a simple diff and do you want it imbedded in the email or as an
attachment.
> std::string osgDB::getRealPath(const std::string& path)
> {
> #ifdef WIN32
> TCHAR retbuf[MAX_PATH + sizeof(TCHAR)];
> GetFullPathName(path.c_str(), sizeof(retbuf), retbuf, 0);
> return std::string(retbuf);
> #else
> char resolved_path[PATH_MAX];
> char* result = realpath(path.c_str(), resolved_path);
>
> if (result) return std::string(resolved_path);
> else return path;
> #endif
> }
>
> So perhaps Cygwin isn't implementing the Windows GetFullPathName code,
Actually Cygwin does implement the Windows GetFullPathName code and by placing
some outputs in the above code I was able to determine that GetFullPathName
does just as you would expect - returns the full Windows path of the file IE:
C:\cygwin\usr\local\bin\.....
but remember Cygwin is essentially Unix/Linux running on top of Windows so the
paths are in the form /cygdrive/c/temp or /usr/local/bin. This could be some
of the other confusion as far as the hang - I wonder if we have some Windows
code that is failing and should be using more Linux type code. I'm not real
clear on the GNU Compiler but I know if we compile with -mno-cygwin then you
get an executable I believe more like a MINGW application and without need for
the Cygwin dll. Not sure if that makes it use the real windows paths or not in
that case.
The change for the above would be to simply change:
> #ifdef WIN32
to
> #if defined(WIN32) && !defined(__CYGWIN__)
Let me know how you like the posts to osg-submissions.
bk
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/