28
28
29
29
struct stat
30
30
{
31
+ #ifdef __USE_TIME_BITS64
32
+ # include <bits/struct_stat_time64_helper.h>
33
+ #else
31
34
__dev_t st_dev ; /* Device. */
32
- #if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64
35
+ # if __WORDSIZE == 64 || !defined __USE_FILE_OFFSET64
33
36
unsigned short int __pad1 ;
34
37
__ino_t st_ino ; /* File serial number. */
35
- #else
38
+ # else
36
39
__ino64_t st_ino ; /* File serial number. */
37
- #endif
40
+ # endif
38
41
__mode_t st_mode ; /* File mode. */
39
42
__nlink_t st_nlink ; /* Link count. */
40
43
__uid_t st_uid ; /* User ID of the file's owner. */
41
44
__gid_t st_gid ; /* Group ID of the file's group.*/
42
45
__dev_t st_rdev ; /* Device number, if device. */
43
46
unsigned short int __pad2 ;
44
- #ifndef __USE_FILE_OFFSET64
47
+ # ifndef __USE_FILE_OFFSET64
45
48
__off_t st_size ; /* Size of file, in bytes. */
46
- #else
49
+ # else
47
50
__off64_t st_size ; /* Size of file, in bytes. */
48
- #endif
51
+ # endif
49
52
__blksize_t st_blksize ; /* Optimal block size for I/O. */
50
53
51
- #ifndef __USE_FILE_OFFSET64
54
+ # ifndef __USE_FILE_OFFSET64
52
55
__blkcnt_t st_blocks ; /* Number 512-byte blocks allocated. */
53
- #else
56
+ # else
54
57
__blkcnt64_t st_blocks ; /* Number 512-byte blocks allocated. */
55
- #endif
56
- #ifdef __USE_XOPEN2K8
58
+ # endif
59
+ # ifdef __USE_XOPEN2K8
57
60
/* Nanosecond resolution timestamps are stored in a format
58
61
equivalent to 'struct timespec'. This is the type used
59
62
whenever possible but the Unix namespace rules do not allow the
@@ -63,28 +66,32 @@ struct stat
63
66
struct timespec st_atim ; /* Time of last access. */
64
67
struct timespec st_mtim ; /* Time of last modification. */
65
68
struct timespec st_ctim ; /* Time of last status change. */
66
- # define st_atime st_atim.tv_sec /* Backward compatibility. */
67
- # define st_mtime st_mtim.tv_sec
68
- # define st_ctime st_ctim.tv_sec
69
- #else
69
+ # define st_atime st_atim.tv_sec /* Backward compatibility. */
70
+ # define st_mtime st_mtim.tv_sec
71
+ # define st_ctime st_ctim.tv_sec
72
+ # else
70
73
__time_t st_atime ; /* Time of last access. */
71
74
unsigned long int st_atimensec ; /* Nscecs of last access. */
72
75
__time_t st_mtime ; /* Time of last modification. */
73
76
unsigned long int st_mtimensec ; /* Nsecs of last modification. */
74
77
__time_t st_ctime ; /* Time of last status change. */
75
78
unsigned long int st_ctimensec ; /* Nsecs of last status change. */
76
- #endif
79
+ # endif
77
80
unsigned long int __glibc_reserved4 ;
78
81
unsigned long int __glibc_reserved5 ;
82
+ #endif /* __USE_TIME_BITS64 */
79
83
};
80
84
81
85
#ifdef __USE_LARGEFILE64
82
86
struct stat64
83
87
{
88
+ # ifdef __USE_TIME_BITS64
89
+ # include <bits/struct_stat_time64_helper.h>
90
+ # else
84
91
__dev_t st_dev ; /* Device. */
85
- # if __WORDSIZE == 64
92
+ # if __WORDSIZE == 64
86
93
unsigned short int __pad1 ;
87
- # endif
94
+ # endif
88
95
__ino64_t st_ino ; /* File serial number. */
89
96
__mode_t st_mode ; /* File mode. */
90
97
__nlink_t st_nlink ; /* Link count. */
@@ -96,7 +103,7 @@ struct stat64
96
103
__blksize_t st_blksize ; /* Optimal block size for I/O. */
97
104
98
105
__blkcnt64_t st_blocks ; /* Number 512-byte blocks allocated. */
99
- # ifdef __USE_XOPEN2K8
106
+ # ifdef __USE_XOPEN2K8
100
107
/* Nanosecond resolution timestamps are stored in a format
101
108
equivalent to 'struct timespec'. This is the type used
102
109
whenever possible but the Unix namespace rules do not allow the
@@ -106,19 +113,20 @@ struct stat64
106
113
struct timespec st_atim ; /* Time of last access. */
107
114
struct timespec st_mtim ; /* Time of last modification. */
108
115
struct timespec st_ctim ; /* Time of last status change. */
109
- # define st_atime st_atim.tv_sec /* Backward compatibility. */
110
- # define st_mtime st_mtim.tv_sec
111
- # define st_ctime st_ctim.tv_sec
112
- # else
116
+ # define st_atime st_atim.tv_sec /* Backward compatibility. */
117
+ # define st_mtime st_mtim.tv_sec
118
+ # define st_ctime st_ctim.tv_sec
119
+ # else
113
120
__time_t st_atime ; /* Time of last access. */
114
121
unsigned long int st_atimensec ; /* Nscecs of last access. */
115
122
__time_t st_mtime ; /* Time of last modification. */
116
123
unsigned long int st_mtimensec ; /* Nsecs of last modification. */
117
124
__time_t st_ctime ; /* Time of last status change. */
118
125
unsigned long int st_ctimensec ; /* Nsecs of last status change. */
119
- # endif
126
+ # endif
120
127
unsigned long int __glibc_reserved4 ;
121
128
unsigned long int __glibc_reserved5 ;
129
+ # endif /* __USE_TIME_BITS64 */
122
130
};
123
131
#endif
124
132
0 commit comments