Re: [PATCH v2] ctype: use less short names in public header

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <YY2ZCq1JTgcunrud@vapier>
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.
-mike
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmGNmQoACgkQQWM7n+g3
9YHLsA//SCuOeiABPh18NeRHg1/YSljFEc7tJLjgkXZGta0pdPTSLmwWbcLsah01
UrjqXZEoWhUP5yXuEAetZ4BqO3NNcgDuq/zzd7V2GgLBouRT/Ij1VAPGFgTrNFUn
MkNQkGzuLIS0qnuAasHh7RtvtG1g4MlsSdIDkJV0K0leqMZm7NyrrryzviHo6oAM
A2c7R7CSbccF4OWvK/mVSifhtPM1rqWAEkN0Un9G8SziRnVg0mlD+4ptZhcXBVTy
b1N3rTmO/AuTNcLw0w1BQzAfW/pWpurqdIOGNKlBeSJyQAT0vWmeBx5kRBG64byl
9F9EHYOMGeOL/Vf0JaHehGzLHrPAVNp/llr3q0H98eADOzF3h40eSB3JAcVpPvgS
ZegC2kkjkz/ydhawFsgbojRxF+fgSw3midOjHw6zrUiGaBn2oBziSOvaweSnS//B
VfGGRwFkimPH+lkghMNSzKaH2RPsZQMIFBxZP7LvFexUK1m3ps6wVx9JhsCJ+Afp
vXC1t3k/T14S3IUxyBX/WDYIwXB3PaSC1PZ87rA7bUqdobVWMUvkqe2Wo/RqkACd
gNI2pAG27xZTF98K+a8cEqGCUUncqtTsDSgdSIQkVdwILO3bQmN8N6AHbQmCYzWj
IK+kjWqfa0TKGWTy6M4AC32Y4nROwC/JlHu8JOIu1cmEEEb8G9I=
=Yewo
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.