public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Fangrui Song <maskray@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc/google/grte/v5-2.27/master] Use libc_hidden_* for atoi (bug 15105).
Date: Mon, 15 Nov 2021 22:40:57 +0000 (GMT)	[thread overview]
Message-ID: <20211115224057.ED9223858032@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2989090595945361a67de72545d43fee9c61eb15

commit 2989090595945361a67de72545d43fee9c61eb15
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Mon Feb 26 18:17:47 2018 +0000

    Use libc_hidden_* for atoi (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 atoi 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).
    
            [BZ #15105]
            * stdlib/atoi.c (atoi): Use libc_hidden_def.
            * include/stdlib.h [!_ISOMAC] (atoi): Use libc_hidden_proto.
    
    (cherry picked from commit 20602c72fa54bc0923314820ec8148186096bf3b)

Diff:
---
 include/stdlib.h | 2 ++
 stdlib/atoi.c    | 1 +
 2 files changed, 3 insertions(+)

diff --git a/include/stdlib.h b/include/stdlib.h
index 5974fb3d24..114e12d255 100644
--- a/include/stdlib.h
+++ b/include/stdlib.h
@@ -210,6 +210,8 @@ libc_hidden_proto (strtoll)
 libc_hidden_proto (strtoul)
 libc_hidden_proto (strtoull)
 
+libc_hidden_proto (atoi)
+
 extern float __strtof_nan (const char *, char **, char);
 extern double __strtod_nan (const char *, char **, char);
 extern long double __strtold_nan (const char *, char **, char);
diff --git a/stdlib/atoi.c b/stdlib/atoi.c
index a6c3f1d547..c42858494f 100644
--- a/stdlib/atoi.c
+++ b/stdlib/atoi.c
@@ -26,3 +26,4 @@ atoi (const char *nptr)
 {
   return (int) strtol (nptr, (char **) NULL, 10);
 }
+libc_hidden_def (atoi)


             reply	other threads:[~2021-11-15 22:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 22:40 Fangrui Song [this message]
2021-11-19 21:22 Fangrui Song

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211115224057.ED9223858032@sourceware.org \
    --to=maskray@sourceware.org \
    --cc=glibc-cvs@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).