[libc++] Move checks for newlib to actually work
The checks did not work in __config, since no header defining
`_NEWLIB_VERSION` was included before. This patch moves the two
checks for newlib to the headers that actually need it - and after
they already include relevant headers.
Differential Revision: https://reviews.llvm.org/D79888
GitOrigin-RevId: 8deaa4a1471dac19c717a320eec9956843a8c479
diff --git a/include/fstream b/include/fstream
index d7d6b46..51b26ec 100644
--- a/include/fstream
+++ b/include/fstream
@@ -198,6 +198,9 @@
_LIBCPP_PUSH_MACROS
#include <__undef_macros>
+#if defined(_LIBCPP_MSVCRT) || defined(_NEWLIB_VERSION)
+# define _LIBCPP_HAS_NO_OFF_T_FUNCTIONS
+#endif
_LIBCPP_BEGIN_NAMESPACE_STD