From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2155) id E714138582AE; Fri, 19 Jan 2024 10:52:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E714138582AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1705661541; bh=Qwl2kczDeMeK8Ttkdtp7ZgEziZmfjxXYwQOc0gj0KBs=; h=From:To:Subject:Date:From; b=q10AL2XdCfEZPeKr2UFAGoql/4nkXSmfMAYFSze/cmcvJ5Kneml97TKlsKY3RKCf5 eojAL0Nu01jcfl/1tGlLxa0NNjq77DjCNDWuP+QuSzI2wwqLxmfKnvJiXr30OuWmOZ 8YEUOAxwKPvc8t5DkHCDeiMADfBU7iYOF/TTMq9k= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Corinna Vinschen To: newlib-cvs@sourceware.org Subject: [newlib-cygwin/main] fputwc: call __fputwc directly X-Act-Checkin: newlib-cygwin X-Git-Author: Corinna Vinschen X-Git-Refname: refs/heads/main X-Git-Oldrev: 422c4f0451ccaff9aa38ee86d5d860f41c7bf9ef X-Git-Newrev: 47f079b98e46792c776dbea230d92a6dfc1d428f Message-Id: <20240119105221.E714138582AE@sourceware.org> Date: Fri, 19 Jan 2024 10:52:21 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dnewlib-cygwin.git;h=3D47f079b98e4= 6792c776dbea230d92a6dfc1d428f commit 47f079b98e46792c776dbea230d92a6dfc1d428f Author: Corinna Vinschen AuthorDate: Fri Jan 19 11:14:33 2024 +0100 Commit: Corinna Vinschen CommitDate: Fri Jan 19 11:51:01 2024 +0100 fputwc: call __fputwc directly =20 Avoid another hop in the call stack. =20 Signed-off-by: Corinna Vinschen 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 =3D _REENT; =20 CHECK_INIT(reent, fp); - return _fputwc_r (reent, wc, fp); + wint_t r; + + _newlib_flockfile_start (fp); + r =3D __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 =3D _REENT; =20 CHECK_INIT(reent, fp); - return _fputwc_unlocked_r (reent, wc, fp); + return __fputwc(reent, wc, fp); }