Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(610)

Side by Side Diff: fusl/include/sys/stat.h

Issue 1714623002: [fusl] clang-format fusl (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: headers too Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #ifndef»_SYS_STAT_H 1 #ifndef _SYS_STAT_H
2 #define»_SYS_STAT_H 2 #define _SYS_STAT_H
3 #ifdef __cplusplus 3 #ifdef __cplusplus
4 extern "C" { 4 extern "C" {
5 #endif 5 #endif
6 6
7 #include <features.h> 7 #include <features.h>
8 8
9 #define __NEED_dev_t 9 #define __NEED_dev_t
10 #define __NEED_ino_t 10 #define __NEED_ino_t
11 #define __NEED_mode_t 11 #define __NEED_mode_t
12 #define __NEED_nlink_t 12 #define __NEED_nlink_t
13 #define __NEED_uid_t 13 #define __NEED_uid_t
14 #define __NEED_gid_t 14 #define __NEED_gid_t
15 #define __NEED_off_t 15 #define __NEED_off_t
16 #define __NEED_time_t 16 #define __NEED_time_t
17 #define __NEED_blksize_t 17 #define __NEED_blksize_t
18 #define __NEED_blkcnt_t 18 #define __NEED_blkcnt_t
19 #define __NEED_struct_timespec 19 #define __NEED_struct_timespec
20 20
21 #include <bits/alltypes.h> 21 #include <bits/alltypes.h>
22 22
23 #include <bits/stat.h> 23 #include <bits/stat.h>
24 24
25 #define st_atime st_atim.tv_sec 25 #define st_atime st_atim.tv_sec
26 #define st_mtime st_mtim.tv_sec 26 #define st_mtime st_mtim.tv_sec
27 #define st_ctime st_ctim.tv_sec 27 #define st_ctime st_ctim.tv_sec
28 28
29 #define S_IFMT 0170000 29 #define S_IFMT 0170000
30 30
31 #define S_IFDIR 0040000 31 #define S_IFDIR 0040000
32 #define S_IFCHR 0020000 32 #define S_IFCHR 0020000
33 #define S_IFBLK 0060000 33 #define S_IFBLK 0060000
34 #define S_IFREG 0100000 34 #define S_IFREG 0100000
35 #define S_IFIFO 0010000 35 #define S_IFIFO 0010000
36 #define S_IFLNK 0120000 36 #define S_IFLNK 0120000
37 #define S_IFSOCK 0140000 37 #define S_IFSOCK 0140000
38 38
39 #define S_TYPEISMQ(buf) 0 39 #define S_TYPEISMQ(buf) 0
40 #define S_TYPEISSEM(buf) 0 40 #define S_TYPEISSEM(buf) 0
41 #define S_TYPEISSHM(buf) 0 41 #define S_TYPEISSHM(buf) 0
42 #define S_TYPEISTMO(buf) 0 42 #define S_TYPEISTMO(buf) 0
43 43
44 #define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) 44 #define S_ISDIR(mode) (((mode)&S_IFMT) == S_IFDIR)
45 #define S_ISCHR(mode) (((mode) & S_IFMT) == S_IFCHR) 45 #define S_ISCHR(mode) (((mode)&S_IFMT) == S_IFCHR)
46 #define S_ISBLK(mode) (((mode) & S_IFMT) == S_IFBLK) 46 #define S_ISBLK(mode) (((mode)&S_IFMT) == S_IFBLK)
47 #define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) 47 #define S_ISREG(mode) (((mode)&S_IFMT) == S_IFREG)
48 #define S_ISFIFO(mode) (((mode) & S_IFMT) == S_IFIFO) 48 #define S_ISFIFO(mode) (((mode)&S_IFMT) == S_IFIFO)
49 #define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK) 49 #define S_ISLNK(mode) (((mode)&S_IFMT) == S_IFLNK)
50 #define S_ISSOCK(mode) (((mode) & S_IFMT) == S_IFSOCK) 50 #define S_ISSOCK(mode) (((mode)&S_IFMT) == S_IFSOCK)
51 51
52 #ifndef S_IRUSR 52 #ifndef S_IRUSR
53 #define S_ISUID 04000 53 #define S_ISUID 04000
54 #define S_ISGID 02000 54 #define S_ISGID 02000
55 #define S_ISVTX 01000 55 #define S_ISVTX 01000
56 #define S_IRUSR 0400 56 #define S_IRUSR 0400
57 #define S_IWUSR 0200 57 #define S_IWUSR 0200
58 #define S_IXUSR 0100 58 #define S_IXUSR 0100
59 #define S_IRWXU 0700 59 #define S_IRWXU 0700
60 #define S_IRGRP 0040 60 #define S_IRGRP 0040
61 #define S_IWGRP 0020 61 #define S_IWGRP 0020
62 #define S_IXGRP 0010 62 #define S_IXGRP 0010
63 #define S_IRWXG 0070 63 #define S_IRWXG 0070
64 #define S_IROTH 0004 64 #define S_IROTH 0004
65 #define S_IWOTH 0002 65 #define S_IWOTH 0002
66 #define S_IXOTH 0001 66 #define S_IXOTH 0001
67 #define S_IRWXO 0007 67 #define S_IRWXO 0007
68 #endif 68 #endif
69 69
70 #define UTIME_NOW 0x3fffffff 70 #define UTIME_NOW 0x3fffffff
71 #define UTIME_OMIT 0x3ffffffe 71 #define UTIME_OMIT 0x3ffffffe
72 72
73 int stat(const char *__restrict, struct stat *__restrict); 73 int stat(const char* __restrict, struct stat* __restrict);
74 int fstat(int, struct stat *); 74 int fstat(int, struct stat*);
75 int lstat(const char *__restrict, struct stat *__restrict); 75 int lstat(const char* __restrict, struct stat* __restrict);
76 int fstatat(int, const char *__restrict, struct stat *__restrict, int); 76 int fstatat(int, const char* __restrict, struct stat* __restrict, int);
77 int chmod(const char *, mode_t); 77 int chmod(const char*, mode_t);
78 int fchmod(int, mode_t); 78 int fchmod(int, mode_t);
79 int fchmodat(int, const char *, mode_t, int); 79 int fchmodat(int, const char*, mode_t, int);
80 mode_t umask(mode_t); 80 mode_t umask(mode_t);
81 int mkdir(const char *, mode_t); 81 int mkdir(const char*, mode_t);
82 int mknod(const char *, mode_t, dev_t); 82 int mknod(const char*, mode_t, dev_t);
83 int mkfifo(const char *, mode_t); 83 int mkfifo(const char*, mode_t);
84 int mkdirat(int, const char *, mode_t); 84 int mkdirat(int, const char*, mode_t);
85 int mknodat(int, const char *, mode_t, dev_t); 85 int mknodat(int, const char*, mode_t, dev_t);
86 int mkfifoat(int, const char *, mode_t); 86 int mkfifoat(int, const char*, mode_t);
87 87
88 int futimens(int, const struct timespec [2]); 88 int futimens(int, const struct timespec[2]);
89 int utimensat(int, const char *, const struct timespec [2], int); 89 int utimensat(int, const char*, const struct timespec[2], int);
90 90
91 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) 91 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
92 int lchmod(const char *, mode_t); 92 int lchmod(const char*, mode_t);
93 #define S_IREAD S_IRUSR 93 #define S_IREAD S_IRUSR
94 #define S_IWRITE S_IWUSR 94 #define S_IWRITE S_IWUSR
95 #define S_IEXEC S_IXUSR 95 #define S_IEXEC S_IXUSR
96 #endif 96 #endif
97 97
98 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE) 98 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
99 #define stat64 stat 99 #define stat64 stat
100 #define fstat64 fstat 100 #define fstat64 fstat
101 #define lstat64 lstat 101 #define lstat64 lstat
102 #define fstatat64 fstatat 102 #define fstatat64 fstatat
103 #define blkcnt64_t blkcnt_t 103 #define blkcnt64_t blkcnt_t
104 #define fsblkcnt64_t fsblkcnt_t 104 #define fsblkcnt64_t fsblkcnt_t
105 #define fsfilcnt64_t fsfilcnt_t 105 #define fsfilcnt64_t fsfilcnt_t
106 #define ino64_t ino_t 106 #define ino64_t ino_t
107 #define off64_t off_t 107 #define off64_t off_t
108 #endif 108 #endif
109 109
110 #ifdef __cplusplus 110 #ifdef __cplusplus
111 } 111 }
112 #endif 112 #endif
113 #endif 113 #endif
114
115
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698