diff options
author | Milan P. Stanić <mps@arvanta.net> | 2020-03-04 23:32:12 +0100 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2020-03-05 12:21:18 +0200 |
commit | 4cf38b14cc2bd7ac030a5f88d045fec8da4f1b65 (patch) | |
tree | 8ccf644abb9b6b459c9f7cce0b7eb4900891e8d3 /main/musl/fix-return-value-of-ungetc-when-argument-is-outside-.patch | |
parent | 349d91f28aca2a756c76780921959e296f58b8d7 (diff) | |
download | aports-4cf38b14cc2bd7ac030a5f88d045fec8da4f1b65.tar.bz2 aports-4cf38b14cc2bd7ac030a5f88d045fec8da4f1b65.tar.xz |
main/musl: backport fixes from 1.2.0
wcwidth wrongly returned 0 for most of planes 4 and up
missing case mapping between U+03F3 and U+037F
wrong cacosh results for arguments with negative imaginary part
wrong catanf/catanl results for various classes of arguments
wrong return value for ungetc with argument outside [0,UCHAR_MAX]
posix_openpt with no ptys available produced wrong errno
Diffstat (limited to 'main/musl/fix-return-value-of-ungetc-when-argument-is-outside-.patch')
-rw-r--r-- | main/musl/fix-return-value-of-ungetc-when-argument-is-outside-.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/main/musl/fix-return-value-of-ungetc-when-argument-is-outside-.patch b/main/musl/fix-return-value-of-ungetc-when-argument-is-outside-.patch new file mode 100644 index 0000000000..b03b1861de --- /dev/null +++ b/main/musl/fix-return-value-of-ungetc-when-argument-is-outside-.patch @@ -0,0 +1,31 @@ +From f6ecd0c296181bf6a2a7f54e3406c846500e8e63 Mon Sep 17 00:00:00 2001 +From: Rich Felker <dalias@aerifal.cx> +Date: Fri, 18 Oct 2019 21:11:44 -0400 +Subject: [PATCH] fix return value of ungetc when argument is outside unsigned + char range + +aside from the special value EOF, ungetc is specified to accept and +convert values outside the range of unsigned char. conversion takes +place automatically as part of assignment when storing into the +buffer, but the return value is also required to be the resulting +converted value, and this requirement was not satisfied. + +simplified from patch by Wang Jianjian. +--- + src/stdio/ungetc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/stdio/ungetc.c b/src/stdio/ungetc.c +index 180673a4..bc629d4c 100644 +--- a/src/stdio/ungetc.c ++++ b/src/stdio/ungetc.c +@@ -16,5 +16,5 @@ int ungetc(int c, FILE *f) + f->flags &= ~F_EOF; + + FUNLOCK(f); +- return c; ++ return (unsigned char)c; + } +-- +2.24.1 + |