25 Nov
2006
25 Nov
'06
7:42 p.m.
Peter Dimov wrote:
Larry Smith wrote:
I don't understand why the lib should care about the data alignment of the struct's (packed versus unpacked).
The library doesn't; your compiler does, and it's wrong in this case. char[8] requires no padding or alignment, so it should bind to char(&)[8] in either mode. You might be able to use a reinterpret_cast to silence the compiler.
Yes, the problem is that the real struct's have int's, long's, double's, and char[] members intermixed. The existing Windows code requires that the struct's remain packed (it's a long story with roots in the original implemenation 15 years ago). Thanks, Larry