From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 8FDD03850847; Fri, 3 Jun 2022 14:11:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8FDD03850847 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: 29b1b435a5b211da52bfbd2368b21c317f6b8647 X-Git-Newrev: ccfe8276619a75d83b2717bb7d93017db61b222e Message-Id: <20220603141100.8FDD03850847@sourceware.org> Date: Fri, 3 Jun 2022 14:11:00 +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, 03 Jun 2022 14:11:00 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ccfe8276619a75d83b2717bb7d93017db61b222e commit ccfe8276619a75d83b2717bb7d93017db61b222e 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. */