Fixed some issues found by winapi_check.
[wine] / include / msvcrt / sys / stat.h
1 /*
2  * _stat() definitions
3  *
4  * Derived from the mingw header written by Colin Peters.
5  * Modified for Wine use by Jon Griffiths and Francois Gouget.
6  * This file is in the public domain.
7  */
8 #ifndef __WINE_SYS_STAT_H
9 #define __WINE_SYS_STAT_H
10
11 #include "msvcrt/sys/types.h"
12
13
14 #define _S_IEXEC  0x0040
15 #define _S_IWRITE 0x0080
16 #define _S_IREAD  0x0100
17 #define _S_IFIFO  0x1000
18 #define _S_IFCHR  0x2000
19 #define _S_IFDIR  0x4000
20 #define _S_IFREG  0x8000
21 #define _S_IFMT   0xF000
22
23
24 struct _stat {
25   _dev_t         st_dev;
26   _ino_t         st_ino;
27   unsigned short st_mode;
28   short          st_nlink;
29   short          st_uid;
30   short          st_gid;
31   _dev_t         st_rdev;
32   _off_t         st_size;
33   MSVCRT(time_t) st_atime;
34   MSVCRT(time_t) st_mtime;
35   MSVCRT(time_t) st_ctime;
36 };
37
38 struct _stati64 {
39   _dev_t         st_dev;
40   _ino_t         st_ino;
41   unsigned short st_mode;
42   short          st_nlink;
43   short          st_uid;
44   short          st_gid;
45   _dev_t         st_rdev;
46   __int64        st_size;
47   MSVCRT(time_t) st_atime;
48   MSVCRT(time_t) st_mtime;
49   MSVCRT(time_t) st_ctime;
50 };
51
52
53 #ifdef __cplusplus
54 extern "C" {
55 #endif
56
57 int _fstat(int,struct _stat*);
58 int _fstati64(int,struct _stati64*);
59 int _stat(const char*,struct _stat*);
60 int _stati64(const char*,struct _stati64*);
61
62 int _wstat(const WCHAR*,struct _stat*);
63 int _wstati64(const wchar_t*,struct _stati64*);
64
65 #ifdef __cplusplus
66 }
67 #endif
68
69
70 #ifndef USE_MSVCRT_PREFIX
71 #define S_IFMT   _S_IFMT
72 #define S_IFDIR  _S_IFDIR
73 #define S_IFCHR  _S_IFCHR
74 #define S_IFREG  _S_IFREG
75 #define S_IREAD  _S_IREAD
76 #define S_IWRITE _S_IWRITE
77 #define S_IEXEC  _S_IEXEC
78
79 #define fstat _fstat
80 #define stat _stat
81 #endif /* USE_MSVCRT_PREFIX */
82
83 #endif /* __WINE_SYS_STAT_H */