mescc: Mes C Library: Support GNU Awk: Add wchar_t.

* include/sys/types.h (wchar_t): New typedef.
This commit is contained in:
Jan Nieuwenhuizen 2019-07-21 13:23:49 +02:00
parent fe96cc37df
commit 9573f469f8
No known key found for this signature in database
GPG key ID: F3C1A0D9C1D65273
2 changed files with 9 additions and 4 deletions

View file

@ -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

View file

@ -22,9 +22,6 @@
#include <stdlib.h>
#include <string.h>
#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