Opened 6 years ago
Last modified 6 years ago
#12420 new Bugs
Boost filesystem should use POSIX API on cygwin
Reported by: | 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:
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)
Change History (2)
by , 6 years ago
Attachment: | boost_1_61_0.patch added |
---|
comment:1 by , 6 years ago
I added the patch because it was all garbaged by the tracking system in the post.
Proposed patch