public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/google/grte/v5-2.27/master] Use libc_hidden_* for tolower, toupper (bug 15105).
@ 2021-11-15 22:40 Fangrui Song
  0 siblings, 0 replies; 2+ messages in thread
From: Fangrui Song @ 2021-11-15 22:40 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=6d00fff0447aa676927b553da1a1404e46130f7a

commit 6d00fff0447aa676927b553da1a1404e46130f7a
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Feb 23 13:54:53 2018 +0000

    Use libc_hidden_* for tolower, toupper (bug 15105).
    
    Continuing the fixes for localplt test failures with -Os arising from
    functions not being inlined in that case, this patch fixes such
    failures for tolower and toupper by using libc_hidden_proto and
    libc_hidden_def.
    
    Tested for x86_64 (both that it removes this particular localplt
    failure for -Os, and that the testsuite continues to pass without
    -Os).
    
    2018-02-22  Joseph Myers  <joseph@codesourcery.com>
    
            [BZ #15105]
            * ctype/ctype.c (tolower): Use libc_hidden_def.
            (toupper): Likewise.
            * include/ctype.h [!_ISOMAC] (tolower): Use libc_hidden_proto.
            [!_ISOMAC] (toupper): Likewise.
    
    (cherry picked from commit 54412d20618b7b93f136a168e788573575f8a7a6)

Diff:
---
 ctype/ctype.c   | 2 ++
 include/ctype.h | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/ctype/ctype.c b/ctype/ctype.c
index e86c5b03c7..6cb8000771 100644
--- a/ctype/ctype.c
+++ b/ctype/ctype.c
@@ -45,9 +45,11 @@ tolower (int c)
 {
   return c >= -128 && c < 256 ? __ctype_tolower[c] : c;
 }
+libc_hidden_def (tolower)
 
 int
 toupper (int c)
 {
   return c >= -128 && c < 256 ? __ctype_toupper[c] : c;
 }
+libc_hidden_def (toupper)
diff --git a/include/ctype.h b/include/ctype.h
index ac6db790b7..493a6f80ce 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -11,6 +11,9 @@ libc_hidden_proto (__ctype_init)
    So defeat macro expansion with parens for this declaration.  */
 extern int (__isctype) (int __c, int __mask);
 
+libc_hidden_proto (tolower)
+libc_hidden_proto (toupper)
+
 # if IS_IN (libc)
 
 /* These accessors are used by the optimized macros to find the


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [glibc/google/grte/v5-2.27/master] Use libc_hidden_* for tolower, toupper (bug 15105).
@ 2021-11-19 21:22 Fangrui Song
  0 siblings, 0 replies; 2+ messages in thread
From: Fangrui Song @ 2021-11-19 21:22 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=98fa83a2a8aa784388182af5a530072375713aed

commit 98fa83a2a8aa784388182af5a530072375713aed
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Feb 23 13:54:53 2018 +0000

    Use libc_hidden_* for tolower, toupper (bug 15105).
    
    Continuing the fixes for localplt test failures with -Os arising from
    functions not being inlined in that case, this patch fixes such
    failures for tolower and toupper by using libc_hidden_proto and
    libc_hidden_def.
    
    Tested for x86_64 (both that it removes this particular localplt
    failure for -Os, and that the testsuite continues to pass without
    -Os).
    
    2018-02-22  Joseph Myers  <joseph@codesourcery.com>
    
            [BZ #15105]
            * ctype/ctype.c (tolower): Use libc_hidden_def.
            (toupper): Likewise.
            * include/ctype.h [!_ISOMAC] (tolower): Use libc_hidden_proto.
            [!_ISOMAC] (toupper): Likewise.
    
    (cherry picked from commit 54412d20618b7b93f136a168e788573575f8a7a6)

Diff:
---
 ctype/ctype.c   | 2 ++
 include/ctype.h | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/ctype/ctype.c b/ctype/ctype.c
index e86c5b03c7..6cb8000771 100644
--- a/ctype/ctype.c
+++ b/ctype/ctype.c
@@ -45,9 +45,11 @@ tolower (int c)
 {
   return c >= -128 && c < 256 ? __ctype_tolower[c] : c;
 }
+libc_hidden_def (tolower)
 
 int
 toupper (int c)
 {
   return c >= -128 && c < 256 ? __ctype_toupper[c] : c;
 }
+libc_hidden_def (toupper)
diff --git a/include/ctype.h b/include/ctype.h
index ac6db790b7..493a6f80ce 100644
--- a/include/ctype.h
+++ b/include/ctype.h
@@ -11,6 +11,9 @@ libc_hidden_proto (__ctype_init)
    So defeat macro expansion with parens for this declaration.  */
 extern int (__isctype) (int __c, int __mask);
 
+libc_hidden_proto (tolower)
+libc_hidden_proto (toupper)
+
 # if IS_IN (libc)
 
 /* These accessors are used by the optimized macros to find the


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-11-19 21:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 22:40 [glibc/google/grte/v5-2.27/master] Use libc_hidden_* for tolower, toupper (bug 15105) Fangrui Song
2021-11-19 21:22 Fangrui Song

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).