OLD | NEW |
1 /* Copyright (C) 1999,2000,2001,2002,2003 Free Software Foundation, Inc. | 1 /* Copyright (C) 1999,2000,2001,2002,2003 Free Software Foundation, Inc. |
2 This file is part of the GNU C Library. | 2 This file is part of the GNU C Library. |
3 | 3 |
4 The GNU C Library is free software; you can redistribute it and/or | 4 The GNU C Library is free software; you can redistribute it and/or |
5 modify it under the terms of the GNU Lesser General Public | 5 modify it under the terms of the GNU Lesser General Public |
6 License as published by the Free Software Foundation; either | 6 License as published by the Free Software Foundation; either |
7 version 2.1 of the License, or (at your option) any later version. | 7 version 2.1 of the License, or (at your option) any later version. |
8 | 8 |
9 The GNU C Library is distributed in the hope that it will be useful, | 9 The GNU C Library is distributed in the hope that it will be useful, |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 22 matching lines...) Expand all Loading... |
33 # define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ | 33 # define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ |
34 #else | 34 #else |
35 # define _STAT_VER_LINUX 1 | 35 # define _STAT_VER_LINUX 1 |
36 | 36 |
37 /* x86-64 versions of the `xmknod' interface. */ | 37 /* x86-64 versions of the `xmknod' interface. */ |
38 # define _MKNOD_VER_LINUX 0 | 38 # define _MKNOD_VER_LINUX 0 |
39 #endif | 39 #endif |
40 | 40 |
41 #define _STAT_VER _STAT_VER_LINUX | 41 #define _STAT_VER _STAT_VER_LINUX |
42 | 42 |
| 43 #ifdef __native_client__ |
| 44 #ifdef __USE_LARGEFILE64 |
| 45 struct stat64 |
| 46 { |
| 47 __dev_t st_dev; /* Device. */ |
| 48 __ino64_t st_ino; /* file serial number. */ |
| 49 __mode_t st_mode; /* File mode. */ |
| 50 __nlink_t st_nlink; /* Link count. */ |
| 51 __uid_t st_uid; /* User ID of the file's owner. */ |
| 52 __gid_t st_gid; /* Group ID of the file's group.*/ |
| 53 __dev_t st_rdev; /* Device number, if device. */ |
| 54 __off64_t st_size; /* Size of file, in bytes. */ |
| 55 __blksize_t st_blksize; /* Optimal block size for I/O. */ |
| 56 |
| 57 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ |
| 58 #ifdef __USE_MISC |
| 59 /* Nanosecond resolution timestamps are stored in a format |
| 60 equivalent to 'struct timespec'. This is the type used |
| 61 whenever possible but the Unix namespace rules do not allow the |
| 62 identifier 'timespec' to appear in the <sys/stat.h> header. |
| 63 Therefore we have to handle the use of this header in strictly |
| 64 standard-compliant sources special. */ |
| 65 struct timespec st_atim; /* Time of last access. */ |
| 66 struct timespec st_mtim; /* Time of last modification. */ |
| 67 struct timespec st_ctim; /* Time of last status change. */ |
| 68 # define st_atime st_atim.tv_sec /* Backward compatibility. */ |
| 69 # define st_mtime st_mtim.tv_sec |
| 70 # define st_ctime st_ctim.tv_sec |
| 71 #else |
| 72 __time_t st_atime; /* Time of last access. */ |
| 73 unsigned long int st_atimensec; /* Nscecs of last access. */ |
| 74 __time_t st_mtime; /* Time of last modification. */ |
| 75 unsigned long int st_mtimensec; /* Nsecs of last modification. */ |
| 76 __time_t st_ctime; /* Time of last status change. */ |
| 77 unsigned long int st_ctimensec; /* Nsecs of last status change. */ |
| 78 #endif |
| 79 }; |
| 80 #endif |
| 81 struct stat |
| 82 { |
| 83 __dev_t st_dev; /* Device. */ |
| 84 |
| 85 __ino64_t st_ino; /* file serial number. */ |
| 86 __mode_t st_mode; /* File mode. */ |
| 87 __nlink_t st_nlink; /* Link count. */ |
| 88 __uid_t st_uid; /* User ID of the file's owner. */ |
| 89 __gid_t st_gid; /* Group ID of the file's group.*/ |
| 90 __dev_t st_rdev; /* Device number, if device. */ |
| 91 __off64_t st_size; /* Size of file, in bytes. */ |
| 92 __blksize_t st_blksize; /* Optimal block size for I/O. */ |
| 93 |
| 94 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ |
| 95 #ifdef __USE_MISC |
| 96 /* Nanosecond resolution timestamps are stored in a format |
| 97 equivalent to 'struct timespec'. This is the type used |
| 98 whenever possible but the Unix namespace rules do not allow the |
| 99 identifier 'timespec' to appear in the <sys/stat.h> header. |
| 100 Therefore we have to handle the use of this header in strictly |
| 101 standard-compliant sources special. */ |
| 102 struct timespec st_atim; /* Time of last access. */ |
| 103 struct timespec st_mtim; /* Time of last modification. */ |
| 104 struct timespec st_ctim; /* Time of last status change. */ |
| 105 # define st_atime st_atim.tv_sec /* Backward compatibility. */ |
| 106 # define st_mtime st_mtim.tv_sec |
| 107 # define st_ctime st_ctim.tv_sec |
| 108 #else |
| 109 __time_t st_atime; /* Time of last access. */ |
| 110 unsigned long int st_atimensec; /* Nscecs of last access. */ |
| 111 __time_t st_mtime; /* Time of last modification. */ |
| 112 unsigned long int st_mtimensec; /* Nsecs of last modification. */ |
| 113 __time_t st_ctime; /* Time of last status change. */ |
| 114 unsigned long int st_ctimensec; /* Nsecs of last status change. */ |
| 115 #endif |
| 116 }; |
| 117 #else |
43 struct stat | 118 struct stat |
44 { | 119 { |
45 __dev_t st_dev; /* Device. */ | 120 __dev_t st_dev; /* Device. */ |
46 #if __WORDSIZE == 32 | 121 #if __WORDSIZE == 32 |
47 unsigned short int __pad1; | 122 unsigned short int __pad1; |
48 #endif | 123 #endif |
49 #if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64 | 124 #if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64 |
50 __ino_t st_ino; /* File serial number. */ | 125 __ino_t st_ino; /* File serial number. */ |
51 #else | 126 #else |
52 __ino_t __st_ino; /* 32bit file serial number. */ | 127 __ino_t __st_ino; /* 32bit file serial number. */ |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 __time_t st_ctime; /* Time of last status change. */ | 235 __time_t st_ctime; /* Time of last status change. */ |
161 unsigned long int st_ctimensec; /* Nsecs of last status change. */ | 236 unsigned long int st_ctimensec; /* Nsecs of last status change. */ |
162 #endif | 237 #endif |
163 #if __WORDSIZE == 64 | 238 #if __WORDSIZE == 64 |
164 long int __unused[3]; | 239 long int __unused[3]; |
165 #else | 240 #else |
166 __ino64_t st_ino; /* File serial number. */ | 241 __ino64_t st_ino; /* File serial number. */ |
167 #endif | 242 #endif |
168 }; | 243 }; |
169 #endif | 244 #endif |
| 245 #endif /* native_client */ |
170 | 246 |
171 /* Tell code we have these members. */ | 247 /* Tell code we have these members. */ |
172 #define _STATBUF_ST_BLKSIZE | 248 #define _STATBUF_ST_BLKSIZE |
173 #define _STATBUF_ST_RDEV | 249 #define _STATBUF_ST_RDEV |
174 /* Nanosecond resolution time values are supported. */ | 250 /* Nanosecond resolution time values are supported. */ |
175 #define _STATBUF_ST_NSEC | 251 #define _STATBUF_ST_NSEC |
176 | 252 |
177 /* Encoding of the file mode. */ | 253 /* Encoding of the file mode. */ |
178 | 254 |
179 #define __S_IFMT 0170000 /* These bits determine file type. */ | 255 #define __S_IFMT 0170000 /* These bits determine file type. */ |
(...skipping 20 matching lines...) Expand all Loading... |
200 #define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ | 276 #define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ |
201 #define __S_IREAD 0400 /* Read by owner. */ | 277 #define __S_IREAD 0400 /* Read by owner. */ |
202 #define __S_IWRITE 0200 /* Write by owner. */ | 278 #define __S_IWRITE 0200 /* Write by owner. */ |
203 #define __S_IEXEC 0100 /* Execute by owner. */ | 279 #define __S_IEXEC 0100 /* Execute by owner. */ |
204 | 280 |
205 #if defined __USE_ATFILE || defined __USE_GNU | 281 #if defined __USE_ATFILE || defined __USE_GNU |
206 /* XXX This will change to the macro for the next 2008 POSIX revision. */ | 282 /* XXX This will change to the macro for the next 2008 POSIX revision. */ |
207 # define UTIME_NOW ((1l << 30) - 1l) | 283 # define UTIME_NOW ((1l << 30) - 1l) |
208 # define UTIME_OMIT ((1l << 30) - 2l) | 284 # define UTIME_OMIT ((1l << 30) - 2l) |
209 #endif | 285 #endif |
OLD | NEW |