Mercurial > emacs
annotate nt/inc/sys/stat.h @ 94781:9a85583ee23c
Regenerate.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Fri, 09 May 2008 04:24:27 +0000 |
parents | eb51ce38e226 |
children | a9cdaa557fee |
rev | line source |
---|---|
94010
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
1 /* sys/stat.h supplied with MSVCRT uses too narrow data types for |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
2 inode and user/group id, so we replace them with our own. |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
3 |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
4 Copyright (C) 2008 Free Software Foundation, Inc. |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
5 |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
6 This file is part of GNU Emacs. |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
7 |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
8 GNU Emacs is free software; you can redistribute it and/or modify |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
9 it under the terms of the GNU General Public License as published by |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
10 the Free Software Foundation; either version 3, or (at your option) |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
11 any later version. |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
12 |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
13 GNU Emacs is distributed in the hope that it will be useful, |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
14 but WITHOUT ANY WARRANTY; without even the implied warranty of |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
16 GNU General Public License for more details. |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
17 |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
18 You should have received a copy of the GNU General Public License |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
19 along with GNU Emacs; see the file COPYING. If not, write to |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
20 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
21 Boston, MA 02110-1301, USA. */ |
93691 | 22 |
23 #ifndef INC_SYS_STAT_H_ | |
24 #define INC_SYS_STAT_H_ | |
25 | |
26 #ifdef __MINGW32__ | |
27 # include <_mingw.h> | |
94010
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
28 #endif |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
29 |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
30 /* Only MinGW 3.13 and later has __MINGW_NOTHROW. */ |
eb51ce38e226
(__MINGW_NOTHROW): If not defined, define to nothing.
Eli Zaretskii <eliz@gnu.org>
parents:
93729
diff
changeset
|
31 #ifndef __MINGW_NOTHROW |
93691 | 32 # define __MINGW_NOTHROW |
33 #endif | |
34 | |
35 #include <sys/types.h> | |
36 #include <time.h> | |
37 | |
38 #define S_IFMT 0xF000 | |
39 | |
40 #define S_IFREG 0x8000 | |
41 #define S_IFDIR 0x4000 | |
42 #define S_IFBLK 0x3000 | |
43 #define S_IFCHR 0x2000 | |
44 #define S_IFIFO 0x1000 | |
45 | |
46 #define S_IREAD 0x0100 | |
47 #define S_IWRITE 0x0080 | |
48 #define S_IEXEC 0x0040 | |
49 | |
50 #define S_IRUSR S_IREAD | |
51 #define S_IWUSR S_IWRITE | |
52 #define S_IXUSR S_IEXEC | |
53 #define S_IRWXU (S_IREAD | S_IWRITE | S_IEXEC) | |
54 | |
55 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) | |
56 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) | |
57 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) | |
58 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) | |
59 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) | |
60 | |
61 struct stat { | |
62 dev_t st_dev; | |
63 unsigned __int64 st_ino; /* ino_t in sys/types.h is too narrow */ | |
64 unsigned short st_mode; | |
65 short st_nlink; | |
66 int st_uid; | |
67 int st_gid; | |
68 dev_t st_rdev; | |
69 off_t st_size; | |
70 time_t st_atime; | |
71 time_t st_mtime; | |
72 time_t st_ctime; | |
73 }; | |
74 | |
75 _CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*); | |
76 _CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int); | |
77 _CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*); | |
78 | |
79 #endif /* INC_SYS_STAT_H_ */ | |
93729 | 80 |
81 /* arch-tag: 17d8fc06-f2e5-4d10-a01e-af819918fe42 | |
82 (do not change this comment) */ |