[2/3] Reentrancy, conditionally provide default __getreent() implementation
Commit Message
Conditionally provide default __getreent() implementation only if
_REENT_THREAD_LOCAL is not defined. If struct _reent is replaced by
dedicated thread-local objects neither the structure nor _impure_ptr is
available.
---
newlib/libc/reent/getreent.c | 4 ++++
1 file changed, 4 insertions(+)
@@ -9,6 +9,8 @@ int _dummy_getreent;
#include <_ansi.h>
#include <reent.h>
+#ifndef _REENT_THREAD_LOCAL
+
#ifdef __getreent
#undef __getreent
#endif
@@ -19,4 +21,6 @@ __getreent (void)
return _impure_ptr;
}
+#endif /* !_REENT_THREAD_LOCAL */
+
#endif