headers: corecrt.h: Don't define mbstate_t for Cygwin. This fixes a regression that was caused by 8c4baed92d4dee4fe1874af860a61aa5c945b6f5. Cygwin has its own `mbstate_t` which is different from the Windows one. Signed-off-by: Zhongteng Gui <dragon-archer@outlook.com> Reference: https://sourceforge.net/p/mingw-w64/mailman/message/59391723/ 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 c3f3a82..e0f0601 100644 --- a/mingw-w64-headers/crt/corecrt.h +++ b/mingw-w64-headers/crt/corecrt.h
@@ -141,6 +141,7 @@ #endif #endif /* _TIME_T_DEFINED */ +#ifndef __CYGWIN__ /* Cygwin defines mbstate_t themselves */ #if defined(_UCRT) || defined(__LARGE_MBSTATE_T) typedef struct _Mbstatet { unsigned long _Wchar; @@ -150,6 +151,7 @@ #else typedef int mbstate_t; #endif +#endif #ifndef _CRT_SECURE_CPP_NOTHROW #define _CRT_SECURE_CPP_NOTHROW throw()