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.34k stars 173 forks source link

GHC_NO_DIRENT_D_TYPE should be defined on Haiku #159

Closed Begasus closed 1 year ago

Begasus commented 2 years ago

Describe the bug Filesystem fails to compile (filesystem/filesystem.hpp) on Haiku because of missing d_type in dirent structure.

Additional context https://github.com/doxygen/doxygen/pull/9610

gulrak commented 1 year ago

This is a valid solution for the used version ghc::filesystem v1.5.6, but with #142 this is not needed any more, as starting with v1.5.12 the code detects the presence of dirent.d_type automatically at compile time.

Begasus commented 1 year ago

Could still use the detection for Haiku, otherwise I'm getting: error "Operating system currently not supported!":

From: https://github.com/gulrak/filesystem/blob/master/include/ghc/filesystem.hpp#L79

#elif defined(__QNX__)
#define GHC_OS_QNX
+#elif defined(__HAIKU__)
+#define GHC_OS_HAIKU
#else
Begasus commented 1 year ago

Related PR: https://github.com/gulrak/filesystem/pull/163

Begasus commented 1 year ago

This can be closed I think, created a stand-alone package on Haiku with the related PR here, build and install seem OK. I'm doing a build for catch2 to see if I can run the provided tests here also, thanks so far! :)

gulrak commented 1 year ago

You are right, I will add the detection.

Begasus commented 1 year ago

Upstream PR merged, thanks! 👍