Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      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
     23 #define S_IFSOCK 0140000
     24 #define S_IFLNK 0120000
     25 #define S_IFREG 0100000
     26 #define S_IFBLK 0060000
     27 #define S_IFDIR 0040000
     28 #define S_IFCHR 0020000
     29 #define S_IFIFO 0010000
     30 #define S_ISUID 0004000
     31 #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)
     35 #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)
     39 #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
     40 #define S_IRWXU 00700
     41 #define S_IRUSR 00400
     42 #define S_IWUSR 00200
     43 #define S_IXUSR 00100
     44 #define S_IRWXG 00070
     45 #define S_IRGRP 00040
     46 #define S_IWGRP 00020
     47 #define S_IXGRP 00010
     48 #define S_IRWXO 00007
     49 #define S_IROTH 00004
     50 #define S_IWOTH 00002
     51 #define S_IXOTH 00001
     52 #endif
     53 #endif
     54