diff --git a/include/sys/types.h b/include/sys/types.h index 510f512b..03dd1041 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -138,6 +138,15 @@ typedef long ssize_t; typedef unsigned uid_t; #endif +#ifndef __WCHAR_T +#define __WCHAR_T +#ifndef __MES_WCHAR_T +#define __MES_WCHAR_T +#undef wchar_t +typedef int wchar_t; +#endif +#endif + #endif // ! SYSTEM_LIBC #endif // __MES_SYS_TYPES_H diff --git a/lib/stdlib/mbstowcs.c b/lib/stdlib/mbstowcs.c index a948544d..0820c1ef 100644 --- a/lib/stdlib/mbstowcs.c +++ b/lib/stdlib/mbstowcs.c @@ -22,9 +22,6 @@ #include #include -#if !__MESC__ -typedef char wchar_t[]; - size_t mbstowcs (wchar_t * wstring, char const *string, size_t size) { @@ -35,4 +32,3 @@ mbstowcs (wchar_t * wstring, char const *string, size_t size) strcpy (wstring, string); return strlen (string); } -#endif