mirror of
https://git.mirrors.martin98.com/https://github.com/gulrak/filesystem
synced 2025-06-11 02:36:33 +08:00
Merge branch 'master' of github.com:gulrak/filesystem
This commit is contained in:
commit
1a70520422
4
.ci/unix-build.sh
Executable file
4
.ci/unix-build.sh
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||||
|
cmake --build .
|
6
.ci/unix-test.sh
Executable file
6
.ci/unix-test.sh
Executable file
@ -0,0 +1,6 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
cd build
|
||||||
|
ctest -E Windows
|
||||||
|
if [ -f "test/std_filesystem_test" ]; then
|
||||||
|
test/std_filesystem_test || true
|
||||||
|
fi
|
13
.cirrus.yml
Normal file
13
.cirrus.yml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-12-1
|
||||||
|
|
||||||
|
task:
|
||||||
|
install_script: |
|
||||||
|
pkg install -y cmake
|
||||||
|
pw groupadd testgrp
|
||||||
|
pw useradd testuser -g testgrp -w none -m
|
||||||
|
chown -R testuser:testgrp .
|
||||||
|
build_script: |
|
||||||
|
sudo -u testuser .ci/unix-build.sh
|
||||||
|
test_script: |
|
||||||
|
sudo -u testuser .ci/unix-test.sh
|
43
.drone.yml
Normal file
43
.drone.yml
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: arm
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: alpine
|
||||||
|
failure: ignore
|
||||||
|
commands:
|
||||||
|
- apk update
|
||||||
|
- apk add --no-cache build-base cmake sudo
|
||||||
|
- addgroup testgrp
|
||||||
|
- adduser --disabled-password testuser testgrp
|
||||||
|
- passwd testuser -u -d
|
||||||
|
- chown -R testuser:testgrp .
|
||||||
|
- sudo -u testuser .ci/unix-build.sh
|
||||||
|
- sudo -u testuser .ci/unix-test.sh
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
name: arm64
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build
|
||||||
|
image: alpine
|
||||||
|
failure: ignore
|
||||||
|
commands:
|
||||||
|
- apk update
|
||||||
|
- apk add --no-cache build-base cmake
|
||||||
|
- addgroup testgrp
|
||||||
|
- adduser --disabled-password testuser testgrp
|
||||||
|
- passwd testuser -u -d
|
||||||
|
- chown -R testuser:testgrp .
|
||||||
|
- su -c "./.ci/unix-build.sh" testuser
|
||||||
|
- su -c "./.ci/unix-test.sh" testuser
|
@ -2951,7 +2951,8 @@ template <class charT, class traits>
|
|||||||
inline std::basic_istream<charT, traits>& operator>>(std::basic_istream<charT, traits>& is, path& p)
|
inline std::basic_istream<charT, traits>& operator>>(std::basic_istream<charT, traits>& is, path& p)
|
||||||
{
|
{
|
||||||
std::basic_string<charT, traits> tmp;
|
std::basic_string<charT, traits> tmp;
|
||||||
auto c = is.get();
|
charT c;
|
||||||
|
is >> c;
|
||||||
if (c == '"') {
|
if (c == '"') {
|
||||||
auto sf = is.flags();
|
auto sf = is.flags();
|
||||||
is >> std::noskipws;
|
is >> std::noskipws;
|
||||||
@ -3961,8 +3962,8 @@ GHC_INLINE void last_write_time(const path& p, file_time_type new_time, std::err
|
|||||||
struct ::timespec times[2];
|
struct ::timespec times[2];
|
||||||
times[0].tv_sec = 0;
|
times[0].tv_sec = 0;
|
||||||
times[0].tv_nsec = UTIME_OMIT;
|
times[0].tv_nsec = UTIME_OMIT;
|
||||||
times[1].tv_sec = std::chrono::duration_cast<std::chrono::seconds>(d).count();
|
times[1].tv_sec = static_cast<decltype(times[1].tv_sec)>(std::chrono::duration_cast<std::chrono::seconds>(d).count());
|
||||||
times[1].tv_nsec = std::chrono::duration_cast<std::chrono::nanoseconds>(d).count() % 1000000000;
|
times[1].tv_nsec = static_cast<decltype(times[1].tv_nsec)>(std::chrono::duration_cast<std::chrono::nanoseconds>(d).count() % 1000000000);
|
||||||
if (::utimensat(AT_FDCWD, p.c_str(), times, AT_SYMLINK_NOFOLLOW) != 0) {
|
if (::utimensat(AT_FDCWD, p.c_str(), times, AT_SYMLINK_NOFOLLOW) != 0) {
|
||||||
ec = detail::make_system_error();
|
ec = detail::make_system_error();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user