From: Paul Eggert Date: Wed, 28 Jul 2004 06:58:25 +0000 (+0000) Subject: (strtiomax, strtoumax): Declare if not already X-Git-Tag: v5.3.0~1058 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=713c2a319ad7f8fc97935d93d3d9965c0df9a69b;p=thirdparty%2Fcoreutils.git (strtiomax, strtoumax): Declare if not already declared: this fixes a portability bug with Solaris 8 + GCC. (STRTOX): Parenthesize use of macro arg as expression. (vstrtoimax, vstrtoumax, vstrtold): Remove now-unnecessary parentheses. --- diff --git a/src/printf.c b/src/printf.c index 6a3a37a58b..62e85d98df 100644 --- a/src/printf.c +++ b/src/printf.c @@ -57,6 +57,13 @@ #include "error.h" #include "unicodeio.h" +#if ! (HAVE_DECL_STRTOIMAX || defined strtoimax) +intmax_t strtoimax (); +#endif +#if ! (HAVE_DECL_STRTOUMAX || defined strtoumax) +uintmax_t strtoumax (); +#endif + /* The official name of this program (e.g., no `g' prefix). */ #define PROGRAM_NAME "printf" @@ -177,15 +184,15 @@ FUNC_NAME (char const *s) \ else \ { \ errno = 0; \ - val = LIB_FUNC_EXPR; \ + val = (LIB_FUNC_EXPR); \ verify (s, end); \ } \ return val; \ } \ -STRTOX (intmax_t, vstrtoimax, (strtoimax (s, &end, 0))) -STRTOX (uintmax_t, vstrtoumax, (strtoumax (s, &end, 0))) -STRTOX (long double, vstrtold, (c_strtold (s, &end))) +STRTOX (intmax_t, vstrtoimax, strtoimax (s, &end, 0)) +STRTOX (uintmax_t, vstrtoumax, strtoumax (s, &end, 0)) +STRTOX (long double, vstrtold, c_strtold (s, &end)) /* Output a single-character \ escape. */