Jacek Caban : include: Include sys/stat.h from wchar.h.
Alexandre Julliard
julliard at winehq.org
Thu Feb 20 18:26:13 CST 2020
Module: wine
Branch: master
Commit: 6187ee134607568a02f95c8dd34cdba658b419a5
URL: https://source.winehq.org/git/wine.git/?a=commit;h=6187ee134607568a02f95c8dd34cdba658b419a5
Author: Jacek Caban <jacek at codeweavers.com>
Date: Thu Feb 20 15:50:01 2020 +0100
include: Include sys/stat.h from wchar.h.
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
include/msvcrt/sys/stat.h | 4 --
include/msvcrt/wchar.h | 136 +---------------------------------------------
2 files changed, 1 insertion(+), 139 deletions(-)
diff --git a/include/msvcrt/sys/stat.h b/include/msvcrt/sys/stat.h
index f305984798..15cf823739 100644
--- a/include/msvcrt/sys/stat.h
+++ b/include/msvcrt/sys/stat.h
@@ -167,14 +167,10 @@ int __cdecl _stati64(const char*,struct _stati64*);
int __cdecl _fstat64(int,struct _stat64*);
int __cdecl _stat64(const char*,struct _stat64*);
int __cdecl _umask(int);
-
-#ifndef _WSTAT_DEFINED
-#define _WSTAT_DEFINED
int __cdecl _wstat(const wchar_t*,struct _stat*);
int __cdecl _wstat32(const wchar_t*, struct _stat32*);
int __cdecl _wstati64(const wchar_t*,struct _stati64*);
int __cdecl _wstat64(const wchar_t*,struct _stat64*);
-#endif /* _WSTAT_DEFINED */
#ifdef __cplusplus
}
diff --git a/include/msvcrt/wchar.h b/include/msvcrt/wchar.h
index b93fec9de7..0b7be92174 100644
--- a/include/msvcrt/wchar.h
+++ b/include/msvcrt/wchar.h
@@ -12,6 +12,7 @@
#include <corecrt_wio.h>
#include <corecrt_wtime.h>
#include <string.h>
+#include <sys/stat.h>
#include <pshpack8.h>
@@ -24,135 +25,8 @@ extern "C" {
#define WCHAR_MAX 0xffffU
#endif
-#ifndef DECLSPEC_ALIGN
-# if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS)
-# define DECLSPEC_ALIGN(x) __declspec(align(x))
-# elif defined(__GNUC__)
-# define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
-# else
-# define DECLSPEC_ALIGN(x)
-# endif
-#endif
-
typedef int mbstate_t;
-#ifndef _DEV_T_DEFINED
-typedef unsigned int _dev_t;
-#define _DEV_T_DEFINED
-#endif
-
-#ifndef _INO_T_DEFINED
-typedef unsigned short _ino_t;
-#define _INO_T_DEFINED
-#endif
-
-#ifndef _OFF_T_DEFINED
-typedef int _off_t;
-#define _OFF_T_DEFINED
-#endif
-
-#ifndef _STAT_DEFINED
-#define _STAT_DEFINED
-
-struct _stat {
- _dev_t st_dev;
- _ino_t st_ino;
- unsigned short st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- _off_t st_size;
- time_t st_atime;
- time_t st_mtime;
- time_t st_ctime;
-};
-
-struct stat {
- _dev_t st_dev;
- _ino_t st_ino;
- unsigned short st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- _off_t st_size;
- time_t st_atime;
- time_t st_mtime;
- time_t st_ctime;
-};
-
-struct _stat32 {
- _dev_t st_dev;
- _ino_t st_ino;
- unsigned short st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- _off_t st_size;
- __time32_t st_atime;
- __time32_t st_mtime;
- __time32_t st_ctime;
-};
-
-struct _stat32i64 {
- _dev_t st_dev;
- _ino_t st_ino;
- unsigned short st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- __int64 DECLSPEC_ALIGN(8) st_size;
- time_t st_atime;
- time_t st_mtime;
- time_t st_ctime;
-};
-
-struct _stat64i32 {
- _dev_t st_dev;
- _ino_t st_ino;
- unsigned short st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- _off_t st_size;
- __time64_t st_atime;
- __time64_t st_mtime;
- __time64_t st_ctime;
-};
-
-struct _stati64 {
- _dev_t st_dev;
- _ino_t st_ino;
- unsigned short st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- __int64 DECLSPEC_ALIGN(8) st_size;
- time_t st_atime;
- time_t st_mtime;
- time_t st_ctime;
-};
-
-struct _stat64 {
- _dev_t st_dev;
- _ino_t st_ino;
- unsigned short st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- _dev_t st_rdev;
- __int64 DECLSPEC_ALIGN(8) st_size;
- __time64_t st_atime;
- __time64_t st_mtime;
- __time64_t st_ctime;
-};
-#endif /* _STAT_DEFINED */
-
/* ASCII char classification table - binary compatible */
#define _UPPER 0x0001 /* C1_UPPER */
#define _LOWER 0x0002 /* C1_LOWER */
@@ -221,14 +95,6 @@ int __cdecl _wspawnvpe(int,const wchar_t*,const wchar_t* const *,const wcha
int __cdecl _wsystem(const wchar_t*);
#endif /* _WPROCESS_DEFINED */
-#ifndef _WSTAT_DEFINED
-#define _WSTAT_DEFINED
-int __cdecl _wstat(const wchar_t*,struct _stat*);
-int __cdecl _wstat32(const wchar_t*, struct _stat32*);
-int __cdecl _wstati64(const wchar_t*,struct _stati64*);
-int __cdecl _wstat64(const wchar_t*,struct _stat64*);
-#endif /* _WSTAT_DEFINED */
-
#ifndef _WSTDLIB_DEFINED
#define _WSTDLIB_DEFINED
wchar_t* __cdecl _itow(int,wchar_t*,int);
More information about the wine-cvs
mailing list