]> Savannah Git Hosting - gnulib.git/commitdiff
printf.m4: fix a bug in detecting printf %j support
authorJim Meyering <meyering@fb.com>
Thu, 20 Oct 2016 16:32:54 +0000 (09:32 -0700)
committerJim Meyering <meyering@fb.com>
Thu, 20 Oct 2016 16:32:54 +0000 (09:32 -0700)
* m4/printf.m4 (gl_PRINTF_SIZES_C99): Fail any system for which
uintmax_t is defined in neither stdint.h nor inttypes.h.
Before, this macro might have mistakenly set
gl_cv_func_printf_sizes_c99=yes on such a system.
Spotted by Zev Weiss.

ChangeLog
m4/printf.m4

index a1a314b578106a4a036f6f7c12856603cc5440f4..48b1d1d8cfa45ee321463752f9bcf86e72860ba1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2016-10-20  Jim Meyering  <meyering@fb.com>
+
+       printf.m4: fix a bug in detecting printf %j support
+       * m4/printf.m4 (gl_PRINTF_SIZES_C99): Fail any system for which
+       uintmax_t is defined in neither stdint.h nor inttypes.h.
+       Before, this macro might have mistakenly set
+       gl_cv_func_printf_sizes_c99=yes on such a system.
+       Spotted by Zev Weiss.
+
 2016-10-19  Paul Eggert  <eggert@cs.ucla.edu>
 
        sched: substitute HAVE_SYS_CDEFS_H too
index e495e0cbc58d5551f258e2c0b0e453c05b30327c..c7a14b20e03d513b10862ad060d38800b27fc6a4 100644 (file)
@@ -38,6 +38,8 @@ int main ()
   if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
       || strcmp (buf, "12345671 33") != 0)
     result |= 1;
+#else
+  result |= 1;
 #endif
   buf[0] = '\0';
   if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0