* src/xdisp.c (handle_invisible_prop): Fix ellipses at overlay string ends.
[emacs.git] / nt / inc / sys / stat.h
blobb673b80a0e3cecdb39a660ea05b52adbb3c9ea66
1 /* sys/stat.h supplied with MSVCRT uses too narrow data types for
2 inode and user/group id, so we replace them with our own.
4 Copyright (C) 2008-2012 Free Software Foundation, Inc.
6 This file is part of GNU Emacs.
8 GNU Emacs is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 GNU Emacs is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
21 #ifndef INC_SYS_STAT_H_
22 #define INC_SYS_STAT_H_
24 #ifdef __MINGW32__
25 # include <_mingw.h>
26 #endif
28 /* Only MinGW 3.13 and later has __MINGW_NOTHROW. */
29 #ifndef __MINGW_NOTHROW
30 # define __MINGW_NOTHROW
31 #endif
33 #include <sys/types.h>
34 #include <time.h>
36 #define S_IFMT 0xF800
38 #define S_IFREG 0x8000
39 #define S_IFDIR 0x4000
40 #define S_IFBLK 0x3000
41 #define S_IFCHR 0x2000
42 #define S_IFIFO 0x1000
43 #define S_IFLNK 0x0800
45 #define S_IREAD 0x0100
46 #define S_IWRITE 0x0080
47 #define S_IEXEC 0x0040
49 #define S_IRUSR S_IREAD
50 #define S_IWUSR S_IWRITE
51 #define S_IXUSR S_IEXEC
52 #define S_IRWXU (S_IREAD | S_IWRITE | S_IEXEC)
54 #define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
55 #define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
56 #define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
57 #define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
58 #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
59 #define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
61 /* These don't exist on Windows, but lib/filemode.c wants them. */
62 #define S_ISUID 0
63 #define S_ISGID 0
64 #define S_ISVTX 0
65 #define S_IRGRP (S_IRUSR >> 3)
66 #define S_IROTH (S_IRUSR >> 6)
67 #define S_IWGRP (S_IWUSR >> 3)
68 #define S_IWOTH (S_IWUSR >> 6)
69 #define S_IXGRP (S_IXUSR >> 3)
70 #define S_IXOTH (S_IXUSR >> 6)
72 #define S_ISSOCK(m) 0
73 #define S_ISCTG(p) 0
74 #define S_ISDOOR(m) 0
75 #define S_ISMPB(m) 0
76 #define S_ISMPC(m) 0
77 #define S_ISNWK(m) 0
78 #define S_ISPORT(m) 0
79 #define S_ISWHT(m) 0
80 #define S_TYPEISMQ(p) 0
81 #define S_TYPEISSEM(p) 0
82 #define S_TYPEISSHM(p) 0
83 #define S_TYPEISTMO(p) 0
85 struct stat {
86 unsigned __int64 st_ino; /* ino_t in sys/types.h is too narrow */
87 dev_t st_dev;
88 unsigned short st_mode;
89 short st_nlink;
90 unsigned st_uid; /* Vista's TrustedInstaller has a very large RID */
91 unsigned st_gid;
92 unsigned __int64 st_size;
93 dev_t st_rdev;
94 time_t st_atime;
95 time_t st_mtime;
96 time_t st_ctime;
97 char st_uname[260];
98 char st_gname[260];
101 /* Prevent redefinition by other headers, e.g. wchar.h. */
102 #define _STAT_DEFINED
104 _CRTIMP int __cdecl __MINGW_NOTHROW fstat (int, struct stat*);
105 _CRTIMP int __cdecl __MINGW_NOTHROW chmod (const char*, int);
106 _CRTIMP int __cdecl __MINGW_NOTHROW stat (const char*, struct stat*);
107 _CRTIMP int __cdecl __MINGW_NOTHROW lstat (const char*, struct stat*);
109 #endif /* INC_SYS_STAT_H_ */