headers: wchar.h: include sys/stat.h instead of declaring things itself

This follows UCRT headers.

Also removed _WSTAT_DEFINED. _INO_T_DEFINED and _DEV_T_DEFINED are kept
because UCRT also defines them.

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/sys/stat.h b/mingw-w64-headers/crt/sys/stat.h
index 2255900..c461be5 100644
--- a/mingw-w64-headers/crt/sys/stat.h
+++ b/mingw-w64-headers/crt/sys/stat.h
@@ -36,13 +36,10 @@
   _CRTIMP int __cdecl _stat32i64(const char *_Name,struct _stat32i64 *_Stat);
   _CRTIMP int __cdecl _stat64i32(const char *_Name,struct _stat64i32 *_Stat);
 
-#ifndef _WSTAT_DEFINED
-#define _WSTAT_DEFINED
   _CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
   _CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
   _CRTIMP int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
   _CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
-#endif
 
 #ifndef	NO_OLDNAMES
 #define	_S_IFBLK	0x6000	/* Block: Is this ever set under w32? */
diff --git a/mingw-w64-headers/crt/wchar.h b/mingw-w64-headers/crt/wchar.h
index 8e8424f..d5b88bc 100644
--- a/mingw-w64-headers/crt/wchar.h
+++ b/mingw-w64-headers/crt/wchar.h
@@ -16,6 +16,7 @@
 #include <corecrt_wstdlib.h>
 #include <corecrt_wstring.h>
 #include <corecrt_wtime.h>
+#include <sys/stat.h>
 #include <_mingw_locale.h>
 
 _CRT_BEGIN_C_HEADER
@@ -25,36 +26,6 @@
 #define WCHAR_MAX 0xffffU
 #endif
 
-#if !defined(_POSIX_) || defined(__GNUC__)
-#ifndef _INO_T_DEFINED
-#define _INO_T_DEFINED
-  typedef unsigned short _ino_t;
-#ifndef	NO_OLDNAMES
-  typedef unsigned short ino_t;
-#endif
-#endif
-
-#ifndef _DEV_T_DEFINED
-#define _DEV_T_DEFINED
-  typedef unsigned int _dev_t;
-#ifndef	NO_OLDNAMES
-  typedef unsigned int dev_t;
-#endif
-#endif
-
-#include <_mingw_off_t.h>
-#include <_mingw_stat64.h>
-
-#ifndef _WSTAT_DEFINED
-#define _WSTAT_DEFINED
-
-  _CRTIMP int __cdecl _wstat32(const wchar_t *_Name,struct _stat32 *_Stat);
-  _CRTIMP int __cdecl _wstat32i64(const wchar_t *_Name,struct _stat32i64 *_Stat);
-  _CRTIMP int __cdecl _wstat64i32(const wchar_t *_Name,struct _stat64i32 *_Stat);
-  _CRTIMP int __cdecl _wstat64(const wchar_t *_Name,struct _stat64 *_Stat);
-#endif
-#endif
-
 #if defined(_UCRT) || defined(__LARGE_MBSTATE_T)
   typedef struct _Mbstatet {
     unsigned long _Wchar;