cmd: Update Lithuanian translation.
[wine/testsucceed.git] / include / msvcrt / sys / stat.h
blob9362d2d7a555a2e00272d8784a33172f2135874d
1 /*
2 * _stat() definitions
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
11 #include <crtdefs.h>
12 #include <sys/types.h>
14 #include <pshpack8.h>
16 #ifndef _DEV_T_DEFINED
17 typedef unsigned int _dev_t;
18 #define _DEV_T_DEFINED
19 #endif
21 #ifndef _INO_T_DEFINED
22 typedef unsigned short _ino_t;
23 #define _INO_T_DEFINED
24 #endif
26 #ifndef _OFF_T_DEFINED
27 typedef int _off_t;
28 #define _OFF_T_DEFINED
29 #endif
31 #ifndef DECLSPEC_ALIGN
32 # if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS)
33 # define DECLSPEC_ALIGN(x) __declspec(align(x))
34 # elif defined(__GNUC__)
35 # define DECLSPEC_ALIGN(x) __attribute__((aligned(x)))
36 # else
37 # define DECLSPEC_ALIGN(x)
38 # endif
39 #endif
41 #define _S_IEXEC 0x0040
42 #define _S_IWRITE 0x0080
43 #define _S_IREAD 0x0100
44 #define _S_IFIFO 0x1000
45 #define _S_IFCHR 0x2000
46 #define _S_IFDIR 0x4000
47 #define _S_IFREG 0x8000
48 #define _S_IFMT 0xF000
50 /* for FreeBSD */
51 #undef st_atime
52 #undef st_ctime
53 #undef st_mtime
55 #ifndef _STAT_DEFINED
56 #define _STAT_DEFINED
58 struct _stat {
59 _dev_t st_dev;
60 _ino_t st_ino;
61 unsigned short st_mode;
62 short st_nlink;
63 short st_uid;
64 short st_gid;
65 _dev_t st_rdev;
66 _off_t st_size;
67 time_t st_atime;
68 time_t st_mtime;
69 time_t st_ctime;
72 struct stat {
73 _dev_t st_dev;
74 _ino_t st_ino;
75 unsigned short st_mode;
76 short st_nlink;
77 short st_uid;
78 short st_gid;
79 _dev_t st_rdev;
80 _off_t st_size;
81 time_t st_atime;
82 time_t st_mtime;
83 time_t st_ctime;
86 struct _stat32i64 {
87 _dev_t st_dev;
88 _ino_t st_ino;
89 unsigned short st_mode;
90 short st_nlink;
91 short st_uid;
92 short st_gid;
93 _dev_t st_rdev;
94 __int64 DECLSPEC_ALIGN(8) st_size;
95 time_t st_atime;
96 time_t st_mtime;
97 time_t st_ctime;
100 struct _stat64i32 {
101 _dev_t st_dev;
102 _ino_t st_ino;
103 unsigned short st_mode;
104 short st_nlink;
105 short st_uid;
106 short st_gid;
107 _dev_t st_rdev;
108 _off_t st_size;
109 __time64_t st_atime;
110 __time64_t st_mtime;
111 __time64_t st_ctime;
114 struct _stati64 {
115 _dev_t st_dev;
116 _ino_t st_ino;
117 unsigned short st_mode;
118 short st_nlink;
119 short st_uid;
120 short st_gid;
121 _dev_t st_rdev;
122 __int64 DECLSPEC_ALIGN(8) st_size;
123 time_t st_atime;
124 time_t st_mtime;
125 time_t st_ctime;
128 struct _stat64 {
129 _dev_t st_dev;
130 _ino_t st_ino;
131 unsigned short st_mode;
132 short st_nlink;
133 short st_uid;
134 short st_gid;
135 _dev_t st_rdev;
136 __int64 DECLSPEC_ALIGN(8) st_size;
137 __time64_t st_atime;
138 __time64_t st_mtime;
139 __time64_t st_ctime;
141 #endif /* _STAT_DEFINED */
143 #ifdef __cplusplus
144 extern "C" {
145 #endif
147 int __cdecl _fstat(int,struct _stat*);
148 int __cdecl _stat(const char*,struct _stat*);
149 int __cdecl _fstati64(int,struct _stati64*);
150 int __cdecl _stati64(const char*,struct _stati64*);
151 int __cdecl _fstat64(int,struct _stat64*);
152 int __cdecl _stat64(const char*,struct _stat64*);
153 int __cdecl _umask(int);
155 #ifndef _WSTAT_DEFINED
156 #define _WSTAT_DEFINED
157 int __cdecl _wstat(const wchar_t*,struct _stat*);
158 int __cdecl _wstati64(const wchar_t*,struct _stati64*);
159 int __cdecl _wstat64(const wchar_t*,struct _stat64*);
160 #endif /* _WSTAT_DEFINED */
162 #ifdef __cplusplus
164 #endif
167 #define S_IFMT _S_IFMT
168 #define S_IFDIR _S_IFDIR
169 #define S_IFCHR _S_IFCHR
170 #define S_IFREG _S_IFREG
171 #define S_IREAD _S_IREAD
172 #define S_IWRITE _S_IWRITE
173 #define S_IEXEC _S_IEXEC
175 static inline int fstat(int fd, struct stat* ptr) { return _fstat(fd, (struct _stat*)ptr); }
176 static inline int stat(const char* path, struct stat* ptr) { return _stat(path, (struct _stat*)ptr); }
177 #ifndef _UMASK_DEFINED
178 static inline int umask(int fd) { return _umask(fd); }
179 #define _UMASK_DEFINED
180 #endif
182 #include <poppack.h>
184 #endif /* __WINE_SYS_STAT_H */