4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 04:49:25 +08:00

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.
This commit is contained in:
Pekka Seppänen 2023-08-30 12:16:32 +03:00 committed by Sebastian Huber
parent 766f1beb4d
commit 7a1c717c8b

View 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