30#ifndef ZEPHYR_POSIX_SYS_STAT_H_
31#define ZEPHYR_POSIX_SYS_STAT_H_
52#include <cygwin/stat.h>
64#if defined(__linux) && defined(__x86_64__)
68#if defined(__linux) && !defined(__x86_64__)
69 unsigned short int __pad2;
78#define st_atime st_atim.tv_sec
79#define st_mtime st_mtim.tv_sec
80#define st_ctime st_ctim.tv_sec
81#if defined(__linux) && defined(__x86_64__)
93#if defined(__svr4__) && !defined(__PPC__) && !defined(__sun__)
103#if !defined(__rtems__)
111#if !(defined(__svr4__) && !defined(__PPC__) && !defined(__sun__))
112#define st_atime st_atim.tv_sec
113#define st_ctime st_ctim.tv_sec
114#define st_mtime st_mtim.tv_sec
120#define _IFDIR 0040000
121#define _IFCHR 0020000
122#define _IFBLK 0060000
123#define _IFREG 0100000
124#define _IFLNK 0120000
125#define _IFSOCK 0140000
126#define _IFIFO 0010000
128#define S_BLKSIZE 1024
130#define S_ISUID 0004000
131#define S_ISGID 0002000
132#define S_ISVTX 0001000
134#define S_IREAD 0000400
135#define S_IWRITE 0000200
136#define S_IEXEC 0000100
137#define S_ENFMT 0002000
141#define S_IFDIR _IFDIR
142#define S_IFCHR _IFCHR
143#define S_IFBLK _IFBLK
144#define S_IFREG _IFREG
145#define S_IFLNK _IFLNK
146#define S_IFSOCK _IFSOCK
147#define S_IFIFO _IFIFO
155#define _S_IFDIR _IFDIR
156#define _S_IFCHR _IFCHR
157#define _S_IFIFO _IFIFO
158#define _S_IFREG _IFREG
159#define _S_IREAD 0000400
160#define _S_IWRITE 0000200
161#define _S_IEXEC 0000100
164#define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
165#define S_IRUSR 0000400
166#define S_IWUSR 0000200
167#define S_IXUSR 0000100
168#define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
169#define S_IRGRP 0000040
170#define S_IWGRP 0000020
171#define S_IXGRP 0000010
172#define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
173#define S_IROTH 0000004
174#define S_IWOTH 0000002
175#define S_IXOTH 0000001
178#define ACCESSPERMS (S_IRWXU | S_IRWXG | S_IRWXO)
179#define ALLPERMS (S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO)
180#define DEFFILEMODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
183#define S_ISBLK(m) (((m)&_IFMT) == _IFBLK)
184#define S_ISCHR(m) (((m)&_IFMT) == _IFCHR)
185#define S_ISDIR(m) (((m)&_IFMT) == _IFDIR)
186#define S_ISFIFO(m) (((m)&_IFMT) == _IFIFO)
187#define S_ISREG(m) (((m)&_IFMT) == _IFREG)
188#define S_ISLNK(m) (((m)&_IFMT) == _IFLNK)
189#define S_ISSOCK(m) (((m)&_IFMT) == _IFSOCK)
191#if defined(__CYGWIN__) || defined(__rtems__)
194#define UTIME_OMIT -1L
202int stat(
const char *__restrict __path,
struct stat *__restrict __sbuf);
205#if defined(__SPU__) || defined(__rtems__) || defined(__CYGWIN__) && !defined(__INSIDE_CYGWIN__)
206int lstat(
const char *__restrict __path,
struct stat *__restrict __buf);
207int mknod(
const char *__path,
mode_t __mode,
dev_t __dev);
210#if __ATFILE_VISIBLE && !defined(__INSIDE_CYGWIN__)
211int fchmodat(
int __fd,
const char *__path,
mode_t __mode,
int __flag);
212int fstatat(
int __fd,
const char *__restrict __path,
struct stat *__restrict __buf,
int __flag);
213int mkdirat(
int __fd,
const char *__path,
mode_t __mode);
214int mkfifoat(
int __fd,
const char *__path,
mode_t __mode);
215int mknodat(
int __fd,
const char *__path,
mode_t __mode,
dev_t __dev);
216int utimensat(
int __fd,
const char *__path,
const struct timespec __times[2],
int __flag);
218#if __POSIX_VISIBLE >= 200809 && !defined(__INSIDE_CYGWIN__)
219int futimens(
int __fd,
const struct timespec __times[2]);
227int _fstat(
int __fd,
struct stat *__sbuf);
228int _stat(
const char *__restrict __path,
struct stat *__restrict __sbuf);
229int _mkdir(
const char *_path,
mode_t __mode);
230#ifdef __LARGE64_FILES
232int _stat64(
const char *__restrict __path,
struct stat64 *__restrict __sbuf);
233int _fstat64(
int __fd,
struct stat64 *__sbuf);
_TIME_T_ time_t
Definition _timespec.h:14
__INTPTR_TYPE__ off_t
Definition types.h:36
unsigned int mode_t
Definition types.h:14
int dev_t
Definition posix_types.h:37
unsigned short gid_t
Definition posix_types.h:61
unsigned long blksize_t
Definition posix_types.h:67
unsigned short uid_t
Definition posix_types.h:55
int ino_t
Definition posix_types.h:43
unsigned short nlink_t
Definition posix_types.h:49
unsigned long blkcnt_t
Definition posix_types.h:73
int fstat(int __fd, struct stat *__sbuf)
#define st_ctime
Definition stat.h:113
#define st_atime
Definition stat.h:112
int fchmod(int __fd, mode_t __mode)
mode_t umask(mode_t __mask)
int chmod(const char *__path, mode_t __mode)
int mkfifo(const char *__path, mode_t __mode)
#define st_mtime
Definition stat.h:114
int mkdir(const char *_path, mode_t __mode)
__UINT64_TYPE__ uint64_t
Definition stdint.h:91
off_t st_size
Definition stat.h:71
nlink_t st_nlink
Definition stat.h:61
long st_spare4[2]
Definition stat.h:104
blksize_t st_blksize
Definition stat.h:101
blkcnt_t st_blocks
Definition stat.h:102
uid_t st_uid
Definition stat.h:62
mode_t st_mode
Definition stat.h:60
struct timespec st_mtim
Definition stat.h:99
struct timespec st_atim
Definition stat.h:98
struct timespec st_ctim
Definition stat.h:100
ino_t st_ino
Definition stat.h:59
dev_t st_rdev
Definition stat.h:67
gid_t st_gid
Definition stat.h:63
dev_t st_dev
Definition stat.h:58
Definition _timespec.h:22