diff options
author | Timo Teräs <timo.teras@iki.fi> | 2014-07-08 12:00:44 +0300 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2014-07-08 12:01:26 +0300 |
commit | 614de3f348e53eb80ddfbdf8ceef7b32fe546606 (patch) | |
tree | faf3138fd66ec4b39cb518c824278619eebddc04 /main/musl/0004-fix-failure-of-wide-printf-scanf-functions-to-set-wi.patch | |
parent | 8b7245596cb245a424f00548646c9162b5ff42ce (diff) | |
download | aports-614de3f348e53eb80ddfbdf8ceef7b32fe546606.tar.bz2 aports-614de3f348e53eb80ddfbdf8ceef7b32fe546606.tar.xz |
main/musl: cherry-pick fixes from upstream git
Diffstat (limited to 'main/musl/0004-fix-failure-of-wide-printf-scanf-functions-to-set-wi.patch')
-rw-r--r-- | main/musl/0004-fix-failure-of-wide-printf-scanf-functions-to-set-wi.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/main/musl/0004-fix-failure-of-wide-printf-scanf-functions-to-set-wi.patch b/main/musl/0004-fix-failure-of-wide-printf-scanf-functions-to-set-wi.patch new file mode 100644 index 0000000000..54edaf8c3c --- /dev/null +++ b/main/musl/0004-fix-failure-of-wide-printf-scanf-functions-to-set-wi.patch @@ -0,0 +1,42 @@ +From 984c25b74da085c6ae6b44a87bbd5f8afc9be331 Mon Sep 17 00:00:00 2001 +From: Rich Felker <dalias@aerifal.cx> +Date: Wed, 2 Jul 2014 12:09:48 -0400 +Subject: [PATCH] fix failure of wide printf/scanf functions to set wide + orientation + +in some cases, these functions internally call a byte-based input or +output function before calling getwc/putwc, so they cannot rely on the +latter to set the orientation. +--- + src/stdio/vfwprintf.c | 1 + + src/stdio/vfwscanf.c | 2 ++ + 2 files changed, 3 insertions(+) + +diff --git a/src/stdio/vfwprintf.c b/src/stdio/vfwprintf.c +index 984ff7b..c640059 100644 +--- a/src/stdio/vfwprintf.c ++++ b/src/stdio/vfwprintf.c +@@ -355,6 +355,7 @@ int vfwprintf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap) + } + + FLOCK(f); ++ f->mode |= f->mode+1; + ret = wprintf_core(f, fmt, &ap2, nl_arg, nl_type); + FUNLOCK(f); + va_end(ap2); +diff --git a/src/stdio/vfwscanf.c b/src/stdio/vfwscanf.c +index f8f4b70..ac5c2c2 100644 +--- a/src/stdio/vfwscanf.c ++++ b/src/stdio/vfwscanf.c +@@ -104,6 +104,8 @@ int vfwscanf(FILE *restrict f, const wchar_t *restrict fmt, va_list ap) + + FLOCK(f); + ++ f->mode |= f->mode+1; ++ + for (p=fmt; *p; p++) { + + alloc = 0; +-- +2.0.1 + |