blob: d81758a234701318108a74f5a0e07184d7a83ba7 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _UAPI_LINUX_STAT_H
20#define _UAPI_LINUX_STAT_H
21#if !defined(__GLIBC__) || __GLIBC__ < 2
22#define S_IFMT 00170000
Ben Cheng655a7c02013-10-16 16:09:24 -070023#define S_IFSOCK 0140000
24#define S_IFLNK 0120000
25#define S_IFREG 0100000
26#define S_IFBLK 0060000
Ben Cheng655a7c02013-10-16 16:09:24 -070027#define S_IFDIR 0040000
28#define S_IFCHR 0020000
29#define S_IFIFO 0010000
30#define S_ISUID 0004000
Ben Cheng655a7c02013-10-16 16:09:24 -070031#define S_ISGID 0002000
32#define S_ISVTX 0001000
33#define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
34#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
Ben Cheng655a7c02013-10-16 16:09:24 -070035#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
36#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
37#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
38#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
Ben Cheng655a7c02013-10-16 16:09:24 -070039#define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
40#define S_IRWXU 00700
41#define S_IRUSR 00400
42#define S_IWUSR 00200
Ben Cheng655a7c02013-10-16 16:09:24 -070043#define S_IXUSR 00100
44#define S_IRWXG 00070
45#define S_IRGRP 00040
46#define S_IWGRP 00020
Ben Cheng655a7c02013-10-16 16:09:24 -070047#define S_IXGRP 00010
48#define S_IRWXO 00007
49#define S_IROTH 00004
50#define S_IWOTH 00002
Ben Cheng655a7c02013-10-16 16:09:24 -070051#define S_IXOTH 00001
52#endif
53#endif