2 Copyright (C) 2008 Mathias Gottschlag
4 Permission is hereby granted, free of charge, to any person obtaining a copy of
5 this software and associated documentation files (the "Software"), to deal in the
6 Software without restriction, including without limitation the rights to use,
7 copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the
8 Software, and to permit persons to whom the Software is furnished to do so,
9 subject to the following conditions:
11 The above copyright notice and this permission notice shall be included in all
12 copies or substantial portions of the Software.
14 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
15 INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
16 PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
17 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
18 OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
19 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 #ifndef SYS_STAT_H_INCLUDED
23 #define SYS_STAT_H_INCLUDED
25 #include <sys/types.h>
54 #define S_IFSOCK 0x700
56 #define S_ISBLK(m) ((m & S_IFMT) == S_IFBLK)
57 #define S_ISCHR(m) ((m & S_IFMT) == S_IFCHR)
58 #define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
59 #define S_ISFIFO(m) ((m & S_IFMT) == S_IFIFO)
60 #define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
61 #define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK)
92 blksize64_t st_blksize
;
95 int mknod(const char *path
, mode_t mode
, dev_t dev
);
96 int mkdir(const char *path
, mode_t mode
);
98 int chmod(const char *path
, mode_t mode
);
99 int fchmod(int fd
, mode_t mode
);
100 int fstat(int fd
, struct stat
*s
);
101 int lstat(const char *path
, struct stat
*s
);
102 int stat(const char *path
, struct stat
*s
);
103 int fstat64(int fd
, struct stat64
*s
);
104 int stat64(const char *path
, struct stat64
*s
);