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

Define PATH_MAX if not defined by limits.h #138

Closed Unit193 closed 2 years ago

Unit193 commented 2 years ago

PATH_MAX is not portable, define it if it isn't defined in limits.h.

Not sure if this is where you'd prefer to define it though.

gulrak commented 2 years ago

Sorry for the long delay, I implemented it almost as in your PR, but added a non-Windows dependency as PATH_MAX is not a thin on Windows and used by ghc::filesystem only for the POSIX backend.

gulrak commented 2 years ago

Manually adapted on master.

Unit193 commented 2 years ago

Thanks! I'm not very picky, this looks great to me.