"Fossies" - the Fresh Open Source Software Archive 
Member "afio-2.5.2/regtest/statsize.c" (30 Nov 2018, 954 Bytes) of package /linux/misc/afio-2.5.2.tgz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
For more information about "statsize.c" see the
Fossies "Dox" file reference documentation.
1
2 /* print sizeof values of struct stat fields
3 useful for compatibility testing
4 */
5
6 #include <stdio.h>
7 #include <string.h>
8 #include <unistd.h>
9 #include <sys/stat.h>
10 #include <time.h>
11
12 int main(int argc, char ** argv)
13 {
14 struct stat s;
15
16 printf("sizeof st_dev = %d\n",sizeof(s.st_dev));
17 printf("sizeof st_ino = %d\n",sizeof(s.st_ino));
18 printf("sizeof st_mode = %d\n",sizeof(s.st_mode));
19 printf("sizeof st_nlink = %d\n",sizeof(s.st_nlink));
20 printf("sizeof st_uid = %d\n",sizeof(s.st_uid));
21 printf("sizeof st_gid = %d\n",sizeof(s.st_gid));
22 printf("sizeof st_rdev = %d\n",sizeof(s.st_rdev));
23 printf("sizeof st_size = %d\n",sizeof(s.st_size));
24 printf("sizeof st_blksize = %d\n",sizeof(s.st_blksize));
25 printf("sizeof st_blocks = %d\n",sizeof(s.st_blocks));
26 printf("sizeof st_atime = %d\n",sizeof(s.st_atime));
27 printf("sizeof st_mtime = %d\n",sizeof(s.st_mtime));
28 printf("sizeof st_ctime = %d\n",sizeof(s.st_ctime));
29
30 return 0;
31 }
32