public inbox for newlib-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin/main] fputwc: call __fputwc directly
@ 2024-01-19 10:52 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2024-01-19 10:52 UTC (permalink / raw)
To: newlib-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=47f079b98e46792c776dbea230d92a6dfc1d428f
commit 47f079b98e46792c776dbea230d92a6dfc1d428f
Author: Corinna Vinschen <corinna@vinschen.de>
AuthorDate: Fri Jan 19 11:14:33 2024 +0100
Commit: Corinna Vinschen <corinna@vinschen.de>
CommitDate: Fri Jan 19 11:51:01 2024 +0100
fputwc: call __fputwc directly
Avoid another hop in the call stack.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diff:
---
newlib/libc/stdio/fputwc.c | 7 ++++++-
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 12a6170bbc55..e2aadefd53de 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 7e7403b998eb..f54bcf30f735 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);
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-19 10:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-19 10:52 [newlib-cygwin/main] fputwc: call __fputwc directly Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).