public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
From: Torbjorn SVENSSON <torbjorn.svensson@st.com>
To: Jeff Johnston <jjohnstn@redhat.com>
Cc: Newlib <newlib@sourceware.org>
Subject: RE: [PATCH 2/3] libc/include/wchar.h: Remove parameter name
Date: Fri, 2 Oct 2020 06:53:17 +0000	[thread overview]
Message-ID: <AM6PR10MB2197E7E0D56F6B18395B77F681310@AM6PR10MB2197.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <CAOox84sBDVArNU_vbEyDBb75GR6GntkwneeX6n6HHyUpxrt=PQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1911 bytes --]

Patch attached.

From: Jeff Johnston <jjohnstn@redhat.com>
Sent: den 2 oktober 2020 01:24
To: Torbjorn SVENSSON <torbjorn.svensson@st.com>
Cc: Newlib <newlib@sourceware.org>
Subject: Re: [PATCH 2/3] libc/include/wchar.h: Remove parameter name

Looks good.  Could you please resend the patch as an attachment?

Thanks,

-- Jeff J.

On Thu, Oct 1, 2020 at 10:19 AM Torbjörn SVENSSON via Newlib <newlib@sourceware.org<mailto:newlib@sourceware.org>> wrote:
As discussed in GCC bug 97088
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088), parameters in
prototypes of library functions should use reserved names, or no name
at all.

This patch removes the 'ptr' parameter name from
wint_t _getwchar_r (struct _reent *);
wint_t _getwchar_unlocked_r (struct _reent *);

to avoid possible clashes with user code in case someone uses
before including Newlib's wchar.h (or uses some other conflicting
definition)

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com<mailto:torbjorn.svensson@st.com>>
---
 newlib/libc/include/wchar.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h
index c04a6510e..0d3e636f9 100644
--- a/newlib/libc/include/wchar.h
+++ b/newlib/libc/include/wchar.h
@@ -248,8 +248,8 @@ int _fputws_unlocked_r (struct _reent *, const wchar_t *, __FILE *);
 int _fwide_r (struct _reent *, __FILE *, int);
 wint_t _getwc_r (struct _reent *, __FILE *);
 wint_t _getwc_unlocked_r (struct _reent *, __FILE *);
-wint_t _getwchar_r (struct _reent *ptr);
-wint_t _getwchar_unlocked_r (struct _reent *ptr);
+wint_t _getwchar_r (struct _reent *);
+wint_t _getwchar_unlocked_r (struct _reent *);
 wint_t _putwc_r (struct _reent *, wchar_t, __FILE *);
 wint_t _putwc_unlocked_r (struct _reent *, wchar_t, __FILE *);
 wint_t _putwchar_r (struct _reent *, wchar_t);
--
2.18.0

[-- Attachment #2: 0002-libc-include-wchar.h-Remove-parameter-name.patch --]
[-- Type: application/octet-stream, Size: 1710 bytes --]

From a9ef14712398565ad78998d9ecdd5fab09090f78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Torbj=C3=B6rn=20SVENSSON?= <torbjorn.svensson@st.com>
Date: Thu, 1 Oct 2020 12:46:51 +0200
Subject: [PATCH 2/3] libc/include/wchar.h: Remove parameter name
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

As discussed in GCC bug 97088
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088), parameters in
prototypes of library functions should use reserved names, or no name
at all.

This patch removes the 'ptr' parameter name from
wint_t _getwchar_r (struct _reent *);
wint_t _getwchar_unlocked_r (struct _reent *);

to avoid possible clashes with user code in case someone uses
before including Newlib's wchar.h (or uses some other conflicting
definition)

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
---
 newlib/libc/include/wchar.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/newlib/libc/include/wchar.h b/newlib/libc/include/wchar.h
index c04a6510e..0d3e636f9 100644
--- a/newlib/libc/include/wchar.h
+++ b/newlib/libc/include/wchar.h
@@ -248,8 +248,8 @@ int _fputws_unlocked_r (struct _reent *, const wchar_t *, __FILE *);
 int _fwide_r (struct _reent *, __FILE *, int);
 wint_t _getwc_r (struct _reent *, __FILE *);
 wint_t _getwc_unlocked_r (struct _reent *, __FILE *);
-wint_t _getwchar_r (struct _reent *ptr);
-wint_t _getwchar_unlocked_r (struct _reent *ptr);
+wint_t _getwchar_r (struct _reent *);
+wint_t _getwchar_unlocked_r (struct _reent *);
 wint_t _putwc_r (struct _reent *, wchar_t, __FILE *);
 wint_t _putwc_unlocked_r (struct _reent *, wchar_t, __FILE *);
 wint_t _putwchar_r (struct _reent *, wchar_t);
-- 
2.18.0


  reply	other threads:[~2020-10-02  6:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 14:17 [PATCH 0/3] libc: Comply with the libstdc++ test case names.cc Torbjörn SVENSSON
2020-10-01 14:17 ` [PATCH 1/3] libc/include/inttypes.h: Remove parameter name Torbjörn SVENSSON
2020-10-01 23:22   ` Jeff Johnston
2020-10-02  6:52     ` Torbjorn SVENSSON
2020-10-02  6:53       ` nrupp
2020-10-02 21:01       ` Jeff Johnston
2020-10-01 14:17 ` [PATCH 2/3] libc/include/wchar.h: " Torbjörn SVENSSON
2020-10-01 23:24   ` Jeff Johnston
2020-10-02  6:53     ` Torbjorn SVENSSON [this message]
2020-10-02 21:02       ` Jeff Johnston
2020-10-01 14:17 ` [PATCH 3/3] libc: Replace one letter member names in __tzrule_struct Torbjörn SVENSSON
2020-10-01 23:21   ` Jeff Johnston
2020-10-02  7:36     ` Torbjorn SVENSSON
2020-10-02 21:04       ` Jeff Johnston
2020-10-05 12:50         ` [PATCH v2] libc/time: Move internal newlib tz-structs to local.h Torbjörn SVENSSON
2020-10-15  6:52           ` Torbjorn SVENSSON
2020-10-15 10:21             ` Corinna Vinschen
2020-10-15 16:47               ` Torbjorn SVENSSON
2020-10-15 17:09                 ` Jeff Johnston
2020-10-15 17:15                   ` Corinna Vinschen
2020-10-15 17:11                 ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AM6PR10MB2197E7E0D56F6B18395B77F681310@AM6PR10MB2197.EURPRD10.PROD.OUTLOOK.COM \
    --to=torbjorn.svensson@st.com \
    --cc=jjohnstn@redhat.com \
    --cc=newlib@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).