Removed the unnecessary check as requested.
Sun, Apr 11
Removed an unnecessary check as requested in review
Wed, Apr 7
Adding @chandlerc as a reviewer since first entry in CODE_OWNERS for CMake ^^'
formatting was bad and somehow differential didn't show the endif() - added a trailing newline for that
Sep 14 2020
Is this review still relevant? If not, let's abandon it to clear up the review queue.
May 13 2020
We could lift the two macros that depend on _NEWLIB_VERSION into the headers that use them.
Then we'll avoid the include in config.
I am slightly concerned that this also introduces a bunch of declarations in __config, which is the most included file of the library. That would also be the first time we include unistd.h in the libc++ headers (as opposed to the sources used to build the dylib). That might not be an issue, but it's something to keep in mind.
Another way would be to include _newlib_version.h if it exists, would that be better? Would then be a newlib specific patch.
Since this include was deleted as "dead code" before, I added a comment why it is not dead
May 12 2020
May 7 2020
Cannot commit myself
May 4 2020
Also fix duplicated check in filesystem/operations.cpp
Do not include unistd.h on _WIN32, re-add __APPLE__ check and change _POSIX_TIMER check to check for > 0
Included unistd.h and removed the check for __APPLE__, since _POSIX_TIMERS should work there, too
LGTM generally speaking, but is this triggered by a specific failure you ran into? If so, on what configuration? We should have a way to test this change.