diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2023-07-31 13:44:16 +0300 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2023-07-31 23:39:09 +0300 |
commit | 8a4318943875cd922601d34e54ce8a83ad2e733c (patch) | |
tree | ea43623d4b2fafe9e96614cea2e279ffbd8e23de /newlib | |
parent | 4f78215c866a2e1a7cd1ba894772029fa19d8328 (diff) |
Revert "* libc/stdlib/mbtowc_r.c (__ascii_mbtowc): Disallow conversion of"
This reverts commit 2b77087a48ea56e77fca5aeab478c922f6473d7c.
For some reason lost in time, commit 2b77087a48ea5 introduced
Cygwin-specific code treating single byte characters outside the
portable character set as illegal chars. However, Cygwin was
always alone with this over-correct behaviour and it leads to
stuff like gnulib replacing functions defined in Cygwin with
their own implementation just due to that.
Revert this change, sans the changes to ChangeLog.
Fixes: 2b77087a48ea ("* libc/stdlib/mbtowc_r.c (__ascii_mbtowc): Disallow conversion of")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/libc/stdlib/mbtowc_r.c | 8 | ||||
-rw-r--r-- | newlib/libc/stdlib/wctomb_r.c | 4 |
2 files changed, 0 insertions, 12 deletions
diff --git a/newlib/libc/stdlib/mbtowc_r.c b/newlib/libc/stdlib/mbtowc_r.c index 01e596db8..cab8333d7 100644 --- a/newlib/libc/stdlib/mbtowc_r.c +++ b/newlib/libc/stdlib/mbtowc_r.c @@ -36,14 +36,6 @@ __ascii_mbtowc (struct _reent *r, if (n == 0) return -2; -#ifdef __CYGWIN__ - if ((wchar_t)*t >= 0x80) - { - _REENT_ERRNO(r) = EILSEQ; - return -1; - } -#endif - *pwc = (wchar_t)*t; if (*t == '\0') diff --git a/newlib/libc/stdlib/wctomb_r.c b/newlib/libc/stdlib/wctomb_r.c index 3081e9370..5ea1e13e4 100644 --- a/newlib/libc/stdlib/wctomb_r.c +++ b/newlib/libc/stdlib/wctomb_r.c @@ -29,11 +29,7 @@ __ascii_wctomb (struct _reent *r, if (s == NULL) return 0; -#ifdef __CYGWIN__ - if ((size_t)wchar >= 0x80) -#else if ((size_t)wchar >= 0x100) -#endif { _REENT_ERRNO(r) = EILSEQ; return -1; |