From: Brian Inglis <Brian.Inglis@SystematicSw.ab.ca>
To: newlib@sourceware.org
Subject: Re: [PATCH v2] ctype: use less short names in public header
Date: Sat, 20 Nov 2021 13:08:50 -0700 [thread overview]
Message-ID: <112a5c40-3f35-ba97-23bb-417302c99ff1@SystematicSw.ab.ca> (raw)
In-Reply-To: <YY5BqHIpiFtcjDM2@calimero.vinschen.de>
On 2021-11-12 03:27, Corinna Vinschen wrote:
> On Nov 11 17:28, Mike Frysinger wrote:
>> On 11 Nov 2021 11:35, Corinna Vinschen wrote:
>>> On Nov 10 20:37, Mike Frysinger wrote:
>>>> We're seeing a build failure in GNU sim code which is using _P locally
>>>> but the ctype.h define clashes with it. Rename these to use the same
>>>> symbols that glibc does. They're a bit more verbose, but seems likely
>>>> that we'll have fewer conflicts if glibc isn't seeing them.
>>>>
>>>> However, these shortnames are still used internally by ctype modules
>>>> to produce pretty concise source code, so move the short names to the
>>>> internal ctype_.h where short name conflicts shouldn't show up.
>>>> ---
>>>> newlib/libc/ctype/ctype_.h | 10 +++++
>>>> newlib/libc/ctype/isalnum.c | 2 +-
>>>> newlib/libc/ctype/isalnum_l.c | 2 +-
>>>> newlib/libc/ctype/isalpha.c | 2 +-
>>>> newlib/libc/ctype/isalpha_l.c | 2 +-
>>>> newlib/libc/ctype/isblank.c | 2 +-
>>>> newlib/libc/ctype/isblank_l.c | 2 +-
>>>> newlib/libc/ctype/iscntrl.c | 2 +-
>>>> newlib/libc/ctype/iscntrl_l.c | 2 +-
>>>> newlib/libc/ctype/isdigit.c | 2 +-
>>>> newlib/libc/ctype/isdigit_l.c | 2 +-
>>>> newlib/libc/ctype/islower.c | 2 +-
>>>> newlib/libc/ctype/islower_l.c | 2 +-
>>>> newlib/libc/ctype/isprint.c | 4 +-
>>>> newlib/libc/ctype/isprint_l.c | 4 +-
>>>> newlib/libc/ctype/ispunct.c | 2 +-
>>>> newlib/libc/ctype/ispunct_l.c | 2 +-
>>>> newlib/libc/ctype/isspace.c | 2 +-
>>>> newlib/libc/ctype/isspace_l.c | 2 +-
>>>> newlib/libc/ctype/isupper.c | 2 +-
>>>> newlib/libc/ctype/isupper_l.c | 2 +-
>>>> newlib/libc/ctype/isxdigit.c | 2 +-
>>>> newlib/libc/ctype/isxdigit_l.c | 2 +-
>>>> newlib/libc/include/ctype.h | 67 ++++++++++++++++++----------------
>>>> 24 files changed, 69 insertions(+), 56 deletions(-)
>>>
>>> Good idea to move the _X macros to ctype_.h :) Please push.
>>
>> i pushed this since it's standalone now. not sure if you're also saying
>> "define _COMPILING_NEWLIB for all targets when compiling" is OK, so i haven't
>> pushed that yet.
>
> Oh, that was implicitly clear to me, given the original dependency.
> So, yeah, please push.
+1
I've got a package build *NOT* failing with a redefinition of a couple
of those short symbols to macros!
I will remind the author of the reserved symbols issue, and submit an
upstream patch.
I will also report not failing as an upstream gcc error, as I don't
think the compiler should just warn about those types of redefinitions.
But it would be good to see those short symbols lengthened and hidden
from normal usage, as I have also seen those kinds of short symbols _?
used as parameter and argument names in various sources.
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada
This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
next prev parent reply other threads:[~2021-11-20 20:08 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-07 0:21 what's up with _COMPILING_NEWLIB Mike Frysinger
2021-11-08 10:05 ` Corinna Vinschen
2021-11-08 11:46 ` Mike Frysinger
2021-11-08 15:05 ` Corinna Vinschen
2021-11-08 18:14 ` Mike Frysinger
2021-11-09 1:24 ` [PATCH 1/2] define _COMPILING_NEWLIB for all targets when compiling Mike Frysinger
2021-11-09 1:24 ` [PATCH 2/2] ctype: use less short names in public header Mike Frysinger
2021-11-09 11:38 ` Corinna Vinschen
2021-11-10 0:18 ` Mike Frysinger
2021-11-10 10:56 ` Corinna Vinschen
2021-11-30 12:18 ` Jonathan Wakely
2021-11-11 1:37 ` [PATCH v2] " Mike Frysinger
2021-11-11 10:35 ` Corinna Vinschen
2021-11-11 22:28 ` Mike Frysinger
2021-11-12 10:27 ` Corinna Vinschen
2021-11-20 20:08 ` Brian Inglis [this message]
2021-11-23 15:09 ` [PATCH 2/2] " Richard Earnshaw
2021-11-24 4:15 ` Mike Frysinger
2021-11-24 10:58 ` Richard Earnshaw
2021-11-24 11:01 ` Richard Earnshaw
2021-11-30 12:01 ` Jonathan Wakely
2021-11-30 15:14 ` Corinna Vinschen
2021-11-30 17:12 ` Jonathan Wakely
2021-11-30 17:15 ` Jonathan Wakely
2021-11-30 17:52 ` Richard Earnshaw
2021-12-02 10:27 ` Corinna Vinschen
2021-12-03 9:56 ` Corinna Vinschen
2021-12-05 9:42 ` Mike Frysinger
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=112a5c40-3f35-ba97-23bb-417302c99ff1@SystematicSw.ab.ca \
--to=brian.inglis@systematicsw.ab.ca \
--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).