4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-22 23:17:28 +08:00
Pekka Seppänen 7a1c717c8b 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.
2023-09-11 09:23:05 +02:00

27 lines
328 B
C

/* default reentrant pointer when multithread enabled */
#ifdef GETREENT_PROVIDED
int _dummy_getreent;
#else
#include <_ansi.h>
#include <reent.h>
#ifndef _REENT_THREAD_LOCAL
#ifdef __getreent
#undef __getreent
#endif
struct _reent *
__getreent (void)
{
return _impure_ptr;
}
#endif /* !_REENT_THREAD_LOCAL */
#endif