#include <msvcrt/wchar.h>
#include <msvcrt/errno.h>
-#include <msvcrt/wchar.h>
+#include <msvcrt/internal/file.h>
#ifndef EILSEQ
#define EILSEQ EINVAL
static const wchar_t encoding_mask[] =
{
- ~0x7ff, ~0xffff, ~0x1fffff, ~0x3ffffff
+ (~0x7ff&WCHAR_MAX), (~0xffff&WCHAR_MAX), (~0x1fffff&WCHAR_MAX), (~0x3ffffff&WCHAR_MAX)
};
static const unsigned char encoding_byte[] =
{
wchar_t wc = *run++;
- if (wc < 0 || wc > 0x7fffffff)
+#if 0
+ if (wc < 0 || wc > WCHAR_MAX)
{
/* This is no correct ISO 10646 character. */
__set_errno (EILSEQ);
return (size_t) -1;
}
+#endif
if (wc == L'\0')
{