commit f36dd7f817590c618884e14433dd70c03334c288
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Oct 26 12:16:18 2016 +0100
PR78111 fix fallback code for filesystem::canonical
PR libstdc++/78111
* src/filesystem/ops.cc (canonical): Set error for non-existent path.
@@ -142,7 +142,11 @@ fs::canonical(const path& p, const path& base, error_code& ec)
#endif
if (!exists(pa, ec))
- return result;
+ {
+ if (!ec)
+ ec = make_error_code(std::errc::no_such_file_or_directory);
+ return result;
+ }
// else: we know there are (currently) no unresolvable symlink loops
result = pa.root_path();
commit 16b33e71b6b247d3936cddbddac982082e802894
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Wed Oct 26 12:14:53 2016 +0100
Add missing header in Filesystem TS configure tests
2016-10-26 Uros Bizjak <ubizjak@gmail.com>
* acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Include <limits.h>
for PATH_MAX in realpath test.
* configure: Regenerate.
@@ -4290,6 +4290,7 @@ dnl
AC_CACHE_VAL(glibcxx_cv_realpath, [dnl
GCC_TRY_COMPILE_OR_LINK(
[
+ #include <limits.h>
#include <stdlib.h>
#include <unistd.h>
],