Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdlib/wctomb_r.c')
-rw-r--r--newlib/libc/stdlib/wctomb_r.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/newlib/libc/stdlib/wctomb_r.c b/newlib/libc/stdlib/wctomb_r.c
index 2c462ba63..d1ee4978d 100644
--- a/newlib/libc/stdlib/wctomb_r.c
+++ b/newlib/libc/stdlib/wctomb_r.c
@@ -40,7 +40,11 @@ _DEFUN (__ascii_wctomb, (r, s, wchar, charset, state),
if (s == NULL)
return 0;
+#ifdef __CYGWIN__
+ if ((size_t)wchar >= 0x80)
+#else
if ((size_t)wchar >= 0x100)
+#endif
{
r->_errno = EILSEQ;
return -1;