diff options
author | Matt Joyce <matthew.joyce@embedded-brains.de> | 2022-04-05 12:40:19 +0300 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2022-05-13 13:28:34 +0300 |
commit | e5e36867f851b7355e6221a598f604bcae52597f (patch) | |
tree | 82b265ee459268a5254d8eb472ee4343e7d144ad /newlib/libc/stdio | |
parent | d041db379241a4fd668401f374429099e5a16a48 (diff) |
Add two __sglue initialization macros
Added _REENT_INIT_SGLUE and _REENT_INIT_SGLUE_ZEROED macros
to initialize __sglue member of struct _reent. This allows
further simplification of __sinit() and facilitates the removal
of __sglue as a member of struct _reent for certain configurations
in a follow-on patch.
Diffstat (limited to 'newlib/libc/stdio')
-rw-r--r-- | newlib/libc/stdio/findfp.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c index 8327b1992..66867e664 100644 --- a/newlib/libc/stdio/findfp.c +++ b/newlib/libc/stdio/findfp.c @@ -246,12 +246,7 @@ __sinit (struct _reent *s) /* make sure we clean up on exit */ s->__cleanup = cleanup_stdio; /* conservative */ -#ifndef _REENT_SMALL -# ifndef _REENT_GLOBAL_STDIO_STREAMS - s->__sglue._niobs = 3; - s->__sglue._iobs = &s->__sf[0]; -# endif /* _REENT_GLOBAL_STDIO_STREAMS */ -#else +#ifdef _REENT_SMALL # ifndef _REENT_GLOBAL_STDIO_STREAMS s->_stdin = __sfp(s); s->_stdout = __sfp(s); |