]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use libc_hidden_* for tolower, toupper (bug 15105).
authorJoseph Myers <joseph@codesourcery.com>
Fri, 23 Feb 2018 13:54:53 +0000 (13:54 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Fri, 23 Feb 2018 13:54:53 +0000 (13:54 +0000)
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.

ChangeLog
ctype/ctype.c
include/ctype.h

index e3d251cf8006789223f33d7337b5e75e3624fbfa..e14f3d876470a378cd6cc7ecb0d2f0bf3dd36f7f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2018-02-23  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.
+
 2018-02-23  Mike FABIAN  <mfabian@redhat.com>
 
        * localedata/Makefile: Remove --quiet argument when
index e86c5b03c7f4212f5fc41495db82ef7ec9c4dce5..6cb800077113a0bf8a58aff0c77df9bc7c0195f6 100644 (file)
@@ -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)
index ac6db790b74cb85a1cb4e178d80a7a5ed4de4eed..493a6f80ce8e8b8edc75578a0d33ba34551a7ace 100644 (file)
@@ -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