Upstream status: Adapted from upstream. From d3d968e5835f449d7ea715f45160db81ea906303 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Tue, 16 Aug 2022 20:29:54 +0200 Subject: [PATCH] Fix build on GNU/Hurd There is no path length limitation there, even via pathconf. But glibc provides a getcwd function that allocates the buffer dynamically so we can just leverage that. --- include/ghc/filesystem.hpp | 7 +++++++ 1 file changed, 7 insertions(+) --- a/filesystem/filesystem.hpp.orig 2022-08-11 22:14:32.000000000 +0200 +++ b/filesystem/filesystem.hpp 2023-06-13 07:26:25.310000000 +0200 @@ -4081,6 +4081,13 @@ return path(); } return path(std::wstring(buffer.get()), path::native_format); +#elif defined(__GLIBC__) + std::unique_ptr buffer { ::getcwd(NULL, 0), std::free }; + if (buffer == nullptr) { + ec = detail::make_system_error(); + return path(); + } + return path(buffer.get()); #else size_t pathlen = static_cast(std::max(int(::pathconf(".", _PC_PATH_MAX)), int(PATH_MAX))); std::unique_ptr buffer(new char[pathlen + 1]); a>logtreecommitdiff
AgeCommit message (Expand)Author
2023-09-26tests: Assume ‘git’ is always available....* tests/channels.scm (gpg+git-available?): Check for ‘gpg-command’ only. Remove all ‘test-skip’ statements. * tests/derivations.scm: Likewise. * tests/git-authenticate.scm: Likewise. * tests/git.scm: Likewise. * tests/import-git.scm: Likewise. Ludovic Courtès
2021-09-18import: Add 'generic-git' updater....* guix/git.scm (ls-remote-refs): New procedure. * tests/git.scm ("remote-refs" "remote-refs: only tags"): New tests. * guix/import/git.scm: New file. * doc/guix.texi (Invoking guix refresh): Document it. * tests/import-git.scm: New test file. * Makefile.am (MODULES, SCM_TESTS): Register the new files. Co-authored-by: Sarah Morgensen <iskarian@mgsn.dev> Signed-off-by: Ludovic Courtès <ludo@gnu.org> Xinglu Chen