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]

Re: Add global stdio streams support for reent small.


Hi Douglas,

A few comments.  First of all, please update comments on preprocessor #if,
#else statements to
include your changes (e.g. you have added a #else, what does this #else
mean...e.g. #else /* _REENT_SMALL || _REENT_GLOBAL_STDIO_STREAMS */
This will aid future maintainers to not have to look all the way back to
the original #if).  This also applies to
comments for #else statements that are altered by your changes.

That said, I have one code comment.

In findfp.c std, you added "&& !defined(__REENT_GLOBAL_STDIO_STREAMS)" to
check if the lock for the file should be initialized.  I don't understand
why you added this.  AFAICT, this will affect current behaviour.

Regarding slots in the reent structs, yes, they are sometimes there for
fill, for backwards compatibility.  Otherwise, everything needs to be
recompiled/relinked.

-- Jeff J.

On Wed, Feb 28, 2018 at 7:58 AM, Douglas <info@ourairquality.org> wrote:

> The global stdio streams option did not appear to work with reent small
> option, but these two options are both useful on a low memory system.
>
> This seems to simplify the reent small code in this area when using the
> global stdio streams option. The fake streams and some of the checking
> is not longer necessary.
>
> btw the __sf slot in the reent small struct _reent appears to be unused.
> Could that be removed, or is it fill for backwards compatibility?
>


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