On Wednesday, 20 August 2014 at 06:17:43 UTC, Dominikus Dittes
Scherkl wrote:
On Wednesday, 20 August 2014 at 06:11:42 UTC, blake kim wrote:
But I don't think this is right. Many C APIs need structure as
argument and adjusting align each structure doesn't make sense.
Is this problem a Bug of D ?
Default alignment in D is pointersize (size_t) - so 8 on 64bit.
But most C compilers default to 4 regardless of pointersize.
I think this is more a bug in C than in D.
epoll_wait is a system API on Linux.
So, I can't agree that it is a bug of C in alignment.
C uses 4 byte alignment, then, I think, it is sensible that D
should follow that.
Actually, In core.sys.linux.epoll.d, struct epoll_event doesn't
assign a specific align so that the problem is caused.