This is the mail archive of the 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]

RE: [PATCH] Fix potential reent issue

> -----Original Message-----
> From: []
On >Behalf Of Federico Terraneo
> Sent: Sunday, June 23, 2013 7:15 AM
> To:
> Subject: [PATCH] Fix potential reent issue
> ...
> Attached is a patch that implements them by calling __getreent() if
> __DYNAMIC_REENT__ and _REENT_ONLY are defined. Note that this came out
> of a code review, I don't have such a setup to test this change, so
> please look at the patch carefully.

From the patch:
+#if defined(__DYNAMIC_REENT__) && !defined(__SINGLE_THREAD__) &&
+struct _reent * _EXFUN(__getreent, (void));
 /* #define _REENT_ONLY define this to get only reentrant routines */
 #ifndef _REENT_ONLY
 #if defined(__DYNAMIC_REENT__) && !defined(__SINGLE_THREAD__)
-#ifndef __getreent
-  struct _reent * _EXFUN(__getreent, (void));
A #ifndef __getreent gating the __getreent() definition has been lost in
the move.  Do you have a reason for this?  I don't specifically know why
it is this way (perhaps Jeff does), but presumably it is to allow a
mapping of some kind, as is done for some other things (e.g. HUGE_VAL
in math.h).  (Having the gate does seem a little odd, but it seems
prudent to raise the question as to its purpose before removing it.)

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