OSDN Git Service

Split out the definition of struct stat into the new arch
[uclinux-h8/uClibc.git] / libc / sysdeps / linux / common / 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 #warning please verify struct stat for your architecture matches struct stat for x86...
8
9 struct stat {
10         unsigned short st_dev;
11         unsigned short __pad1;
12         unsigned long st_ino;
13         unsigned short st_mode;
14         unsigned short st_nlink;
15         unsigned short st_uid;
16         unsigned short st_gid;
17         unsigned short st_rdev;
18         unsigned short __pad2;
19         unsigned long  st_size;
20         unsigned long  st_blksize;
21         unsigned long  st_blocks;
22         unsigned long  st_atime;
23         unsigned long  __unused1;
24         unsigned long  st_mtime;
25         unsigned long  __unused2;
26         unsigned long  st_ctime;
27         unsigned long  __unused3;
28         unsigned long  __unused4;
29         unsigned long  __unused5;
30 };
31 #ifdef __USE_LARGEFILE64
32 struct stat64 {
33         unsigned short  st_dev;
34         unsigned char   __pad0[10];
35 #define STAT64_HAS_BROKEN_ST_INO        1
36         unsigned long   __st_ino;
37         unsigned int    st_mode;
38         unsigned int    st_nlink;
39         unsigned long   st_uid;
40         unsigned long   st_gid;
41         unsigned short  st_rdev;
42         unsigned char   __pad3[10];
43         long long       st_size;
44         unsigned long   st_blksize;
45         unsigned long   st_blocks;      /* Number 512-byte blocks allocated. */
46         unsigned long   __pad4;         /* future possible st_blocks high bits */
47         unsigned long   st_atime;
48         unsigned long   __pad5;
49         unsigned long   st_mtime;
50         unsigned long   __pad6;
51         unsigned long   st_ctime;
52         unsigned long   __pad7;         /* will be high 32 bits of ctime someday */
53         unsigned long long      st_ino;
54 };
55 #endif
56
57
58 #endif  /*  _BITS_STAT_STRUCT_H */
59