gulrak / filesystem

An implementation of C++17 std::filesystem for C++11 /C++14/C++17/C++20 on Windows, macOS, Linux and FreeBSD.
MIT License
1.31k stars 168 forks source link

Problems with UTIME_OMIT on mac_osx #155

Closed albert-github closed 1 year ago

albert-github commented 1 year ago

https://github.com/gulrak/filesystem/blob/cd6805e94dd5d6346be1b75a54cdc27787319dd2/include/ghc/filesystem.hpp#L4608-L4609

/Users/runner/miniforge3/conda-bld/doxygen_1661930643770/work/filesystem/filesystem.hpp:4508:24: error: use of undeclared identifier 'UTIME_OMIT'
    times[0].tv_nsec = UTIME_OMIT;

In the doxygen issue https://github.com/doxygen/doxygen/issues/9557 we see a report about some none existing defines. It looks a bit like the test is not 100% correct here in the filesystem file (note doxygen uses a bit an older version of filesystem, but in both versions the problem looks like to be the same). Probably the test has to be changed from:

#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101300

into

#if __MAC_OS_X_VERSION_MIN_REQUIRED < 101400

See also the issue:

(Edit: note unfortunately I cannot test it as I don't have any experience with mac-osx or have access to as system with mac-osx)

VincentRouvreau commented 1 year ago

FYI, it has been fixed with these compilation flags. Hope it can help to understand, maybe not an issue on your side. Me neither I don't have any experience with mac-osx or have access to as system with mac-osx.

albert-github commented 1 year ago

It looks like a bug in the conda-forge and neither a filesystem nor doxygen problem.

gulrak commented 1 year ago

I'll look into it.

gulrak commented 1 year ago

From my research it doesn't look like an issue in filesystem. The versions for when to use UTIME_OMIT are the same as in the LLVM libcpp implementation, I just use the Availability.h variant. The fix doesn't change a file in the filesystem domain, so without further information there is not much I can do.

I'm closing it for now, feel free to reopen if it reappears and any more light can be shed on this.