Enrico Forestieri <[EMAIL PROTECTED]> writes:

| On Sun, Jul 23, 2006 at 03:59:13PM +0200, Lars Gullik Bjønnes wrote:
| 
| > Georg Baum <[EMAIL PROTECTED]> writes:
| > 
| > | Am Sonntag, 23. Juli 2006 15:39 schrieb Lars Gullik Bjønnes:
| > | 
| > | > Boost does this:
| > | > 
| > | >     bool path::is_complete() const
| > | >     {
| > | > #   ifdef BOOST_WINDOWS
| > | >       return m_path.size() > 2
| > | >         && ( (m_path[1] == ':' && m_path[2] == '/') // "c:/"
| > | >           || (m_path[0] == '/' && m_path[1] == '/') // "//share"
| > | >           || m_path[m_path.size()-1] == ':' );
| > | > #   else
| > | >       return m_path.size() && m_path[0] == '/';
| > | > #   endif
| > | >     }
| > | > 
| > | > 
| > | > What you are saying is that "/foo/bar/" is not caught as an absolute
| > | > path in windows? Something wich strictly speaking is true, is is not
| > | > an absolute path. (Or at the very least it is not complete.)
| > | 
| > | On cygwin the latter would be complete, so if anything is to be changed 
| > | then the code you showed above: On cygwin both tests should be used.
| > 
| > Please repeat after me: "Cygwin is an abomination" :-)
| 
| I don't think so :-)
| Cygwin lets you use both windows and posix paths in posix functions.
| I find this very handy.

And this is the crux of the matter I guess. If you happen to use a
non-posix function your are lost...

| 
| > The problem is of course that cygwin tries to play on both sides, and
| > those sides are not really compatible...
| 
| It only suffices that you consider both path styles possible.

Not really...

Is '/foo/bar' an absolute path? On posix the answer is 'Yes!', on
windows it is 'No!Ã', on cygwin it is 'Depends!'

Which of course makes it very hard to write applications that both
tries to play nice with native windows (Not only play nice with, but
also 'be a native application') and at the same time be a cygwin application.

-- 
        Lgb

Reply via email to