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

Side by Side Diff: sysdeps/unix/sysv/linux/x86_64/bits/stat.h

Issue 6026005: Fix __fxstat which is called from fstat. Remove obsolete fstat64. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/nacl-glibc.git@master
Patch Set: Fix __fxstat, unificating struct stat and struct stat64. Created 10 years 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 | Annotate | Revision Log
OLDNEW
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
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 struct stat64
45 {
46 __dev_t st_dev; /* Device. */
47 __ino64_t st_ino; /* file serial number. */
48 __mode_t st_mode; /* File mode. */
49 __nlink_t st_nlink; /* Link count. */
50 __uid_t st_uid; /* User ID of the file's owner. */
51 __gid_t st_gid; /* Group ID of the file's group.*/
52 __dev_t st_rdev; /* Device number, if device. */
53 __off64_t st_size; /* Size of file, in bytes. */
54 __blksize_t st_blksize; /* Optimal block size for I/O. */
55
56 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
57 #ifdef __USE_MISC
58 /* Nanosecond resolution timestamps are stored in a format
59 equivalent to 'struct timespec'. This is the type used
60 whenever possible but the Unix namespace rules do not allow the
61 identifier 'timespec' to appear in the <sys/stat.h> header.
62 Therefore we have to handle the use of this header in strictly
63 standard-compliant sources special. */
64 struct timespec st_atim; /* Time of last access. */
65 struct timespec st_mtim; /* Time of last modification. */
66 struct timespec st_ctim; /* Time of last status change. */
67 # define st_atime st_atim.tv_sec /* Backward compatibility. */
68 # define st_mtime st_mtim.tv_sec
69 # define st_ctime st_ctim.tv_sec
70 #else
71 __time_t st_atime; /* Time of last access. */
72 unsigned long int st_atimensec; /* Nscecs of last access. */
73 __time_t st_mtime; /* Time of last modification. */
74 unsigned long int st_mtimensec; /* Nsecs of last modification. */
75 __time_t st_ctime; /* Time of last status change. */
76 unsigned long int st_ctimensec; /* Nsecs of last status change. */
77 #endif
78 };
79 struct stat
80 {
81 __dev_t st_dev; /* Device. */
82
83 __ino64_t st_ino; /* file serial number. */
84 __mode_t st_mode; /* File mode. */
85 __nlink_t st_nlink; /* Link count. */
86 __uid_t st_uid; /* User ID of the file's owner. */
87 __gid_t st_gid; /* Group ID of the file's group.*/
88 __dev_t st_rdev; /* Device number, if device. */
89 __off64_t st_size; /* Size of file, in bytes. */
90 __blksize_t st_blksize; /* Optimal block size for I/O. */
91
92 __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
93 #ifdef __USE_MISC
94 /* Nanosecond resolution timestamps are stored in a format
95 equivalent to 'struct timespec'. This is the type used
96 whenever possible but the Unix namespace rules do not allow the
97 identifier 'timespec' to appear in the <sys/stat.h> header.
98 Therefore we have to handle the use of this header in strictly
99 standard-compliant sources special. */
100 struct timespec st_atim; /* Time of last access. */
101 struct timespec st_mtim; /* Time of last modification. */
102 struct timespec st_ctim; /* Time of last status change. */
103 # define st_atime st_atim.tv_sec /* Backward compatibility. */
104 # define st_mtime st_mtim.tv_sec
105 # define st_ctime st_ctim.tv_sec
106 #else
107 __time_t st_atime; /* Time of last access. */
108 unsigned long int st_atimensec; /* Nscecs of last access. */
109 __time_t st_mtime; /* Time of last modification. */
110 unsigned long int st_mtimensec; /* Nsecs of last modification. */
111 __time_t st_ctime; /* Time of last status change. */
112 unsigned long int st_ctimensec; /* Nsecs of last status change. */
113 #endif
114 };
115 #else
43 struct stat 116 struct stat
44 { 117 {
45 __dev_t st_dev; /* Device. */ 118 __dev_t st_dev; /* Device. */
46 #if __WORDSIZE == 32 119 #if __WORDSIZE == 32
47 unsigned short int __pad1; 120 unsigned short int __pad1;
48 #endif 121 #endif
49 #if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64 122 #if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64
50 __ino_t st_ino; /* File serial number. */ 123 __ino_t st_ino; /* File serial number. */
51 #else 124 #else
52 __ino_t __st_ino; /* 32bit file serial number. */ 125 __ino_t __st_ino; /* 32bit file serial number. */
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 __time_t st_ctime; /* Time of last status change. */ 233 __time_t st_ctime; /* Time of last status change. */
161 unsigned long int st_ctimensec; /* Nsecs of last status change. */ 234 unsigned long int st_ctimensec; /* Nsecs of last status change. */
162 #endif 235 #endif
163 #if __WORDSIZE == 64 236 #if __WORDSIZE == 64
164 long int __unused[3]; 237 long int __unused[3];
165 #else 238 #else
166 __ino64_t st_ino; /* File serial number. */ 239 __ino64_t st_ino; /* File serial number. */
167 #endif 240 #endif
168 }; 241 };
169 #endif 242 #endif
243 #endif /* native_client */
170 244
171 /* Tell code we have these members. */ 245 /* Tell code we have these members. */
172 #define _STATBUF_ST_BLKSIZE 246 #define _STATBUF_ST_BLKSIZE
173 #define _STATBUF_ST_RDEV 247 #define _STATBUF_ST_RDEV
174 /* Nanosecond resolution time values are supported. */ 248 /* Nanosecond resolution time values are supported. */
175 #define _STATBUF_ST_NSEC 249 #define _STATBUF_ST_NSEC
176 250
177 /* Encoding of the file mode. */ 251 /* Encoding of the file mode. */
178 252
179 #define __S_IFMT 0170000 /* These bits determine file type. */ 253 #define __S_IFMT 0170000 /* These bits determine file type. */
(...skipping 20 matching lines...) Expand all
200 #define __S_ISVTX 01000 /* Save swapped text after use (sticky). */ 274 #define __S_ISVTX 01000 /* Save swapped text after use (sticky). */
201 #define __S_IREAD 0400 /* Read by owner. */ 275 #define __S_IREAD 0400 /* Read by owner. */
202 #define __S_IWRITE 0200 /* Write by owner. */ 276 #define __S_IWRITE 0200 /* Write by owner. */
203 #define __S_IEXEC 0100 /* Execute by owner. */ 277 #define __S_IEXEC 0100 /* Execute by owner. */
204 278
205 #if defined __USE_ATFILE || defined __USE_GNU 279 #if defined __USE_ATFILE || defined __USE_GNU
206 /* XXX This will change to the macro for the next 2008 POSIX revision. */ 280 /* XXX This will change to the macro for the next 2008 POSIX revision. */
207 # define UTIME_NOW ((1l << 30) - 1l) 281 # define UTIME_NOW ((1l << 30) - 1l)
208 # define UTIME_OMIT ((1l << 30) - 2l) 282 # define UTIME_OMIT ((1l << 30) - 2l)
209 #endif 283 #endif
OLDNEW
« sysdeps/nacl/nacl_stat.h ('K') | « sysdeps/unix/sysv/linux/kernel_stat.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698