You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running ~/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi30-clang -g -Wall testc.c -Xclang -fdump-record-layouts prints the layout of struct stat:
*** Dumping AST Record Layout
0 | struct timespec
0 | time_t tv_sec
4 | long tv_nsec
| [sizeof=8, align=4]
*** Dumping AST Record Layout
0 | struct stat
0 | unsigned long long st_dev
8 | unsigned char[4] __pad0
12 | unsigned long __st_ino
16 | unsigned int st_mode
20 | nlink_t st_nlink
24 | uid_t st_uid
28 | gid_t st_gid
32 | unsigned long long st_rdev
40 | unsigned char[4] __pad3
48 | long long st_size
56 | unsigned long st_blksize
64 | unsigned long long st_blocks
72 | struct timespec st_atim
72 | time_t tv_sec
76 | long tv_nsec
80 | struct timespec st_mtim
80 | time_t tv_sec
84 | long tv_nsec
88 | struct timespec st_ctim
88 | time_t tv_sec
92 | long tv_nsec
96 | unsigned long long st_ino
| [sizeof=104, align=8]
struct stat has size 104 for Android armv7a in C, but struct core.sys.posix.sys.stat.stat_t in D has size 88.
File testc.c:
Running
~/Android/Sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi30-clang -g -Wall testc.c -Xclang -fdump-record-layouts
prints the layout of struct stat:File test.d:
Running
ldc2 -c -mtriple=armv7a--linux-android30 test.d
prints:The text was updated successfully, but these errors were encountered: