Update the changelog
[opencv] / apps / Hawk / CVEiCL / EiC / module / stdClib / src / _NETBSD / stat.h
1 #ifndef SYSSTATH_
2 #define SYSSTATH_
3
4 #define _need_time_t
5 #include "sys/stdtypes.h"
6 #undef _need_time_t
7
8 #include "sys/time.h"
9
10 struct stat {
11         dev_t           st_dev;         /* inode's device */
12         ino_t           st_ino;         /* inode's number */
13         mode_t          st_mode;        /* inode protection mode */
14         nlink_t         st_nlink;       /* number of hard links */
15         uid_t           st_uid;         /* user ID of the file's owner */
16         gid_t           st_gid;         /* group ID of the file's group */
17         dev_t           st_rdev;        /* device type */
18         struct timespec st_atimespec;   /* time of last access */
19         struct timespec st_mtimespec;   /* time of last data modification */
20         struct timespec st_ctimespec;   /* time of last file status change */
21 #if !defined(_EiC) || defined(__LP64__)
22         off_t           st_size;        /* file size, in bytes */
23         off_t           st_blocks;      /* blocks allocated for file */
24 #else
25 # if __LITTLE_ENDIAN__
26         off_t           st_size;
27         int             __pad0;
28         int             st_blocks;
29         int             __pad1;
30 # else
31         int             __pad0;
32         off_t           st_size;
33         int             __pad1;
34         int             st_blocks;
35 #endif
36 #endif
37         unsigned        st_blksize;     /* optimal blocksize for I/O */
38         unsigned        st_flags;       /* user defined flags for file */
39         unsigned        st_gen;         /* file generation number */
40 };
41
42 #define st_atime        st_atimespec.tv_sec
43 #define st_atimensec    st_atimespec.tv_nsec
44 #define st_mtime        st_mtimespec.tv_sec
45 #define st_mtimensec    st_mtimespec.tv_nsec
46 #define st_ctime        st_ctimespec.tv_sec
47 #define st_ctimensec    st_ctimespec.tv_nsec
48
49 /* file type */
50 #define S_IFMT          0170000         /* type of file mask */
51 #define S_IFIFO         0010000         /* named pipe (fifo) */
52 #define S_IFCHR         0020000         /* character special */
53 #define S_IFDIR         0040000         /* directory */
54 #define S_IFBLK         0060000         /* block special */
55 #define S_IFREG         0100000         /* regular */
56 #define S_IFLNK         0120000         /* symbolic link */
57
58 /* file mode bits */
59 #define S_IRWXU         0000700         /* RWX mask for owner */
60 #define S_IRUSR         0000400         /* R for owner */
61 #define S_IWUSR         0000200         /* W for owner */
62 #define S_IXUSR         0000100         /* X for owner */
63 #define S_IRWXG         0000070         /* RWX mask for group */
64 #define S_IRGRP         0000040         /* R for group */
65 #define S_IWGRP         0000020         /* W for group */
66 #define S_IXGRP         0000010         /* X for group */
67 #define S_IRWXO         0000007         /* RWX mask for other */
68 #define S_IROTH         0000004         /* R for other */
69 #define S_IWOTH         0000002         /* W for other */
70 #define S_IXOTH         0000001         /* X for other */
71 #define S_ISUID         0004000         /* set user id on execution */
72 #define S_ISGID         0002000         /* set group id on execution */
73 #define S_ISVTX         0001000         /* save sapped text even after use */
74
75
76 #define S_ISFIFO(m)     (((m) & 0170000) == 0010000)    /* fifo */
77 #define S_ISCHR(m)      (((m) & 0170000) == 0020000)    /* char special */
78 #define S_ISDIR(m)      (((m) & 0170000) == 0040000)    /* directory */
79 #define S_ISBLK(m)      (((m) & 0170000) == 0060000)    /* block special */
80 #define S_ISREG(m)      (((m) & 0170000) == 0100000)    /* regular file */
81 #define S_ISLNK(m)      (((m) & 0170000) == 0120000)    /* symbolic link */
82
83 #define S_TYPEISMQ(buf)         (0)
84 #define S_TYPEISSEM(buf)        (0)
85 #define S_TYPEISSHM(buf)        (0)
86
87 int     chmod(const char *, mode_t);
88 int     fchmod(int, mode_t);
89 int     fstat(int, struct stat *);
90 int     lstat(const char *, struct stat *);
91 int     mkdir(const char *, mode_t);
92 int     mkfifo(const char *, mode_t);
93 int     mknod(const char *, mode_t, dev_t);
94 int     stat(const char *, struct stat *);
95 mode_t  umask(mode_t);
96
97
98 #endif