From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 1F76B396E423; Fri, 13 May 2022 14:24:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1F76B396E423 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] ctype: Handle ctype.h internal alias for !__USE_EXTERN_INLINES X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: 5a24c209300473c5db2e00fb5782ec3c74c073bd X-Git-Newrev: cca1536fc2347d22466713374d6e8899eb794847 Message-Id: <20220513142451.1F76B396E423@sourceware.org> Date: Fri, 13 May 2022 14:24:51 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 May 2022 14:24:51 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=cca1536fc2347d22466713374d6e8899eb794847 commit cca1536fc2347d22466713374d6e8899eb794847 Author: Adhemerval Zanella 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. */