From a0272d666586bda1437a29c6bd84deb7c38c6cff Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 15 May 2009 07:50:20 +0000 Subject: [PATCH] From Martin Beckett, "n bool ReaderWriter::fileExists(const std::string& filename, const Options* /*options*/) const Windows doesn't define F_OK and access() is in io.h, rather than stdio.h These are fixed in FileUtils.cpp, so I copied the fix from there - might be better to move this to FileUtils header and include it here and in FileUtils.cpp?" --- src/osgDB/ReaderWriter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/osgDB/ReaderWriter.cpp b/src/osgDB/ReaderWriter.cpp index 8cf48cf17..fa8a26b8e 100644 --- a/src/osgDB/ReaderWriter.cpp +++ b/src/osgDB/ReaderWriter.cpp @@ -118,6 +118,13 @@ ReaderWriter::FeatureList ReaderWriter::featureAsString(ReaderWriter::Features f return result; } +#if defined(WIN32) && !defined(__CYGWIN__) + #include +#ifndef F_OK + #define F_OK 4 +#endif +#endif + bool ReaderWriter::fileExists(const std::string& filename, const Options* /*options*/) const { #ifdef OSG_USE_UTF8_FILENAME