stat.h 480 Bytes
Newer Older
jD91mZM2's avatar
jD91mZM2 committed
1
2
3
4
5
6
7
#ifndef _BITS_STAT_H
#define _BITS_STAT_H

#define S_ISDIR(mode) mode & S_IFMT == S_IFDIR
#define S_ISCHR(mode) mode & S_IFMT == S_IFCHR
#define S_ISBLK(mode) mode & S_IFMT == S_IFBLK
#define S_ISREG(mode) mode & S_IFMT == S_IFREG
jD91mZM2's avatar
jD91mZM2 committed
8
#define S_ISFIFO(mode) mode & S_IFMT == S_IFIFO
jD91mZM2's avatar
jD91mZM2 committed
9
#define S_ISLNK(mode) mode & S_IFMT == S_IFLNK
jD91mZM2's avatar
jD91mZM2 committed
10
#define S_ISSOCK(mode) mode & S_IFMT == S_IFSOCK
jD91mZM2's avatar
jD91mZM2 committed
11

jD91mZM2's avatar
jD91mZM2 committed
12
13
#define st_atime st_atim.tv_sec
#define st_mtime st_mtim.tv_sec
jD91mZM2's avatar
jD91mZM2 committed
14
#define st_ctime st_ctim.tv_sec
jD91mZM2's avatar
jD91mZM2 committed
15

jD91mZM2's avatar
jD91mZM2 committed
16
#endif