This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v3 2/2] newlib/.../getreent.c: Do not define if __DYNAMIC_REENT__ is enabled


RTEMS provides the option to have a global or per-thread reentrancy
as part of application configuration. As part of this, RTEMS provides
the implementation of __getreent() as appropriate. Allow the target
to determine if this method is present in libc.a.
---
 newlib/libc/reent/getreent.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/newlib/libc/reent/getreent.c b/newlib/libc/reent/getreent.c
index 60ae6fb..b42a88b 100644
--- a/newlib/libc/reent/getreent.c
+++ b/newlib/libc/reent/getreent.c
@@ -1,5 +1,13 @@
 /* default reentrant pointer when multithread enabled */
 
+#include <reent.h>
+
+#ifdef __DYNAMIC_REENT__
+
+int _dummy_getreent;
+
+#else
+
 #include <_ansi.h>
 #include <reent.h>
 
@@ -12,3 +20,5 @@ _DEFUN_VOID(__getreent)
 {
   return _impure_ptr;
 }
+
+#endif
-- 
1.8.3.1


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]