]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(strtiomax, strtoumax): Declare if not already
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Jul 2004 06:58:25 +0000 (06:58 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 28 Jul 2004 06:58:25 +0000 (06:58 +0000)
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.

src/printf.c

index 6a3a37a58bef2b312861a9cf6b8703cede698cc4..62e85d98df9bcbe2c6d918c4018358eb84d4979c 100644 (file)
 #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.  */