From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 57E963856247; Tue, 10 May 2022 18:29:03 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 57E963856247 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: 67e0a662d916f22d19b411d02d99b723925d2722 X-Git-Newrev: 2a44ffb1aab28aaaef9ad03c0c4ba3fecc3f0bdc Message-Id: <20220510182903.57E963856247@sourceware.org> Date: Tue, 10 May 2022 18:29:03 +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: Tue, 10 May 2022 18:29:03 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2a44ffb1aab28aaaef9ad03c0c4ba3fecc3f0bdc commit 2a44ffb1aab28aaaef9ad03c0c4ba3fecc3f0bdc 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. */