Opened 6 years ago

Last modified 6 years ago

#12420 new Bugs

Boost filesystem should use POSIX API on cygwin

Reported by: frederic.bron@… Owned by: Beman Dawes
Milestone: To Be Determined Component: filesystem
Version: Boost 1.61.0 Severity: Problem
Keywords: Cc:

Description

Hi,

On cygwin, the following program

#include <iostream>

#include <boost/filesystem.hpp>

int main() {

auto p = boost::filesystem::path{"foo"}; p /= "bar"; std::cout << p.string() << '\n'; return 0;

}

outputs: foo\bar

but cygwin is a posix system and I expect: foo/bar

I read in the doc that "User-defined BOOST_POSIX_API and BOOST_WINDOWS_API macros are no longer supported."

I guess system/api_config.hpp should be:

-# if defined(_WIN32)
defined(CYGWIN) Windows default,

including MinGW and Cygwin +# if defined(_WIN32) Windows default, including MinGW # define BOOST_WINDOWS_API # else # define BOOST_POSIX_API # endif

Attachments (1)

boost_1_61_0.patch (673 bytes ) - added by frederic.bron@… 6 years ago.
Proposed patch

Download all attachments as: .zip

Change History (2)

by frederic.bron@…, 6 years ago

Attachment: boost_1_61_0.patch added

Proposed patch

comment:1 by frederic.bron@…, 6 years ago

I added the patch because it was all garbaged by the tracking system in the post.

Note: See TracTickets for help on using tickets.