headers: crt: define mbstate_t in corecrt.h This follows UCRT headers. Signed-off-by: Zhongteng Gui <dragon-archer@outlook.com> Signed-off-by: LIU Hao <lh_mouse@126.com>
diff --git a/mingw-w64-headers/crt/corecrt.h b/mingw-w64-headers/crt/corecrt.h index fd9aecb..257108d 100644 --- a/mingw-w64-headers/crt/corecrt.h +++ b/mingw-w64-headers/crt/corecrt.h
@@ -141,6 +141,16 @@ #endif #endif /* _TIME_T_DEFINED */ +#if defined(_UCRT) || defined(__LARGE_MBSTATE_T) + typedef struct _Mbstatet { + unsigned long _Wchar; + unsigned short _Byte, _State; + } _Mbstatet; + typedef _Mbstatet mbstate_t; +#else + typedef int mbstate_t; +#endif + #ifndef _CRT_SECURE_CPP_NOTHROW #define _CRT_SECURE_CPP_NOTHROW throw() #endif
diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h index d5b88bc..a747e9c 100644 --- a/mingw-w64-headers/crt/wchar.h +++ b/mingw-w64-headers/crt/wchar.h
@@ -26,15 +26,6 @@ #define WCHAR_MAX 0xffffU #endif -#if defined(_UCRT) || defined(__LARGE_MBSTATE_T) - typedef struct _Mbstatet { - unsigned long _Wchar; - unsigned short _Byte, _State; - } _Mbstatet; - typedef _Mbstatet mbstate_t; -#else - typedef int mbstate_t; -#endif typedef wchar_t _Wint_t; _CRTIMP wint_t __cdecl btowc(int);
diff --git a/mingw-w64-headers/crt/yvals.h b/mingw-w64-headers/crt/yvals.h index 4ce9d09..4eed842 100644 --- a/mingw-w64-headers/crt/yvals.h +++ b/mingw-w64-headers/crt/yvals.h
@@ -255,10 +255,6 @@ _C_STD_BEGIN _CRTIMP void __cdecl _Atexit(void (__cdecl *)(void)); -#if !defined(_UCRT) && !defined(__LARGE_MBSTATE_T) -typedef int _Mbstatet; -#endif - #define _ATEXIT_T void #define _Mbstinit(x) mbstate_t x = {0} _C_STD_END