123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207 |
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- #endif
- #define _STAT_VER_KERNEL 0
- #if __WORDSIZE == 32
- # define _STAT_VER_SVR4 2
- # define _STAT_VER_LINUX 3
- # define _MKNOD_VER_LINUX 1
- # define _MKNOD_VER_SVR4 2
- # define _MKNOD_VER _MKNOD_VER_LINUX
- #else
- # define _STAT_VER_LINUX 1
- # define _MKNOD_VER_LINUX 0
- #endif
- #define _STAT_VER _STAT_VER_LINUX
- struct stat
- {
- __dev_t st_dev;
- #if __WORDSIZE == 32
- unsigned short int __pad1;
- #endif
- #if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64
- __ino_t st_ino;
- #else
- __ino_t __st_ino;
- #endif
- #if __WORDSIZE == 32
- __mode_t st_mode;
- __nlink_t st_nlink;
- #else
- __nlink_t st_nlink;
- __mode_t st_mode;
- #endif
- __uid_t st_uid;
- __gid_t st_gid;
- #if __WORDSIZE == 64
- int __pad0;
- #endif
- __dev_t st_rdev;
- #if __WORDSIZE == 32
- unsigned short int __pad2;
- #endif
- #if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64
- __off_t st_size;
- #else
- __off64_t st_size;
- #endif
- __blksize_t st_blksize;
- #if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64
- __blkcnt_t st_blocks;
- #else
- __blkcnt64_t st_blocks;
- #endif
- #if defined(__USE_MISC) || defined(__USE_XOPEN2K8)
-
- struct timespec st_atim;
- struct timespec st_mtim;
- struct timespec st_ctim;
- # define st_atime st_atim.tv_sec
- # define st_mtime st_mtim.tv_sec
- # define st_ctime st_ctim.tv_sec
- #else
- __time_t st_atime;
- unsigned long int st_atimensec;
- __time_t st_mtime;
- unsigned long int st_mtimensec;
- __time_t st_ctime;
- unsigned long int st_ctimensec;
- #endif
- #if __WORDSIZE == 64
- long int __uclibc_unused[3];
- #else
- # ifndef __USE_FILE_OFFSET64
- unsigned long int __uclibc_unused4;
- unsigned long int __uclibc_unused5;
- # else
- __ino64_t st_ino;
- # endif
- #endif
- };
- #ifdef __USE_LARGEFILE64
- struct stat64
- {
- __dev_t st_dev;
- #if __WORDSIZE == 64
- __ino64_t st_ino;
- __nlink_t st_nlink;
- __mode_t st_mode;
- #else
- unsigned int __pad1;
- __ino_t __st_ino;
- __mode_t st_mode;
- __nlink_t st_nlink;
- #endif
- __uid_t st_uid;
- __gid_t st_gid;
- #if __WORDSIZE == 64
- int __pad0;
- __dev_t st_rdev;
- __off_t st_size;
- #else
- __dev_t st_rdev;
- unsigned int __pad2;
- __off64_t st_size;
- #endif
- __blksize_t st_blksize;
- __blkcnt64_t st_blocks;
- #if defined(__USE_MISC) || defined(__USE_XOPEN2K8)
-
- struct timespec st_atim;
- struct timespec st_mtim;
- struct timespec st_ctim;
- # define st_atime st_atim.tv_sec
- # define st_mtime st_mtim.tv_sec
- # define st_ctime st_ctim.tv_sec
- #else
- __time_t st_atime;
- unsigned long int st_atimensec;
- __time_t st_mtime;
- unsigned long int st_mtimensec;
- __time_t st_ctime;
- unsigned long int st_ctimensec;
- #endif
- #if __WORDSIZE == 64
- long int __uclibc_unused[3];
- #else
- __ino64_t st_ino;
- #endif
- };
- #endif
- #define _STATBUF_ST_BLKSIZE
- #define _STATBUF_ST_RDEV
- #define _STATBUF_ST_NSEC
- #define __S_IFMT 0170000
- #define __S_IFDIR 0040000
- #define __S_IFCHR 0020000
- #define __S_IFBLK 0060000
- #define __S_IFREG 0100000
- #define __S_IFIFO 0010000
- #define __S_IFLNK 0120000
- #define __S_IFSOCK 0140000
- #define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
- #define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
- #define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
- #define __S_ISUID 04000
- #define __S_ISGID 02000
- #define __S_ISVTX 01000
- #define __S_IREAD 0400
- #define __S_IWRITE 0200
- #define __S_IEXEC 0100
- #ifdef __USE_ATFILE
- # define UTIME_NOW ((1l << 30) - 1l)
- # define UTIME_OMIT ((1l << 30) - 2l)
- #endif
|