Fix alignment issues for MEMORYSTATUSEX, WIN32_STREAM_ID and
IO_COUNTERS. The corresponding tests now succeed both when compiled with the Windows headers and when compiled with the Wine headers.
This commit is contained in:
parent
e8698e9eb4
commit
2e360b3ee4
|
@ -572,6 +572,13 @@ static void test_pack_LPMEMORYSTATUS(void)
|
|||
TEST_TYPE_POINTER(LPMEMORYSTATUS, 32, 4);
|
||||
}
|
||||
|
||||
static void test_pack_LPMEMORYSTATUSEX(void)
|
||||
{
|
||||
/* LPMEMORYSTATUSEX */
|
||||
TEST_TYPE(LPMEMORYSTATUSEX, 4, 4);
|
||||
TEST_TYPE_POINTER(LPMEMORYSTATUSEX, 64, 8);
|
||||
}
|
||||
|
||||
static void test_pack_LPOFSTRUCT(void)
|
||||
{
|
||||
/* LPOFSTRUCT */
|
||||
|
@ -674,6 +681,13 @@ static void test_pack_LPWIN32_FIND_DATAW(void)
|
|||
TEST_TYPE_POINTER(LPWIN32_FIND_DATAW, 592, 4);
|
||||
}
|
||||
|
||||
static void test_pack_LPWIN32_STREAM_ID(void)
|
||||
{
|
||||
/* LPWIN32_STREAM_ID */
|
||||
TEST_TYPE(LPWIN32_STREAM_ID, 4, 4);
|
||||
TEST_TYPE_POINTER(LPWIN32_STREAM_ID, 24, 8);
|
||||
}
|
||||
|
||||
static void test_pack_MEMORYSTATUS(void)
|
||||
{
|
||||
/* MEMORYSTATUS (pack 4) */
|
||||
|
@ -688,6 +702,21 @@ static void test_pack_MEMORYSTATUS(void)
|
|||
TEST_FIELD(MEMORYSTATUS, SIZE_T, dwAvailVirtual, 28, 4, 4);
|
||||
}
|
||||
|
||||
static void test_pack_MEMORYSTATUSEX(void)
|
||||
{
|
||||
/* MEMORYSTATUSEX (pack 8) */
|
||||
TEST_TYPE(MEMORYSTATUSEX, 64, 8);
|
||||
TEST_FIELD(MEMORYSTATUSEX, DWORD, dwLength, 0, 4, 4);
|
||||
TEST_FIELD(MEMORYSTATUSEX, DWORD, dwMemoryLoad, 4, 4, 4);
|
||||
TEST_FIELD(MEMORYSTATUSEX, DWORDLONG, ullTotalPhys, 8, 8, 8);
|
||||
TEST_FIELD(MEMORYSTATUSEX, DWORDLONG, ullAvailPhys, 16, 8, 8);
|
||||
TEST_FIELD(MEMORYSTATUSEX, DWORDLONG, ullTotalPageFile, 24, 8, 8);
|
||||
TEST_FIELD(MEMORYSTATUSEX, DWORDLONG, ullAvailPageFile, 32, 8, 8);
|
||||
TEST_FIELD(MEMORYSTATUSEX, DWORDLONG, ullTotalVirtual, 40, 8, 8);
|
||||
TEST_FIELD(MEMORYSTATUSEX, DWORDLONG, ullAvailVirtual, 48, 8, 8);
|
||||
TEST_FIELD(MEMORYSTATUSEX, DWORDLONG, ullAvailExtendedVirtual, 56, 8, 8);
|
||||
}
|
||||
|
||||
static void test_pack_OFSTRUCT(void)
|
||||
{
|
||||
/* OFSTRUCT (pack 4) */
|
||||
|
@ -1060,6 +1089,17 @@ static void test_pack_WIN32_FIND_DATAW(void)
|
|||
TEST_FIELD(WIN32_FIND_DATAW, WCHAR[14], cAlternateFileName, 564, 28, 2);
|
||||
}
|
||||
|
||||
static void test_pack_WIN32_STREAM_ID(void)
|
||||
{
|
||||
/* WIN32_STREAM_ID (pack 8) */
|
||||
TEST_TYPE(WIN32_STREAM_ID, 24, 8);
|
||||
TEST_FIELD(WIN32_STREAM_ID, DWORD, dwStreamId, 0, 4, 4);
|
||||
TEST_FIELD(WIN32_STREAM_ID, DWORD, dwStreamAttributes, 4, 4, 4);
|
||||
TEST_FIELD(WIN32_STREAM_ID, LARGE_INTEGER, Size, 8, 8, 8);
|
||||
TEST_FIELD(WIN32_STREAM_ID, DWORD, dwStreamNameSize, 16, 4, 4);
|
||||
TEST_FIELD(WIN32_STREAM_ID, WCHAR[ANYSIZE_ARRAY], cStreamName, 20, 2, 2);
|
||||
}
|
||||
|
||||
static void test_pack(void)
|
||||
{
|
||||
test_pack_ACTCTXA();
|
||||
|
@ -1099,6 +1139,7 @@ static void test_pack(void)
|
|||
test_pack_LPHW_PROFILE_INFOW();
|
||||
test_pack_LPLONG();
|
||||
test_pack_LPMEMORYSTATUS();
|
||||
test_pack_LPMEMORYSTATUSEX();
|
||||
test_pack_LPOFSTRUCT();
|
||||
test_pack_LPOSVERSIONINFOA();
|
||||
test_pack_LPOSVERSIONINFOEXA();
|
||||
|
@ -1119,7 +1160,9 @@ static void test_pack(void)
|
|||
test_pack_LPWIN32_FILE_ATTRIBUTE_DATA();
|
||||
test_pack_LPWIN32_FIND_DATAA();
|
||||
test_pack_LPWIN32_FIND_DATAW();
|
||||
test_pack_LPWIN32_STREAM_ID();
|
||||
test_pack_MEMORYSTATUS();
|
||||
test_pack_MEMORYSTATUSEX();
|
||||
test_pack_OFSTRUCT();
|
||||
test_pack_OSVERSIONINFOA();
|
||||
test_pack_OSVERSIONINFOEXA();
|
||||
|
@ -1170,6 +1213,7 @@ static void test_pack(void)
|
|||
test_pack_WIN32_FILE_ATTRIBUTE_DATA();
|
||||
test_pack_WIN32_FIND_DATAA();
|
||||
test_pack_WIN32_FIND_DATAW();
|
||||
test_pack_WIN32_STREAM_ID();
|
||||
}
|
||||
|
||||
START_TEST(generated)
|
||||
|
|
|
@ -825,6 +825,18 @@ static void test_pack_IMAGE_VXD_HEADER(void)
|
|||
TEST_FIELD(IMAGE_VXD_HEADER, WORD, e32_ddkver, 194, 2, 2);
|
||||
}
|
||||
|
||||
static void test_pack_IO_COUNTERS(void)
|
||||
{
|
||||
/* IO_COUNTERS (pack 8) */
|
||||
TEST_TYPE(IO_COUNTERS, 48, 8);
|
||||
TEST_FIELD(IO_COUNTERS, ULONGLONG, ReadOperationCount, 0, 8, 8);
|
||||
TEST_FIELD(IO_COUNTERS, ULONGLONG, WriteOperationCount, 8, 8, 8);
|
||||
TEST_FIELD(IO_COUNTERS, ULONGLONG, OtherOperationCount, 16, 8, 8);
|
||||
TEST_FIELD(IO_COUNTERS, ULONGLONG, ReadTransferCount, 24, 8, 8);
|
||||
TEST_FIELD(IO_COUNTERS, ULONGLONG, WriteTransferCount, 32, 8, 8);
|
||||
TEST_FIELD(IO_COUNTERS, ULONGLONG, OtherTransferCount, 40, 8, 8);
|
||||
}
|
||||
|
||||
static void test_pack_LANGID(void)
|
||||
{
|
||||
/* LANGID */
|
||||
|
@ -1253,6 +1265,13 @@ static void test_pack_PIMAGE_VXD_HEADER(void)
|
|||
TEST_TYPE_POINTER(PIMAGE_VXD_HEADER, 196, 2);
|
||||
}
|
||||
|
||||
static void test_pack_PIO_COUNTERS(void)
|
||||
{
|
||||
/* PIO_COUNTERS */
|
||||
TEST_TYPE(PIO_COUNTERS, 4, 4);
|
||||
TEST_TYPE_POINTER(PIO_COUNTERS, 48, 8);
|
||||
}
|
||||
|
||||
static void test_pack_PISECURITY_DESCRIPTOR(void)
|
||||
{
|
||||
/* PISECURITY_DESCRIPTOR */
|
||||
|
@ -2127,6 +2146,7 @@ static void test_pack(void)
|
|||
test_pack_INT64();
|
||||
test_pack_INT8();
|
||||
test_pack_INT_PTR();
|
||||
test_pack_IO_COUNTERS();
|
||||
test_pack_LANGID();
|
||||
test_pack_LARGE_INTEGER();
|
||||
test_pack_LCID();
|
||||
|
@ -2201,6 +2221,7 @@ static void test_pack(void)
|
|||
test_pack_PIMAGE_TLS_CALLBACK();
|
||||
test_pack_PIMAGE_TLS_DIRECTORY();
|
||||
test_pack_PIMAGE_VXD_HEADER();
|
||||
test_pack_PIO_COUNTERS();
|
||||
test_pack_PISECURITY_DESCRIPTOR();
|
||||
test_pack_PISECURITY_DESCRIPTOR_RELATIVE();
|
||||
test_pack_PISID();
|
||||
|
|
|
@ -456,17 +456,19 @@ typedef struct tagMEMORYSTATUS
|
|||
SIZE_T dwAvailVirtual;
|
||||
} MEMORYSTATUS, *LPMEMORYSTATUS;
|
||||
|
||||
#include <pshpack8.h>
|
||||
typedef struct tagMEMORYSTATUSEX {
|
||||
DWORD dwLength;
|
||||
DWORD dwMemoryLoad;
|
||||
DWORDLONG ullTotalPhys;
|
||||
DWORDLONG ullAvailPhys;
|
||||
DWORDLONG ullTotalPageFile;
|
||||
DWORDLONG ullAvailPageFile;
|
||||
DWORDLONG ullTotalVirtual;
|
||||
DWORDLONG ullAvailVirtual;
|
||||
DWORDLONG ullAvailExtendedVirtual;
|
||||
DWORDLONG DECLSPEC_ALIGN(8) ullTotalPhys;
|
||||
DWORDLONG DECLSPEC_ALIGN(8) ullAvailPhys;
|
||||
DWORDLONG DECLSPEC_ALIGN(8) ullTotalPageFile;
|
||||
DWORDLONG DECLSPEC_ALIGN(8) ullAvailPageFile;
|
||||
DWORDLONG DECLSPEC_ALIGN(8) ullTotalVirtual;
|
||||
DWORDLONG DECLSPEC_ALIGN(8) ullAvailVirtual;
|
||||
DWORDLONG DECLSPEC_ALIGN(8) ullAvailExtendedVirtual;
|
||||
} MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
|
||||
#include <poppack.h>
|
||||
|
||||
|
||||
typedef struct _SYSTEMTIME{
|
||||
|
@ -1134,13 +1136,15 @@ DECL_WINELIB_TYPE_AW(LPHW_PROFILE_INFO)
|
|||
#define STREAM_CONTAINS_PROPERTIES 4
|
||||
#define STREAM_SPARSE_ATTRIBUTE 8
|
||||
|
||||
#include <pshpack8.h>
|
||||
typedef struct _WIN32_STREAM_ID {
|
||||
DWORD dwStreamId;
|
||||
DWORD dwStreamAttributes;
|
||||
LARGE_INTEGER Size;
|
||||
LARGE_INTEGER DECLSPEC_ALIGN(8) Size;
|
||||
DWORD dwStreamNameSize;
|
||||
WCHAR cStreamName[ANYSIZE_ARRAY];
|
||||
} WIN32_STREAM_ID, *LPWIN32_STREAM_ID;
|
||||
#include <poppack.h>
|
||||
|
||||
|
||||
/* GetBinaryType return values.
|
||||
|
|
|
@ -3548,15 +3548,16 @@ typedef struct _RTL_CRITICAL_SECTION {
|
|||
|
||||
typedef VOID (NTAPI * WAITORTIMERCALLBACKFUNC) (PVOID, BOOLEAN );
|
||||
|
||||
#include <pshpack8.h>
|
||||
typedef struct _IO_COUNTERS {
|
||||
ULONGLONG ReadOperationCount;
|
||||
ULONGLONG WriteOperationCount;
|
||||
ULONGLONG OtherOperationCount;
|
||||
ULONGLONG ReadTransferCount;
|
||||
ULONGLONG WriteTransferCount;
|
||||
ULONGLONG OtherTransferCount;
|
||||
} IO_COUNTERS;
|
||||
typedef IO_COUNTERS *PIO_COUNTERS;
|
||||
ULONGLONG DECLSPEC_ALIGN(8) ReadOperationCount;
|
||||
ULONGLONG DECLSPEC_ALIGN(8) WriteOperationCount;
|
||||
ULONGLONG DECLSPEC_ALIGN(8) OtherOperationCount;
|
||||
ULONGLONG DECLSPEC_ALIGN(8) ReadTransferCount;
|
||||
ULONGLONG DECLSPEC_ALIGN(8) WriteTransferCount;
|
||||
ULONGLONG DECLSPEC_ALIGN(8) OtherTransferCount;
|
||||
} IO_COUNTERS, *PIO_COUNTERS;
|
||||
#include <poppack.h>
|
||||
|
||||
typedef struct {
|
||||
DWORD dwOSVersionInfoSize;
|
||||
|
|
|
@ -522,7 +522,7 @@ LPHW_PROFILE_INFOW
|
|||
!LPLDT_ENTRY
|
||||
LPLONG
|
||||
LPMEMORYSTATUS
|
||||
!LPMEMORYSTATUSEX
|
||||
LPMEMORYSTATUSEX
|
||||
LPOFSTRUCT
|
||||
LPOSVERSIONINFOA
|
||||
LPOSVERSIONINFOEXA
|
||||
|
@ -547,7 +547,7 @@ LPWIN32_FIND_DATAA
|
|||
LPWIN32_FIND_DATAW
|
||||
!LPWIN32_STREAM_ID
|
||||
MEMORYSTATUS
|
||||
!MEMORYSTATUSEX
|
||||
MEMORYSTATUSEX
|
||||
OFSTRUCT
|
||||
OSVERSIONINFOA
|
||||
OSVERSIONINFOEXA
|
||||
|
@ -603,7 +603,7 @@ WAITORTIMERCALLBACK
|
|||
WIN32_FILE_ATTRIBUTE_DATA
|
||||
WIN32_FIND_DATAA
|
||||
WIN32_FIND_DATAW
|
||||
!WIN32_STREAM_ID
|
||||
WIN32_STREAM_ID
|
||||
|
||||
%%%dlls/ntdll/tests
|
||||
|
||||
|
@ -706,7 +706,7 @@ INT32
|
|||
INT64
|
||||
INT8
|
||||
INT_PTR
|
||||
!IO_COUNTERS
|
||||
IO_COUNTERS
|
||||
LANGID
|
||||
LARGE_INTEGER
|
||||
LCID
|
||||
|
@ -795,7 +795,7 @@ PIMAGE_SEPARATE_DEBUG_HEADER
|
|||
PIMAGE_TLS_CALLBACK
|
||||
PIMAGE_TLS_DIRECTORY
|
||||
PIMAGE_VXD_HEADER
|
||||
!PIO_COUNTERS
|
||||
PIO_COUNTERS
|
||||
PISECURITY_DESCRIPTOR
|
||||
PISECURITY_DESCRIPTOR_RELATIVE
|
||||
PISID
|
||||
|
|
Loading…
Reference in New Issue