[PATCH] D54677: [hurd] Fix unconditional use of PATH_MAX
Louis Dionne via Phabricator
reviews at reviews.llvm.org
Mon Nov 19 08:05:45 PST 2018
ldionne added inline comments.
================
Comment at: src/filesystem/operations.cpp:533
path p = __do_absolute(orig_p, &cwd, ec);
+#if _POSIX_VERSION >= 200112 || defined(__GLIBC__)
+ char *buff;
----------------
Is the extension available on old glibc's? Should that be `#if _POSIX_VERSION >= 200112 && defined(__GLIBC__)`, or just `#if _POSIX_VERSION >= 200112`?
================
Comment at: src/filesystem/operations.cpp:535
+ char *buff;
+ if ((buff = ::realpath(p.c_str(), NULL)) == nullptr)
+ return err.report(capture_errno());
----------------
You could just initialize `char *buff = ::realpath(...)` and then make the check in the `if`?
Repository:
rCXX libc++
https://reviews.llvm.org/D54677
More information about the libcxx-commits
mailing list