Last active
May 18, 2017 18:31
-
-
Save offlinemark/117fc8f30f821f0f8c393222384dd492 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <string.h> | |
| #include <sys/stat.h> | |
| int main(int argc, const char *argv[]) | |
| { | |
| unsigned long long a= 0xaaaaaaaaaaaaaaaa; | |
| struct stat s = { | |
| .st_dev = 0xffffffffffffffff, | |
| .__pad1 = 0x41, | |
| .st_ino = 2, | |
| .st_mode = 3, | |
| .st_nlink = 4, | |
| .st_uid = 5, | |
| .st_gid = 6, | |
| .st_rdev = 7, | |
| .__pad2 = 0x42, | |
| .st_size = 8, | |
| .st_blksize = 9, | |
| .st_blocks = 10, | |
| .st_atim = 11, | |
| .st_mtim = 12, | |
| .st_ctim = 13, | |
| .__glibc_reserved4 = 0x43, | |
| .__glibc_reserved5 = 0x44, | |
| }; | |
| unsigned long long b= 0xbbbbbbbbbbbbbbbb; | |
| printf("%u\n", sizeof s.st_dev); | |
| printf("%u\n", sizeof s.st_ino); | |
| printf("%u\n", sizeof s.st_mode); | |
| printf("%u\n", sizeof s.st_nlink); | |
| printf("%u\n", sizeof s.st_uid); | |
| printf("%u\n", sizeof s.st_gid); | |
| printf("rdev %u\n", sizeof s.st_rdev); | |
| printf("%u\n", sizeof s.st_size); | |
| printf("%u\n", sizeof s.st_blksize); | |
| printf("%u\n", sizeof s.st_blocks); | |
| printf("%u\n", sizeof s.st_atim); | |
| printf("%u\n", sizeof s.st_mtim); | |
| printf("%u\n", sizeof s.st_ctim); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment