From: Joseph Myers <joseph@codesourcery.com>
To: <libc-alpha@sourceware.org>
Subject: Use libc_hidden_* for tolower, toupper (bug 15105)
Date: Thu, 22 Feb 2018 21:24:40 +0000 [thread overview]
Message-ID: <alpine.DEB.2.20.1802222124240.4516@digraph.polyomino.org.uk> (raw)
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). Together with my patch
<https://sourceware.org/ml/libc-alpha/2018-02/msg00602.html> for atoi
(pending review), this completes fixing such localplt failures for -Os
(at least for x86_64).
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.
diff --git a/ctype/ctype.c b/ctype/ctype.c
index e86c5b0..6cb8000 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 ac6db79..493a6f8 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
--
Joseph S. Myers
joseph@codesourcery.com
next reply other threads:[~2018-02-22 21:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-22 21:24 Joseph Myers [this message]
2018-02-23 8:58 ` Use libc_hidden_* for tolower, toupper (bug 15105) Florian Weimer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.20.1802222124240.4516@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).