On 2/5/07, Damjan Jovanovic damjan.jov@gmail.com wrote:
On 2/3/07, Dmitry Timoshkov dmitry@codeweavers.com wrote:
"Damjan Jovanovic" damjan.jov@gmail.com wrote:
In wine's struct _stati64, st_size has an offset of 20 bytes from the beginning of the struct, unlike mingw's and Window's 24. This breaks Java 1.4.x pretty badly, it dies on startup complaining about a truncated class file (#2953). Using #include <pshpack8.h> and #include <pshpop8.h> around the struct didn't help, so a padding field was used instead.
Does the approach used in winbase.h in declaration of WIN32_STREAM_ID to align the Size field help?
#include <pshpack8.h> typedef struct _WIN32_STREAM_ID { DWORD dwStreamId; DWORD dwStreamAttributes; LARGE_INTEGER DECLSPEC_ALIGN(8) Size; DWORD dwStreamNameSize; WCHAR cStreamName[ANYSIZE_ARRAY]; } WIN32_STREAM_ID, *LPWIN32_STREAM_ID; #include <poppack.h>
That doesn't help.
Sorry, that (as in DECLSPEC_ALIGN(8)) DOES work, I didn't see it before. I'll send a patch that does that instead of using a padding field.
Dmitry.
Damjan
Damjan