add %m support to wide printf
authorRich Felker <dalias@aerifal.cx>
Sat, 13 Jun 2015 04:37:27 +0000 (04:37 +0000)
committerRich Felker <dalias@aerifal.cx>
Sat, 13 Jun 2015 04:37:27 +0000 (04:37 +0000)
src/stdio/vfwprintf.c

index ebdff00101cfb000309c2aee8f0de3649c271b58..281f4e569170afb0aa8dbaf2b38ca31e7bdab2a6 100644 (file)
@@ -293,6 +293,8 @@ static int wprintf_core(FILE *f, const wchar_t *fmt, va_list *ap, union arg *nl_
                        if ((fl&LEFT_ADJ)) fprintf(f, "%.*s", w-p, "");
                        l=w;
                        continue;
+               case 'm':
+                       arg.p = strerror(errno);
                case 's':
                        bs = arg.p;
                        if (p<0) p = INT_MAX;