[PATCH] Delete default __getreent() implementation
Wed Nov 8 16:34:00 GMT 2017
On Nov 7 20:18, Sebastian Huber wrote:
> ----- Am 7. Nov 2017 um 17:12 schrieb Craig Howland howland@LGSInnovations.com:
> > On 11/07/2017 10:03 AM, Corinna Vinschen wrote:
> >> On Nov 7 12:53, Sebastian Huber wrote:
> > I suggest that at a minimum the contents of getreent.c should be kept. This
> > keeps a starting point for people who are needing to supply such a function.
> The default implementation is a bad example. It makes no sense to use __DYNAMIC_REENT__ with this implementation, e.g. you get the same thing without a function call overhead:
> #if defined(__DYNAMIC_REENT__) && !defined(__SINGLE_THREAD__)
> #ifndef __getreent
> struct _reent * _EXFUN(__getreent, (void));
> # define _REENT (__getreent())
> #else /* __SINGLE_THREAD__ || !__DYNAMIC_REENT__ */
> # define _REENT _impure_ptr
> #endif /* __SINGLE_THREAD__ || !__DYNAMIC_REENT__ *
> > (Leaving it out of the library stops the link problem which is the stated goal
> > of the patch.) But I think it needs to go further, and this patch should not be
> > done in this form because of the cited backwards-compatibility reasons. If
> > something were to be done it should be a configure flag to leave it out of the
> > library.
> Then we are back to Joel's patch:
> I don't know why Joel added this _dummy_getreent, but something similar is used elsewhere:
The "I don't know" is the key here. And as long as Joel doesn't
answer this question, this is on hold.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 819 bytes
Desc: not available
More information about the Newlib