mirror of
https://gitlab.winehq.org/wine/wine.git
synced 2024-11-19 17:06:04 -07:00
dplayx/tests: Add missing pragma pack directives.
This commit is contained in:
parent
ac1ff67cfd
commit
696ef034db
Notes:
Alexandre Julliard
2024-11-18 23:18:20 +01:00
Approved-by: Alistair Leslie-Hughes (@alesliehughes) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/wine/merge_requests/6829
1 changed files with 34 additions and 0 deletions
|
@ -1224,12 +1224,14 @@ static void checkGameMessage_( int line, GameMessage *message, DPID expectedFrom
|
|||
static unsigned short receiveEnumSessionsRequest_( int line, SOCKET sock, const GUID *expectedAppGuid,
|
||||
const WCHAR *expectedPassword, DWORD expectedFlags )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
EnumSessionsRequest request;
|
||||
WCHAR password[ 256 ];
|
||||
} request;
|
||||
#include "poppack.h"
|
||||
DWORD expectedPasswordSize;
|
||||
unsigned short port;
|
||||
DWORD expectedSize;
|
||||
|
@ -1267,6 +1269,7 @@ static unsigned short receiveEnumSessionsRequest_( int line, SOCKET sock, const
|
|||
#define sendEnumSessionsReply( sock, port, dpsd ) sendEnumSessionsReply_( __LINE__, sock, port, dpsd )
|
||||
static void sendEnumSessionsReply_( int line, SOCKET sock, unsigned short port, const DPSESSIONDESC2 *dpsd )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
|
@ -1295,6 +1298,7 @@ static void sendEnumSessionsReply_( int line, SOCKET sock, unsigned short port,
|
|||
.nameOffset = sizeof( reply.reply ),
|
||||
},
|
||||
};
|
||||
#include "poppack.h"
|
||||
DWORD passwordSize;
|
||||
int wsResult;
|
||||
DWORD size;
|
||||
|
@ -1314,11 +1318,13 @@ static void sendEnumSessionsReply_( int line, SOCKET sock, unsigned short port,
|
|||
#define receiveRequestPlayerId( sock, expectedFlags, flagsTodo ) receiveRequestPlayerId_( __LINE__, sock, expectedFlags, flagsTodo )
|
||||
static unsigned short receiveRequestPlayerId_( int line, SOCKET sock, DWORD expectedFlags )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
RequestPlayerId request;
|
||||
} request;
|
||||
#include "poppack.h"
|
||||
unsigned short port;
|
||||
int wsResult;
|
||||
|
||||
|
@ -1335,6 +1341,7 @@ static unsigned short receiveRequestPlayerId_( int line, SOCKET sock, DWORD expe
|
|||
#define sendRequestPlayerReply( sock, port, id, result ) sendRequestPlayerReply_( __LINE__, sock, port, id, result )
|
||||
static void sendRequestPlayerReply_( int line, SOCKET sock, unsigned short port, DPID id, HRESULT result )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
|
@ -1362,6 +1369,7 @@ static void sendRequestPlayerReply_( int line, SOCKET sock, unsigned short port,
|
|||
.result = result,
|
||||
},
|
||||
};
|
||||
#include "poppack.h"
|
||||
int wsResult;
|
||||
|
||||
wsResult = send( sock, (char *) &reply, sizeof( reply ), 0 );
|
||||
|
@ -1374,11 +1382,13 @@ static unsigned short receiveAddForwardRequest_( int line, SOCKET sock, DPID exp
|
|||
const WCHAR *expectedPassword, DWORD expectedTickCount,
|
||||
unsigned short *udpPort )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
AddForwardRequest request;
|
||||
} request;
|
||||
#include "poppack.h"
|
||||
DWORD expectedPasswordSize;
|
||||
WCHAR password[ 256 ];
|
||||
unsigned short port;
|
||||
|
@ -1427,6 +1437,7 @@ static void sendSuperEnumPlayersReply_( int line, SOCKET sock, unsigned short tc
|
|||
{
|
||||
#define SHORT_NAME L"short name"
|
||||
#define LONG_NAME L"long name"
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
|
@ -1545,6 +1556,7 @@ static void sendSuperEnumPlayersReply_( int line, SOCKET sock, unsigned short tc
|
|||
},
|
||||
},
|
||||
};
|
||||
#include "poppack.h"
|
||||
#undef LONG_NAME
|
||||
#undef SHORT_NAME
|
||||
int wsResult;
|
||||
|
@ -1561,6 +1573,7 @@ static void sendSuperEnumPlayersReply_( int line, SOCKET sock, unsigned short tc
|
|||
#define sendAddForwardReply( sock, port, result ) sendAddForwardReply_( __LINE__, sock, port, result )
|
||||
static void sendAddForwardReply_( int line, SOCKET sock, unsigned short port, HRESULT result )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
|
@ -1587,6 +1600,7 @@ static void sendAddForwardReply_( int line, SOCKET sock, unsigned short port, HR
|
|||
.result = result,
|
||||
},
|
||||
};
|
||||
#include "poppack.h"
|
||||
int wsResult;
|
||||
|
||||
wsResult = send( sock, (char *) &reply, sizeof( reply ), 0 );
|
||||
|
@ -1596,6 +1610,7 @@ static void sendAddForwardReply_( int line, SOCKET sock, unsigned short port, HR
|
|||
#define sendAddForward( sock, port, tcpPort, udpPort ) sendAddForward_( __LINE__, sock, port, tcpPort, udpPort )
|
||||
static void sendAddForward_( int line, SOCKET sock, unsigned short port, unsigned short tcpPort, unsigned short udpPort )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
|
@ -1653,6 +1668,7 @@ static void sendAddForward_( int line, SOCKET sock, unsigned short port, unsigne
|
|||
},
|
||||
},
|
||||
};
|
||||
#include "poppack.h"
|
||||
|
||||
int wsResult;
|
||||
|
||||
|
@ -1663,11 +1679,13 @@ static void sendAddForward_( int line, SOCKET sock, unsigned short port, unsigne
|
|||
#define receiveAddForwardAck( sock, expectedPlayerId ) receiveAddForwardAck_( __LINE__, sock, expectedPlayerId )
|
||||
static unsigned short receiveAddForwardAck_( int line, SOCKET sock, DPID expectedPlayerId )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
AddForwardAck request;
|
||||
} request;
|
||||
#include "poppack.h"
|
||||
unsigned short port;
|
||||
int wsResult;
|
||||
|
||||
|
@ -1688,11 +1706,13 @@ static unsigned short receiveCreatePlayer_( int line, SOCKET sock, DPID expected
|
|||
const WCHAR *expectedShortName, const WCHAR *expectedLongName,
|
||||
void *expectedPlayerData, DWORD expectedPlayerDataSize )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
CreatePlayer request;
|
||||
} request;
|
||||
#include "poppack.h"
|
||||
DWORD expectedShortNameSize;
|
||||
DWORD expectedLongNameSize;
|
||||
WCHAR shortName[ 256 ];
|
||||
|
@ -1775,6 +1795,7 @@ static unsigned short receiveCreatePlayer_( int line, SOCKET sock, DPID expected
|
|||
static void sendCreatePlayer_( int line, SOCKET sock, unsigned short tcpPort, unsigned short udpPort,
|
||||
const WCHAR *shortName, const WCHAR *longName, void *playerData, DWORD playerDataSize )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
|
@ -1820,6 +1841,7 @@ static void sendCreatePlayer_( int line, SOCKET sock, unsigned short tcpPort, un
|
|||
},
|
||||
},
|
||||
};
|
||||
#include "poppack.h"
|
||||
SpData spData = {
|
||||
.tcpAddr.sin_family = AF_INET,
|
||||
.tcpAddr.sin_port = htons( tcpPort ),
|
||||
|
@ -1877,12 +1899,14 @@ static void sendCreatePlayer_( int line, SOCKET sock, unsigned short tcpPort, un
|
|||
static unsigned short receiveGuaranteedGameMessage_( int line, SOCKET sock, DPID expectedFromId, DPID expectedToId,
|
||||
void *expectedData, DWORD expectedDataSize )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
GameMessage request;
|
||||
BYTE data[ 256 ];
|
||||
} request;
|
||||
#include "poppack.h"
|
||||
unsigned short port;
|
||||
int wsResult;
|
||||
|
||||
|
@ -1903,11 +1927,13 @@ static unsigned short receiveGuaranteedGameMessage_( int line, SOCKET sock, DPID
|
|||
static void receiveGameMessage_( int line, SOCKET sock, DPID expectedFromId, DPID expectedToId, void *expectedData,
|
||||
DWORD expectedDataSize )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
GameMessage request;
|
||||
BYTE data[ 256 ];
|
||||
} request;
|
||||
#include "poppack.h"
|
||||
int wsResult;
|
||||
|
||||
DWORD expectedSize = sizeof( request.request ) + expectedDataSize;
|
||||
|
@ -1924,6 +1950,7 @@ static void receiveGameMessage_( int line, SOCKET sock, DPID expectedFromId, DPI
|
|||
static void sendGuaranteedGameMessage_( int line, SOCKET sock, unsigned short port, DPID fromId, DPID toId, void *data,
|
||||
DWORD dataSize )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
|
@ -1945,6 +1972,7 @@ static void sendGuaranteedGameMessage_( int line, SOCKET sock, unsigned short po
|
|||
.toId = toId,
|
||||
}
|
||||
};
|
||||
#include "poppack.h"
|
||||
int wsResult;
|
||||
|
||||
wsResult = send( sock, (char *) &request, sizeof( request ), 0 );
|
||||
|
@ -1958,6 +1986,7 @@ static void sendGuaranteedGameMessage_( int line, SOCKET sock, unsigned short po
|
|||
sendGameMessage_( __LINE__, sock, fromId, toId, data, dataSize )
|
||||
static void sendGameMessage_( int line, SOCKET sock, DPID fromId, DPID toId, void *data, DWORD dataSize )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
GameMessage request;
|
||||
|
@ -1970,6 +1999,7 @@ static void sendGameMessage_( int line, SOCKET sock, DPID fromId, DPID toId, voi
|
|||
.toId = toId,
|
||||
}
|
||||
};
|
||||
#include "poppack.h"
|
||||
int wsResult;
|
||||
DWORD size;
|
||||
|
||||
|
@ -1985,6 +2015,7 @@ static void sendGameMessage_( int line, SOCKET sock, DPID fromId, DPID toId, voi
|
|||
sendPing_( __LINE__, sock, port, fromId, tickCount )
|
||||
static void sendPing_( int line, SOCKET sock, unsigned short port, DPID fromId, DWORD tickCount )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
|
@ -2012,6 +2043,7 @@ static void sendPing_( int line, SOCKET sock, unsigned short port, DPID fromId,
|
|||
.tickCount = tickCount,
|
||||
}
|
||||
};
|
||||
#include "poppack.h"
|
||||
int wsResult;
|
||||
|
||||
wsResult = send( sock, (char *) &request, sizeof( request ), 0 );
|
||||
|
@ -2022,11 +2054,13 @@ static void sendPing_( int line, SOCKET sock, unsigned short port, DPID fromId,
|
|||
receivePingReply_( __LINE__, sock, expectedFromId, expectedTickCount )
|
||||
static unsigned short receivePingReply_( int line, SOCKET sock, DPID expectedFromId, DWORD expectedTickCount )
|
||||
{
|
||||
#include "pshpack1.h"
|
||||
struct
|
||||
{
|
||||
SpHeader spHeader;
|
||||
Ping request;
|
||||
} request;
|
||||
#include "poppack.h"
|
||||
unsigned short port;
|
||||
int wsResult;
|
||||
|
||||
|
|
Loading…
Reference in a new issue