public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] ctype: Handle ctype.h internal alias for !__USE_EXTERN_INLINES Date: Fri, 29 Apr 2022 14:08:59 +0000 (GMT) [thread overview] Message-ID: <20220429140859.E5E353857362@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cf5d8592048f11557cc71f3e12aee441cd70e92f commit cf5d8592048f11557cc71f3e12aee441cd70e92f Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Thu Mar 31 11:44:26 2022 -0300 ctype: Handle ctype.h internal alias for !__USE_EXTERN_INLINES Diff: --- ctype/ctype.c | 2 ++ include/ctype.h | 12 ++++++++++++ 2 files changed, 14 insertions(+) diff --git a/ctype/ctype.c b/ctype/ctype.c index 81385e0e8e..b83e1600f7 100644 --- a/ctype/ctype.c +++ b/ctype/ctype.c @@ -45,6 +45,7 @@ __tolower (int c) { return c >= -128 && c < 256 ? __ctype_tolower[c] : c; } +libc_hidden_def (__tolower) weak_alias (__tolower, tolower) int @@ -52,4 +53,5 @@ __toupper (int c) { return c >= -128 && c < 256 ? __ctype_toupper[c] : c; } +libc_hidden_def (__toupper) weak_alias (__toupper, toupper) diff --git a/include/ctype.h b/include/ctype.h index ac6db790b7..27a766322d 100644 --- a/include/ctype.h +++ b/include/ctype.h @@ -50,6 +50,11 @@ __ctype_tolower_loc (void) return __libc_tsd_address (const int32_t *, CTYPE_TOLOWER); } +__typeof (tolower) __tolower; +libc_hidden_proto (__tolower) +__typeof (tolower) __toupper; +libc_hidden_proto (__toupper) + # ifndef __NO_CTYPE /* The spec says that isdigit must only match the decimal digits. We can check this without a memory access. */ @@ -61,6 +66,13 @@ __ctype_tolower_loc (void) # define __isdigit_l(c, l) ({ int __c = (c); __c >= '0' && __c <= '9'; }) # endif /* Not __NO_CTYPE. */ +# ifndef __USE_EXTERN_INLINES +# undef tolower +# define tolower(c) __tolower (c) +# undef toupper +# define toupper(c) __toupper (c) +# endif + # endif /* IS_IN (libc). */ #endif /* Not _ISOMAC. */
next reply other threads:[~2022-04-29 14:08 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-04-29 14:08 Adhemerval Zanella [this message] -- strict thread matches above, loose matches on Subject: below -- 2022-06-09 21:25 Adhemerval Zanella 2022-06-09 13:21 Adhemerval Zanella 2022-06-03 14:11 Adhemerval Zanella 2022-05-13 14:24 Adhemerval Zanella 2022-05-12 19:38 Adhemerval Zanella 2022-05-10 18:29 Adhemerval Zanella 2022-04-04 12:59 Adhemerval Zanella 2022-03-31 19:11 Adhemerval Zanella
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=20220429140859.E5E353857362@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@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: linkBe 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).