123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185 |
- #ifndef _SYS_STAT_H
- # error "Never include <bits/stat.h> directly; use <sys/stat.h> instead."
- #endif
- #ifndef _BITS_STAT_H
- #define _BITS_STAT_H
- #define _STAT_VER_KERNEL 0
- #define _STAT_VER_LINUX 0
- #define _STAT_VER _STAT_VER_LINUX
- #define _MKNOD_VER_LINUX 1
- #define _MKNOD_VER_SVR4 2
- #define _MKNOD_VER _MKNOD_VER_LINUX
- struct stat
- {
- __dev_t st_dev;
- #ifndef __USE_FILE_OFFSET64
- unsigned long __pad1;
- __ino_t st_ino;
- #else
- __ino64_t st_ino;
- #endif
- __mode_t st_mode;
- __nlink_t st_nlink;
- __uid_t st_uid;
- __gid_t st_gid;
- __dev_t st_rdev;
- #ifndef __USE_FILE_OFFSET64
- unsigned long __pad2;
- __off_t st_size;
- unsigned long __pad3;
- #else
- __off64_t st_size;
- unsigned long __pad1;
- #endif
- __blksize_t st_blksize;
- #ifndef __USE_FILE_OFFSET64
- unsigned long __pad4;
- __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
- unsigned long int __uclibc_unused1;
- __time_t st_atime;
- unsigned long int __uclibc_unused2;
- __time_t st_mtime;
- unsigned long int __uclibc_unused3;
- __time_t st_ctime;
- #endif
- unsigned long long __uclibc_unused4;
- };
- #ifdef __USE_LARGEFILE64
- struct stat64
- {
- __dev_t st_dev;
- __ino64_t st_ino;
- __mode_t st_mode;
- __nlink_t st_nlink;
- __uid_t st_uid;
- __gid_t st_gid;
- __dev_t st_rdev;
- __off64_t st_size;
- unsigned long __pad1;
- __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
- unsigned long int __uclibc_unused1;
- __time_t st_atime;
- unsigned long int __uclibc_unused2;
- __time_t st_mtime;
- unsigned long int __uclibc_unused3;
- __time_t st_ctime;
- #endif
- unsigned long long __uclibc_unused4;
- };
- #endif
- #define _STATBUF_ST_BLKSIZE
- #define _STATBUF_ST_RDEV
- #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
- #endif
|