]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
vfprintf: Fix tst-vfprintf-mbs-prec and tst-vfprintf-user-type
authorFlorian Weimer <fweimer@redhat.com>
Thu, 29 Jun 2017 11:32:39 +0000 (13:32 +0200)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 29 Jun 2017 14:46:03 +0000 (16:46 +0200)
ChangeLog
stdio-common/Makefile
stdio-common/tst-vfprintf-user-type.c

index 61f453df7b3f2df8a752073e42852cc41ca71dd5..147dcaaab89ce064051391060ac07749fd8ae633 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2017-06-29  Florian Weimer  <fweimer@redhat.com>
+
+       * stdio-common/tst-vfprintf-user-type.c (my_printf_function):
+       Adjust format string.
+       * stdio-common/Makefile (tst-vfprintf-mbs-prec.out): Add locale
+       dependency.
+
 2017-06-29  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
 
        * sysdeps/posix/spawni.c (__spawni_child): New function.
index 309d83ec0156486f89ac7540fc9f8cddee7001f9..622a85f329b7220b4d1638d1611cdf8e0184626f 100644 (file)
@@ -87,6 +87,7 @@ $(objpfx)tst-grouping.out: $(gen-locales)
 $(objpfx)tst-sprintf.out: $(gen-locales)
 $(objpfx)tst-sscanf.out: $(gen-locales)
 $(objpfx)tst-swprintf.out: $(gen-locales)
+$(objpfx)tst-vfprintf-mbs-prec.out: $(gen-locales)
 endif
 
 tst-printf-bz18872-ENV = MALLOC_TRACE=$(objpfx)tst-printf-bz18872.mtrace
index e9596c3080069e24c44fc405e05e165a463dda40..91ea02f382ee39de0062366afca2b4ec1ac83a99 100644 (file)
@@ -29,6 +29,7 @@
 #include <support/check.h>
 #include <support/support.h>
 #include <support/test-driver.h>
+#include <wchar.h>
 
 /* Initialized by do_test using register_printf_type.  */
 static int user_type;
@@ -55,8 +56,9 @@ my_printf_function (FILE *fp, const struct printf_info *info,
                     const void *const *args)
 {
   if (test_verbose > 0)
-    printf ("info: %s (%p, %p, {%p}@%p) called for %%%c (prec %d)\n",
-            __func__, fp, info, args[0], args, info->spec, info->prec);
+    printf ("info: %s (%p, %p, {%p}@%p) called for %%%lc (prec %d)\n",
+            __func__, fp, info, args[0], args, (wint_t) info->spec,
+            info->prec);
 
   TEST_VERIFY (info->spec == 'P');
   size_t nargs;
@@ -109,8 +111,9 @@ my_arginfo_function (const struct printf_info *info,
   if (info->spec != 'P')
     return -1;
   if (test_verbose > 0)
-    printf ("info: %s (%p, %zu, %p, %p) called for %%%c (prec %d)\n",
-            __func__, info, n, argtypes, size, info->spec, info->prec);
+    printf ("info: %s (%p, %zu, %p, %p) called for %%%lc (prec %d)\n",
+            __func__, info, n, argtypes, size, (wint_t) info->spec,
+            info->prec);
 
   TEST_VERIFY_EXIT (n >= 1);
   size_t nargs;