Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid GNU getcwd extension behavior #188

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 12 additions & 13 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,24 @@ freebsd_task:
test_script: |
sudo -u testuser .ci/unix-test.sh

centos7_task:
rockylinux8_task:
container:
image: centos:7
image: docker.io/rockylinux:8
install_script: |
yum install -y centos-release-scl
yum install -y devtoolset-9
curl -L https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4-Linux-x86_64.tar.gz | tar xzvf - -C /usr/local --strip-components 1
dnf group install -y "Development Tools"
dnf install cmake -y
build_script: |
source /opt/rh/devtoolset-9/enable && PATH=$PATH:/usr/local/bin .ci/unix-build.sh
.ci/unix-build.sh
test_script: |
PATH=$PATH:/usr/local/bin .ci/unix-test.sh
.ci/unix-test.sh

centos8_task:
rockylinux9_task:
container:
image: quay.io/centos/centos:stream8
image: docker.io/rockylinux:9
install_script: |
yum group install -y "Development Tools"
curl -L https://github.com/Kitware/CMake/releases/download/v3.16.4/cmake-3.16.4-Linux-x86_64.tar.gz | tar xzvf - -C /usr/local --strip-components 1
dnf group install -y "Development Tools"
dnf install cmake -y
build_script: |
PATH=$PATH:/usr/local/bin .ci/unix-build.sh
.ci/unix-build.sh
test_script: |
PATH=$PATH:/usr/local/bin .ci/unix-test.sh
.ci/unix-test.sh
2 changes: 1 addition & 1 deletion include/ghc/filesystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4229,7 +4229,7 @@ GHC_INLINE path current_path(std::error_code& ec)
}
return path(std::wstring(buffer.get()), path::native_format);
#elif defined(__GLIBC__)
std::unique_ptr<char, decltype(&std::free)> buffer { ::getcwd(NULL, 0), std::free };
std::unique_ptr<char, decltype(&std::free)> buffer { ::get_current_dir_name(), std::free };
if (buffer == nullptr) {
ec = detail::make_system_error();
return path();
Expand Down