aboutsummaryrefslogtreecommitdiff
path: root/newlib/libc
diff options
context:
space:
mode:
authorPekka Seppänen <pexu@sourceware.mail.kapsi.fi>2023-08-30 12:16:32 +0300
committerSebastian Huber <sebastian.huber@embedded-brains.de>2023-09-11 09:23:05 +0200
commit7a1c717c8bba1d046c37c75c3d8c110aeba3cc09 (patch)
tree3a6860abd30ac6fe9ee93107af7405f89c340fb9 /newlib/libc
parent766f1beb4de3d75f3b6d25dcc9b41dc8b4a002e9 (diff)
downloadnewlib-7a1c717c8bba1d046c37c75c3d8c110aeba3cc09.zip
newlib-7a1c717c8bba1d046c37c75c3d8c110aeba3cc09.tar.gz
newlib-7a1c717c8bba1d046c37c75c3d8c110aeba3cc09.tar.bz2
Reentrancy, conditionally provide default __getreent() implementation
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.
Diffstat (limited to 'newlib/libc')
-rw-r--r--newlib/libc/reent/getreent.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/newlib/libc/reent/getreent.c b/newlib/libc/reent/getreent.c
index 5fa98e9..86bb04f 100644
--- a/newlib/libc/reent/getreent.c
+++ b/newlib/libc/reent/getreent.c
@@ -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