Boost logo

Boost Users :

Subject: Re: [Boost-users] [filesystem] Strange problems on Cygwin with 1.36.0
From: Boris (boriss_at_[hidden])
Date: 2008-09-17 08:02:23


On Wed, 17 Sep 2008 12:06:06 +0200, Boris <boriss_at_[hidden]> wrote:

> [...]What is the recommendation for Cygwin? Should I simply use
> boost::filesystem::equivalent() and let users find out themselves what
> preprocessor directives they must define? The problem is also that
> BOOST_CYGWIN_PATH is nowhere documented. There are five links if I
> search for BOOST_CYGWIN_PATH in Google?

The trick I have to use seems to be:

#if defined(BOOST_POSIX_API)
# if defined(__CYGWIN__)
# undef BOOST_POSIX_API
# define BOOST_CYGWIN_PATH
# endif
#endif

I'm not sure if it wouldn't be better though if
boost/filesystem/config.hpp defined BOOST_WINDOWS_PATH automatically if
BOOST_POSIX_API and __CYGWIN__ are defined? Currently we have to tell
Boost.Filesystem with BOOST_CYGWIN_PATH that we are on Cygwin and want to
use the POSIX API. Then BOOST_WINDOWS_PATH is defined. Instead of telling
Boost.Filesystem it could check if BOOST_POSIX_API and __CYGWIN__ are
defined and then define BOOST_WINDOWS_PATH automatically? After all that's
what I'm doing above?

Boris


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net