]> sourceware.org Git - newlib-cygwin.git/commitdiff
Reentrancy, conditionally provide default __getreent() implementation
authorPekka Seppänen <pexu@sourceware.mail.kapsi.fi>
Wed, 30 Aug 2023 09:16:32 +0000 (12:16 +0300)
committerSebastian Huber <sebastian.huber@embedded-brains.de>
Mon, 11 Sep 2023 07:23:05 +0000 (09:23 +0200)
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

index 5fa98e96bda3759bef393883d7fc78b247f95418..86bb04fb94140d4a32d907c3bdc9991f8db302f1 100644 (file)
@@ -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
This page took 0.032441 seconds and 5 git commands to generate.