stdio-common: Add new test for fdopen
[glibc.git] / conform / data / sys / stat.h-data
blob03be4814ecd003ac9fdfd4ef765ebd9eec7873ac
1 #if !defined ISO && !defined ISO99 && !defined ISO11
3 #if !defined POSIX && !defined POSIX2008 && !defined XPG4 && !defined XPG42
4 type blkcnt_t
5 type blksize_t
6 #endif
7 #ifndef POSIX
8 type dev_t
9 type ino_t
10 type mode_t
11 type nlink_t
12 type uid_t
13 type gid_t
14 type off_t
15 type time_t
16 #else
17 # define dev_t __dev_t
18 # define ino_t __ino_t
19 # define mode_t __mode_t
20 # define nlink_t __nlink_t
21 # define uid_t __uid_t
22 # define gid_t __gid_t
23 # define off_t __off_t
24 # define time_t __time_t
25 #endif
27 type {struct stat}
29 // Bug 17786: st_dev has wrong type.
30 // Bug 23084: st_dev has type unsigned long long instead of dev_t (unsigned).
31 xfail[mips-o32-linux|i386-gnu]-element {struct stat} dev_t st_dev
32 element {struct stat} ino_t st_ino
33 element {struct stat} mode_t st_mode
34 element {struct stat} nlink_t st_nlink
35 element {struct stat} uid_t st_uid
36 element {struct stat} gid_t st_gid
37 #if !defined POSIX && !defined POSIX2008
38 // Bug 21278: st_rdev has wrong type.
39 xfail[mips-o32-linux]-element {struct stat} dev_t st_rdev
40 #endif
41 element {struct stat} off_t st_size
42 element {struct stat} time_t st_atime
43 element {struct stat} time_t st_mtime
44 element {struct stat} time_t st_ctime
45 #if defined XOPEN2K8 || defined POSIX2008
46 element {struct stat} {struct timespec} st_atim
47 element {struct stat} {struct timespec} st_mtim
48 element {struct stat} {struct timespec} st_ctim
49 #endif
50 #if !defined XPG4 && !defined POSIX && !defined POSIX2008
51 # ifdef XPG42
52 // The XPG42 use of "long" for these fields is not compatible with the
53 // use of typedefs in future standards to support values outside the
54 // range of "long".
55 xfail-element {struct stat} long st_blksize
56 xfail-element {struct stat} long st_blocks
57 # else
58 element {struct stat} blksize_t st_blksize
59 element {struct stat} blkcnt_t st_blocks
60 # endif
61 #endif
63 # if defined XOPEN2K8 || defined POSIX2008
64 type {struct timespec}
65 element {struct timespec} time_t tv_sec
66 // Bug 16437: tv_nsec has wrong type.
67 xfail[x86_64-x32-linux]-element {struct timespec} long tv_nsec
68 # endif
70 #if !defined POSIX && !defined POSIX2008
71 constant S_IFMT
72 constant S_IFBLK
73 constant S_IFCHR
74 constant S_IFIFO
75 constant S_IFREG
76 constant S_IFDIR
77 # ifndef XPG4
78 constant S_IFLNK
79 constant S_IFSOCK
80 # endif
81 #endif
83 constant S_IRWXU
84 constant S_IRUSR
85 constant S_IWUSR
86 constant S_IXUSR
87 constant S_IRWXG
88 constant S_IRGRP
89 constant S_IWGRP
90 constant S_IXGRP
91 constant S_IRWXO
92 constant S_IROTH
93 constant S_IWOTH
94 constant S_IXOTH
95 constant S_ISUID
96 constant S_ISGID
97 #if !defined XPG4 && !defined POSIX && !defined POSIX2008
98 constant S_ISVTX
99 #endif
101 macro S_ISBLK
102 macro S_ISCHR
103 macro S_ISDIR
104 macro S_ISFIFO
105 macro S_ISREG
106 #if !defined XPG4 && !defined POSIX
107 macro S_ISLNK
108 macro S_ISSOCK
109 #endif
111 // How to represent optional tests?
112 optional-macro S_TYPEISMQ
113 optional-macro S_TYPEISSEM
114 optional-macro S_TYPEISSHM
115 # if !defined POSIX && !defined XPG4 && !defined XPG42 && !defined UNIX98
116 optional-macro S_TYPEISTMO
117 # endif
119 # if defined XOPEN2K8 || defined POSIX2008
120 constant UTIME_NOW
121 constant UTIME_OMIT
122 # endif
124 function int chmod (const char*, mode_t)
125 # ifndef XPG4
126 function int fchmod (int, mode_t)
127 # endif
128 # if defined XOPEN2K8 || defined POSIX2008
129 function int fchmodat (int, const char*, mode_t, int)
130 # endif
131 function int fstat (int, struct stat*)
132 # if defined XOPEN2K8 || defined POSIX2008
133 function int fstatat (int, const char*, struct stat*, int)
134 function int futimens (int, const struct timespec[2])
135 # endif
136 #if !defined XPG4 && !defined POSIX
137 function int lstat (const char*, struct stat*)
138 #endif
139 function int mkdir (const char*, mode_t)
140 # if defined XOPEN2K8 || defined POSIX2008
141 function int mkdirat (int, const char*, mode_t)
142 # endif
143 function int mkfifo (const char*, mode_t)
144 # if defined XOPEN2K8 || defined POSIX2008
145 function int mkfifoat (int, const char*, mode_t)
146 # endif
147 # if !defined XPG4 && !defined POSIX && !defined POSIX2008
148 function int mknod (const char*, mode_t, dev_t)
149 # endif
150 # ifdef XOPEN2K8
151 function int mknodat (int, const char*, mode_t, dev_t)
152 # endif
153 function int stat (const char*, struct stat*)
154 function mode_t umask (mode_t)
155 # if defined XOPEN2K8 || defined POSIX2008
156 function int utimensat (int, const char*, const struct timespec[2], int)
157 # endif
159 allow st_*
160 allow S_*
161 allow *_t
162 #endif