diff --git a/glib/gnulib/gl_cv_func_printf_directive_a/meson.build b/glib/gnulib/gl_cv_func_printf_directive_a/meson.build index 3283c98d2..6cb296443 100644 --- a/glib/gnulib/gl_cv_func_printf_directive_a/meson.build +++ b/glib/gnulib/gl_cv_func_printf_directive_a/meson.build @@ -16,27 +16,27 @@ static double zero = 0.0; int main () { int result = 0; - if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0 + if (sprintf (buf, "%a %d", 3.1416015625, 33) < 0 || (strcmp (buf, "0x1.922p+1 33") != 0 && strcmp (buf, "0x3.244p+0 33") != 0 && strcmp (buf, "0x6.488p-1 33") != 0 && strcmp (buf, "0xc.91p-2 33") != 0)) result |= 1; - if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0 + if (sprintf (buf, "%A %d", -3.1416015625, 33) < 0 || (strcmp (buf, "-0X1.922P+1 33") != 0 && strcmp (buf, "-0X3.244P+0 33") != 0 && strcmp (buf, "-0X6.488P-1 33") != 0 && strcmp (buf, "-0XC.91P-2 33") != 0)) result |= 2; /* This catches a FreeBSD 6.1 bug: it doesn't round. */ - if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 + if (sprintf (buf, "%.2a %d", 1.51, 33) < 0 || (strcmp (buf, "0x1.83p+0 33") != 0 && strcmp (buf, "0x3.05p-1 33") != 0 && strcmp (buf, "0x6.0ap-2 33") != 0 && strcmp (buf, "0xc.14p-3 33") != 0)) result |= 4; /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round. */ - if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0 + if (sprintf (buf, "%.0a %d", 1.51, 33) < 0 || (strcmp (buf, "0x2p+0 33") != 0 && strcmp (buf, "0x3p-1 33") != 0 && strcmp (buf, "0x6p-2 33") != 0 @@ -44,7 +44,7 @@ int main () result |= 4; /* This catches a FreeBSD 6.1 bug. See */ - if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0 + if (sprintf (buf, "%010a %d", 1.0 / zero, 33) < 0 || buf[0] == '0') result |= 8; /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */ diff --git a/glib/gnulib/gl_cv_func_printf_precision/meson.build b/glib/gnulib/gl_cv_func_printf_precision/meson.build index 35290c52f..bd390942e 100644 --- a/glib/gnulib/gl_cv_func_printf_precision/meson.build +++ b/glib/gnulib/gl_cv_func_printf_precision/meson.build @@ -23,14 +23,14 @@ int main () /* On BeOS, this would crash and show a dialog box. Avoid the crash. */ return 1; #endif - if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3) + if (sprintf (buf, "%.4000d %d", 1, 33) < 4000 + 3) result |= 1; - if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5) + if (sprintf (buf, "%.4000f %d", 1.0, 33) < 4000 + 5) result |= 2; - if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5 + if (sprintf (buf, "%.511f %d", 1.0, 33) < 511 + 5 || buf[0] != '1') result |= 4; - if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5 + if (sprintf (buf, "%.999f %d", 1.0, 33) < 999 + 5 || buf[0] != '1') result |= 4; return result;