diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2024-01-19 11:14:33 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2024-01-19 11:51:01 +0100 |
commit | 47f079b98e46792c776dbea230d92a6dfc1d428f (patch) | |
tree | 206899fd70d9e473e35e057fd871eeb93c8c2fcf /newlib/libc | |
parent | 422c4f0451ccaff9aa38ee86d5d860f41c7bf9ef (diff) | |
download | newlib-47f079b98e46792c776dbea230d92a6dfc1d428f.zip newlib-47f079b98e46792c776dbea230d92a6dfc1d428f.tar.gz newlib-47f079b98e46792c776dbea230d92a6dfc1d428f.tar.bz2 |
fputwc: call __fputwc directly
Avoid another hop in the call stack.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/stdio/fputwc.c | 7 | ||||
-rw-r--r-- | newlib/libc/stdio/fputwc_u.c | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/newlib/libc/stdio/fputwc.c b/newlib/libc/stdio/fputwc.c index 12a6170..e2aadef 100644 --- a/newlib/libc/stdio/fputwc.c +++ b/newlib/libc/stdio/fputwc.c @@ -181,5 +181,10 @@ fputwc (wchar_t wc, struct _reent *reent = _REENT; CHECK_INIT(reent, fp); - return _fputwc_r (reent, wc, fp); + wint_t r; + + _newlib_flockfile_start (fp); + r = __fputwc(reent, wc, fp); + _newlib_flockfile_end (fp); + return r; } diff --git a/newlib/libc/stdio/fputwc_u.c b/newlib/libc/stdio/fputwc_u.c index 7e7403b..f54bcf3 100644 --- a/newlib/libc/stdio/fputwc_u.c +++ b/newlib/libc/stdio/fputwc_u.c @@ -44,5 +44,5 @@ fputwc_unlocked (wchar_t wc, struct _reent *reent = _REENT; CHECK_INIT(reent, fp); - return _fputwc_unlocked_r (reent, wc, fp); + return __fputwc(reent, wc, fp); } |