OSDN Git Service

Split out the definition of struct stat into the new arch
[uclinux-h8/uClibc.git] / libc / sysdeps / linux / mips / bits / kernel_stat.h
1 #ifndef _BITS_STAT_STRUCT_H
2 #define _BITS_STAT_STRUCT_H
3
4 /* This file provides whatever this particular arch's kernel thinks 
5  * struct stat should look like...  It turns out each arch has a 
6  * different opinion on the subject... */
7 #if __WORDSIZE == 64
8 struct stat {
9         unsigned long   st_dev;
10         unsigned long   st_pad0[3];     /* Reserved for st_dev expansion  */
11         unsigned long long      st_ino;
12         unsigned int    st_mode;
13         int             st_nlink;
14         int             st_uid;
15         int             st_gid;
16         unsigned long   st_rdev;
17         unsigned long   st_pad1[3];     /* Reserved for st_rdev expansion  */
18         long long       st_size;
19         long            st_atime;
20         unsigned long   reserved0;      /* Reserved for st_atime expansion  */
21         long            st_mtime;
22         unsigned long   reserved1;      /* Reserved for st_mtime expansion  */
23         long            st_ctime;
24         unsigned long   reserved2;      /* Reserved for st_ctime expansion  */
25         unsigned long   st_blksize;
26         unsigned long   st_pad2;
27         long long       st_blocks;
28 };
29 #else
30 struct stat {
31         unsigned int    st_dev;
32         long            st_pad1[3];             /* Reserved for network id */
33         unsigned long   st_ino;
34         unsigned int    st_mode;
35         int             st_nlink;
36         int             st_uid;
37         int             st_gid;
38         unsigned int    st_rdev;
39         long            st_pad2[2];
40         long            st_size;
41         long            st_pad3;
42         long            st_atime;
43         long            reserved0;
44         long            st_mtime;
45         long            reserved1;
46         long            st_ctime;
47         long            reserved2;
48         long            st_blksize;
49         long            st_blocks;
50         long            st_pad4[14];
51 };
52 #ifdef __USE_LARGEFILE64
53 struct stat64 {
54         unsigned long   st_dev;
55         unsigned long   st_pad0[3];     /* Reserved for st_dev expansion  */
56         unsigned long long      st_ino;
57         unsigned int    st_mode;
58         int             st_nlink;
59         int             st_uid;
60         int             st_gid;
61         unsigned long   st_rdev;
62         unsigned long   st_pad1[3];     /* Reserved for st_rdev expansion  */
63         long long       st_size;
64         long            st_atime;
65         unsigned long   reserved0;      /* Reserved for st_atime expansion  */
66         long            st_mtime;
67         unsigned long   reserved1;      /* Reserved for st_mtime expansion  */
68         long            st_ctime;
69         unsigned long   reserved2;      /* Reserved for st_ctime expansion  */
70         unsigned long   st_blksize;
71         unsigned long   st_pad2;
72         long long       st_blocks;
73 };
74 #endif
75 #endif
76
77 #endif  /*  _BITS_STAT_STRUCT_H */
78