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

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

Powered by Google App Engine
This is Rietveld 408576698