OLD | NEW |
1 /* Copyright (C) 1992, 1995-2001, 2002 Free Software Foundation, Inc. | 1 /* Copyright (C) 1992, 1995-2001, 2002 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 13 matching lines...) Expand all Loading... |
24 #define _STAT_VER_LINUX_OLD 1 | 24 #define _STAT_VER_LINUX_OLD 1 |
25 #define _STAT_VER_KERNEL 1 | 25 #define _STAT_VER_KERNEL 1 |
26 #define _STAT_VER_SVR4 2 | 26 #define _STAT_VER_SVR4 2 |
27 #define _STAT_VER_LINUX 3 | 27 #define _STAT_VER_LINUX 3 |
28 #define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ | 28 #define _STAT_VER _STAT_VER_LINUX /* The one defined below. */ |
29 | 29 |
30 /* Versions of the `xmknod' interface. */ | 30 /* Versions of the `xmknod' interface. */ |
31 #define _MKNOD_VER_LINUX 1 | 31 #define _MKNOD_VER_LINUX 1 |
32 #define _MKNOD_VER_SVR4 2 | 32 #define _MKNOD_VER_SVR4 2 |
33 #define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ | 33 #define _MKNOD_VER _MKNOD_VER_LINUX /* The bits defined below. */ |
| 34 #ifdef __native_client__ |
| 35 #ifdef __USE_LARGEFILE64 |
| 36 struct stat64 |
| 37 { |
| 38 __dev_t st_dev; /* Device. */ |
| 39 __ino64_t st_ino; /* file serial number. */ |
| 40 __mode_t st_mode; /* File mode. */ |
| 41 __nlink_t st_nlink; /* Link count. */ |
| 42 __uid_t st_uid; /* User ID of the file's owner. */ |
| 43 __gid_t st_gid; /* Group ID of the file's group.*/ |
| 44 __dev_t st_rdev; /* Device number, if device. */ |
| 45 __off64_t st_size; /* Size of file, in bytes. */ |
| 46 __blksize_t st_blksize; /* Optimal block size for I/O. */ |
34 | 47 |
| 48 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ |
| 49 #ifdef __USE_MISC |
| 50 /* Nanosecond resolution timestamps are stored in a format |
| 51 equivalent to 'struct timespec'. This is the type used |
| 52 whenever possible but the Unix namespace rules do not allow the |
| 53 identifier 'timespec' to appear in the <sys/stat.h> header. |
| 54 Therefore we have to handle the use of this header in strictly |
| 55 standard-compliant sources special. */ |
| 56 struct timespec st_atim; /* Time of last access. */ |
| 57 struct timespec st_mtim; /* Time of last modification. */ |
| 58 struct timespec st_ctim; /* Time of last status change. */ |
| 59 # define st_atime st_atim.tv_sec /* Backward compatibility. */ |
| 60 # define st_mtime st_mtim.tv_sec |
| 61 # define st_ctime st_ctim.tv_sec |
| 62 #else |
| 63 __time_t st_atime; /* Time of last access. */ |
| 64 unsigned long int st_atimensec; /* Nscecs of last access. */ |
| 65 __time_t st_mtime; /* Time of last modification. */ |
| 66 unsigned long int st_mtimensec; /* Nsecs of last modification. */ |
| 67 __time_t st_ctime; /* Time of last status change. */ |
| 68 unsigned long int st_ctimensec; /* Nsecs of last status change. */ |
| 69 #endif |
| 70 }; |
| 71 #endif |
| 72 struct stat |
| 73 { |
| 74 __dev_t st_dev; /* Device. */ |
| 75 __ino64_t st_ino; /* file serial number. */ |
| 76 __mode_t st_mode; /* File mode. */ |
| 77 __nlink_t st_nlink; /* Link count. */ |
| 78 __uid_t st_uid; /* User ID of the file's owner. */ |
| 79 __gid_t st_gid; /* Group ID of the file's group.*/ |
| 80 __dev_t st_rdev; /* Device number, if device. */ |
| 81 __off64_t st_size; /* Size of file, in bytes. */ |
| 82 __blksize_t st_blksize; /* Optimal block size for I/O. */ |
| 83 |
| 84 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */ |
| 85 #ifdef __USE_MISC |
| 86 /* Nanosecond resolution timestamps are stored in a format |
| 87 equivalent to 'struct timespec'. This is the type used |
| 88 whenever possible but the Unix namespace rules do not allow the |
| 89 identifier 'timespec' to appear in the <sys/stat.h> header. |
| 90 Therefore we have to handle the use of this header in strictly |
| 91 standard-compliant sources special. */ |
| 92 struct timespec st_atim; /* Time of last access. */ |
| 93 struct timespec st_mtim; /* Time of last modification. */ |
| 94 struct timespec st_ctim; /* Time of last status change. */ |
| 95 # define st_atime st_atim.tv_sec /* Backward compatibility. */ |
| 96 # define st_mtime st_mtim.tv_sec |
| 97 # define st_ctime st_ctim.tv_sec |
| 98 #else |
| 99 __time_t st_atime; /* Time of last access. */ |
| 100 unsigned long int st_atimensec; /* Nscecs of last access. */ |
| 101 __time_t st_mtime; /* Time of last modification. */ |
| 102 unsigned long int st_mtimensec; /* Nsecs of last modification. */ |
| 103 __time_t st_ctime; /* Time of last status change. */ |
| 104 unsigned long int st_ctimensec; /* Nsecs of last status change. */ |
| 105 #endif |
| 106 }; |
| 107 #else |
35 | 108 |
36 struct stat | 109 struct stat |
37 { | 110 { |
38 __dev_t st_dev; /* Device. */ | 111 __dev_t st_dev; /* Device. */ |
39 unsigned short int __pad1; | 112 unsigned short int __pad1; |
40 #ifndef __USE_FILE_OFFSET64 | 113 #ifndef __USE_FILE_OFFSET64 |
41 __ino_t st_ino; /* File serial number. */ | 114 __ino_t st_ino; /* File serial number. */ |
42 #else | 115 #else |
43 __ino_t __st_ino; /* 32bit file serial number. */ | 116 __ino_t __st_ino; /* 32bit file serial number. */ |
44 #endif | 117 #endif |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 __time_t st_atime; /* Time of last access. */ | 193 __time_t st_atime; /* Time of last access. */ |
121 unsigned long int st_atimensec; /* Nscecs of last access. */ | 194 unsigned long int st_atimensec; /* Nscecs of last access. */ |
122 __time_t st_mtime; /* Time of last modification. */ | 195 __time_t st_mtime; /* Time of last modification. */ |
123 unsigned long int st_mtimensec; /* Nsecs of last modification. */ | 196 unsigned long int st_mtimensec; /* Nsecs of last modification. */ |
124 __time_t st_ctime; /* Time of last status change. */ | 197 __time_t st_ctime; /* Time of last status change. */ |
125 unsigned long int st_ctimensec; /* Nsecs of last status change. */ | 198 unsigned long int st_ctimensec; /* Nsecs of last status change. */ |
126 #endif | 199 #endif |
127 __ino64_t st_ino; /* File serial number. */ | 200 __ino64_t st_ino; /* File serial number. */ |
128 }; | 201 }; |
129 #endif | 202 #endif |
| 203 #endif /* native_client */ |
130 | 204 |
131 /* Tell code we have these members. */ | 205 /* Tell code we have these members. */ |
132 #define _STATBUF_ST_BLKSIZE | 206 #define _STATBUF_ST_BLKSIZE |
133 #define _STATBUF_ST_RDEV | 207 #define _STATBUF_ST_RDEV |
134 /* Nanosecond resolution time values are supported. */ | 208 /* Nanosecond resolution time values are supported. */ |
135 #define _STATBUF_ST_NSEC | 209 #define _STATBUF_ST_NSEC |
136 | 210 |
137 /* Encoding of the file mode. */ | 211 /* Encoding of the file mode. */ |
138 | 212 |
139 #define __S_IFMT 0170000 /* These bits determine file type. */ | 213 #define __S_IFMT 0170000 /* These bits determine file type. */ |
(...skipping 20 matching lines...) Expand all Loading... |
160 #define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ | 234 #define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ |
161 #define __S_IREAD 0400 /* Read by owner. */ | 235 #define __S_IREAD 0400 /* Read by owner. */ |
162 #define __S_IWRITE 0200 /* Write by owner. */ | 236 #define __S_IWRITE 0200 /* Write by owner. */ |
163 #define __S_IEXEC 0100 /* Execute by owner. */ | 237 #define __S_IEXEC 0100 /* Execute by owner. */ |
164 | 238 |
165 #if defined __USE_ATFILE || defined __USE_GNU | 239 #if defined __USE_ATFILE || defined __USE_GNU |
166 /* XXX This will change to the macro for the next 2008 POSIX revision. */ | 240 /* XXX This will change to the macro for the next 2008 POSIX revision. */ |
167 # define UTIME_NOW ((1l << 30) - 1l) | 241 # define UTIME_NOW ((1l << 30) - 1l) |
168 # define UTIME_OMIT ((1l << 30) - 2l) | 242 # define UTIME_OMIT ((1l << 30) - 2l) |
169 #endif | 243 #endif |
OLD | NEW |