This is the complete <experimental/filesystem> implementation I intend
to commit shortly. (It's also been pushed to the redi/filesystem-ts
branch in the git mirror).

As before, only a static library (libstdc++fs.a) is built, so there
are no symbols added to libstdc++.so and we can be a bit more risky
with regards to maintaining a stable ABI for this stuff.

Since the last updates to the branch I added the <codecvt> header,
which meant I could add the missing path conversion features to
filesystem. I've also put everything relevant in a nested __cxx11
namespace, to avoid problems with the dual std::string ABI.

At this time the objects in libstdc++fa.a are all built with the
default std::string ABI (as set by configure). It will probably be
necessary to compile all of src/filesystem/*.cc twice when the dual
ABI is enabled, so both sets of definitions go in the archive.

I've tested this on GNU/Linux and DragonFly BSD, but as it's probably
not going to build everywhere I've added the configure option
--enable-libstdcxx-filesystem-ts which defaults to enabled on GNU, BSD
and Solaris targets, and disabled elsewhere for now. If it fails to
build on any of those targets we can change the default while we fix
the problem.

There are still quite a few operations (see src/filesystem/ops.cc)
without proper implementations, which might need to use the Win32 API.
I've compiled the _GLIBCXX_FILESYSTEM_IS_WINDOWS code by overriding
the macro, but not tested it any more than that. Someone will have to
try using --enable-libstdcxx-filesystem-ts on mingw.org, mingw-w64 and
cygwin to see what happens there. It's possible that macro could be
replaced by the existing _GLIBCXX_HAVE_DOS_BASED_FILESYSTEM macro, but
I'm not sure yet.


Attachment: patch.txt.bz2
Description: BZip2 compressed data

Reply via email to