From 000f290ff179c9910f09b7f76797bdab575abb15 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 28 Feb 2018 14:16:21 +0000 Subject: Use libc_hidden_* for strtoumax (bug 15105). On sparc, localplt test failures appear when building with -Os because of a call to strtoumax from sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c, and strtoumax is not inlined when building with -Os. This patch fixes those failures by using libc_hidden_proto and libc_hidden_def for strtoumax. Tested with build-many-glibcs.py for sparc64-linux-gnu-disable-multi-arch, sparc64-linux-gnu, sparcv9-linux-gnu-disable-multi-arch, sparcv9-linux-gnu that this fixes that test failure with -Os. [BZ #15105] * sysdeps/wordsize-32/strtoumax.c (strtoumax): Use libc_hidden_def. * sysdeps/wordsize-64/strtoumax.c (strtoumax): Likewise. * include/inttypes.h: New file. --- sysdeps/wordsize-32/strtoumax.c | 1 + sysdeps/wordsize-64/strtoumax.c | 1 + 2 files changed, 2 insertions(+) (limited to 'sysdeps') diff --git a/sysdeps/wordsize-32/strtoumax.c b/sysdeps/wordsize-32/strtoumax.c index 7f19ff0756..cabd4d8c8d 100644 --- a/sysdeps/wordsize-32/strtoumax.c +++ b/sysdeps/wordsize-32/strtoumax.c @@ -25,3 +25,4 @@ strtoumax (const char *__restrict nptr, char **__restrict endptr, int base) { return __strtoull_internal (nptr, endptr, base, 0); } +libc_hidden_def (strtoumax) diff --git a/sysdeps/wordsize-64/strtoumax.c b/sysdeps/wordsize-64/strtoumax.c index bc7dd43cae..04468458df 100644 --- a/sysdeps/wordsize-64/strtoumax.c +++ b/sysdeps/wordsize-64/strtoumax.c @@ -25,3 +25,4 @@ strtoumax (const char *__restrict nptr, char **__restrict endptr, int base) { return __strtoul_internal (nptr, endptr, base, 0); } +libc_hidden_def (strtoumax) -- cgit v1.2.3