On 23 Dec 2025 00:33, Ion Gaztañaga wrote:
El 22/12/2025 a las 20:44, Andrey Semashev via Boost escribió:
But here is the question: do we actually want to consistently treat Cygwin as a POSIX platform across Boost libraries? In regards to Boost.Filesystem, I'm not sure what Cygwin runtime does with paths, as it eventually has to interact with the underlying Windows API. Does it perform character code conversion? Is that conversion correct? Which encoding does it expect?
I think Cygwin is, by definition, a Unix environment at we should treat it like that.
[snip]
So IMHO Filesystem should treat Cygwin as any other Unix system. However, I understand that this breaks previous users. One option would be to offer a backwards compatibility macro switch to go back to the Windows API for those users that want to maintain backwards compatibility. That would require, however, more complicated maintenance (say, testing cygwin both as UNIX and Win32 platforms).
A config option (a macro) is rather problematic as Boost.Filesystem is a compiled library. Having multiple compiled binaries is also not without issues as it complicates library selection at link time and allows for mixing the two versions and causing ODR issues. If we make the switch, I'm inclined to make it unconditional.