Fixed mismatches between the Wine headers and the Microsoft headers.
This commit is contained in:
parent
2c8e149fe8
commit
1298eb4053
|
@ -757,7 +757,14 @@ BOOL WINAPI ClearCommError(
|
|||
|
||||
if (lpStat)
|
||||
{
|
||||
lpStat->status = 0;
|
||||
lpStat->fCtsHold = 0;
|
||||
lpStat->fDsrHold = 0;
|
||||
lpStat->fRlsdHold = 0;
|
||||
lpStat->fXoffHold = 0;
|
||||
lpStat->fXoffSent = 0;
|
||||
lpStat->fEof = 0;
|
||||
lpStat->fTxim = 0;
|
||||
lpStat->fReserved = 0;
|
||||
|
||||
#ifdef TIOCOUTQ
|
||||
if(ioctl(fd, TIOCOUTQ, &lpStat->cbOutQue))
|
||||
|
|
|
@ -1326,7 +1326,7 @@ found:
|
|||
FileTimeToDosDateTime( &filetime, &filedatetime[0], &filedatetime[1] );
|
||||
if ((mode & OF_VERIFY) && (mode & OF_REOPEN))
|
||||
{
|
||||
if (memcmp( ofs->reserved, filedatetime, sizeof(ofs->reserved) ))
|
||||
if (ofs->Reserved1 != filedatetime[0] || ofs->Reserved2 != filedatetime[1] )
|
||||
{
|
||||
CloseHandle( handle );
|
||||
WARN("(%s): OF_VERIFY failed\n", name );
|
||||
|
@ -1335,7 +1335,8 @@ found:
|
|||
goto error;
|
||||
}
|
||||
}
|
||||
memcpy( ofs->reserved, filedatetime, sizeof(ofs->reserved) );
|
||||
ofs->Reserved1 = filedatetime[0];
|
||||
ofs->Reserved2 = filedatetime[1];
|
||||
|
||||
success: /* We get here if the open was successful */
|
||||
TRACE("(%s): OK, return = %x\n", name, handle );
|
||||
|
|
|
@ -145,7 +145,8 @@ typedef struct _OFSTRUCT
|
|||
BYTE cBytes;
|
||||
BYTE fFixedDisk;
|
||||
WORD nErrCode;
|
||||
BYTE reserved[4];
|
||||
WORD Reserved1;
|
||||
WORD Reserved2;
|
||||
BYTE szPathName[OFS_MAXPATHNAME];
|
||||
} OFSTRUCT, *POFSTRUCT, *LPOFSTRUCT;
|
||||
|
||||
|
@ -651,7 +652,7 @@ typedef struct _SYSTEM_POWER_STATUS
|
|||
BYTE ACLineStatus;
|
||||
BYTE BatteryFlag;
|
||||
BYTE BatteryLifePercent;
|
||||
BYTE reserved;
|
||||
BYTE Reserved1;
|
||||
DWORD BatteryLifeTime;
|
||||
DWORD BatteryFullLifeTime;
|
||||
} SYSTEM_POWER_STATUS, *LPSYSTEM_POWER_STATUS;
|
||||
|
@ -923,7 +924,14 @@ ULONGLONG WINAPI VerSetConditionMask(ULONGLONG,DWORD,BYTE);
|
|||
|
||||
typedef struct tagCOMSTAT
|
||||
{
|
||||
DWORD status;
|
||||
DWORD fCtsHold : 1;
|
||||
DWORD fDsrHold : 1;
|
||||
DWORD fRlsdHold : 1;
|
||||
DWORD fXoffHold : 1;
|
||||
DWORD fXoffSent : 1;
|
||||
DWORD fEof : 1;
|
||||
DWORD fTxim : 1;
|
||||
DWORD fReserved : 25;
|
||||
DWORD cbInQue;
|
||||
DWORD cbOutQue;
|
||||
} COMSTAT, *LPCOMSTAT;
|
||||
|
@ -1938,14 +1946,23 @@ int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int);
|
|||
#define DOCKINFO_USER_UNDOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_UNDOCKED)
|
||||
#define DOCKINFO_USER_DOCKED (DOCKINFO_USER_SUPPLIED | DOCKINFO_DOCKED)
|
||||
|
||||
typedef struct HW_PROFILE_INFOAtag {
|
||||
typedef struct tagHW_PROFILE_INFOA {
|
||||
DWORD dwDockInfo;
|
||||
CHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
|
||||
CHAR szHwProfileName[MAX_PROFILE_LEN];
|
||||
} HW_PROFILE_INFOA, *LPHW_PROFILE_INFOA;
|
||||
|
||||
typedef struct tagHW_PROFILE_INFOW {
|
||||
DWORD dwDockInfo;
|
||||
WCHAR szHwProfileGuid[HW_PROFILE_GUIDLEN];
|
||||
WCHAR szHwProfileName[MAX_PROFILE_LEN];
|
||||
} HW_PROFILE_INFOW, *LPHW_PROFILE_INFOW;
|
||||
|
||||
DECL_WINELIB_TYPE_AW(HW_PROFILE_INFO)
|
||||
DECL_WINELIB_TYPE_AW(LPHW_PROFILE_INFO)
|
||||
|
||||
/* Stream data structures and defines */
|
||||
/*the types of backup data -- WIN32_STREAM_ID.dwStreamID below*/
|
||||
/*the types of backup data -- WIN32_STREAM_ID.dwStreamId below*/
|
||||
#define BACKUP_INVALID 0
|
||||
#define BACKUP_DATA 1
|
||||
#define BACKUP_EA_DATA 2
|
||||
|
@ -1965,7 +1982,7 @@ typedef struct HW_PROFILE_INFOAtag {
|
|||
#define STREAM_SPARSE_ATTRIBUTE 8
|
||||
|
||||
typedef struct _WIN32_STREAM_ID {
|
||||
DWORD dwStreamID;
|
||||
DWORD dwStreamId;
|
||||
DWORD dwStreamAttributes;
|
||||
LARGE_INTEGER Size;
|
||||
DWORD dwStreamNameSize;
|
||||
|
|
|
@ -1694,7 +1694,7 @@ typedef struct
|
|||
LONG bV4Height;
|
||||
WORD bV4Planes;
|
||||
WORD bV4BitCount;
|
||||
DWORD bV4Compression;
|
||||
DWORD bV4V4Compression;
|
||||
DWORD bV4SizeImage;
|
||||
LONG bV4XPelsPerMeter;
|
||||
LONG bV4YPelsPerMeter;
|
||||
|
@ -1949,15 +1949,10 @@ typedef struct {
|
|||
DWORD nPalEntries;
|
||||
SIZEL szlDevice;
|
||||
SIZEL szlMillimeters;
|
||||
|
||||
/* Fields for winver >= win95 */
|
||||
DWORD cbPixelFormat;
|
||||
DWORD offPixelFormat;
|
||||
DWORD bOpenGL;
|
||||
|
||||
/* Fields for winver >= win98 */
|
||||
SIZEL szlMicrometers;
|
||||
|
||||
} ENHMETAHEADER, *PENHMETAHEADER, *LPENHMETAHEADER;
|
||||
|
||||
typedef struct {
|
||||
|
@ -2170,7 +2165,7 @@ typedef struct {
|
|||
} EMRFILLRGN, *PEMRFILLRGN;
|
||||
|
||||
typedef struct {
|
||||
DWORD signature;
|
||||
DWORD dSignature;
|
||||
DWORD nVersion;
|
||||
DWORD cbData;
|
||||
DWORD offData;
|
||||
|
@ -2256,7 +2251,7 @@ typedef struct {
|
|||
typedef struct {
|
||||
EMR emr;
|
||||
RECTL rclBounds;
|
||||
POINTL aptlDst[3];
|
||||
POINTL aptlDest[3];
|
||||
LONG xSrc;
|
||||
LONG ySrc;
|
||||
LONG cxSrc;
|
||||
|
|
|
@ -1736,6 +1736,7 @@ extern struct _TEB * WINAPI NtCurrentTeb(void);
|
|||
* File formats definitions
|
||||
*/
|
||||
|
||||
#include "pshpack2.h"
|
||||
typedef struct _IMAGE_DOS_HEADER {
|
||||
WORD e_magic; /* 00: MZ Header signature */
|
||||
WORD e_cblp; /* 02: Bytes on last page of file */
|
||||
|
@ -1757,6 +1758,7 @@ typedef struct _IMAGE_DOS_HEADER {
|
|||
WORD e_res2[10]; /* 28: Reserved words */
|
||||
DWORD e_lfanew; /* 3c: Offset to extended header */
|
||||
} IMAGE_DOS_HEADER, *PIMAGE_DOS_HEADER;
|
||||
#include "poppack.h"
|
||||
|
||||
#define IMAGE_DOS_SIGNATURE 0x5A4D /* MZ */
|
||||
#define IMAGE_OS2_SIGNATURE 0x454E /* NE */
|
||||
|
@ -1769,6 +1771,7 @@ typedef struct _IMAGE_DOS_HEADER {
|
|||
* This is the Windows executable (NE) header.
|
||||
* the name IMAGE_OS2_HEADER is misleading, but in the SDK this way.
|
||||
*/
|
||||
#include "pshpack2.h"
|
||||
typedef struct
|
||||
{
|
||||
WORD ne_magic; /* 00 NE signature 'NE' */
|
||||
|
@ -1797,12 +1800,14 @@ typedef struct
|
|||
WORD ne_cres; /* 34 # of resource segments */
|
||||
BYTE ne_exetyp; /* 36 Flags indicating target OS */
|
||||
BYTE ne_flagsothers; /* 37 Additional information flags */
|
||||
WORD fastload_offset; /* 38 Offset to fast load area (should be ne_pretthunks)*/
|
||||
WORD fastload_length; /* 3a Length of fast load area (should be ne_psegrefbytes) */
|
||||
WORD ne_pretthunks; /* 38 Offset to return thunks */
|
||||
WORD ne_psegrefbytes; /* 3a Offset to segment ref. bytes */
|
||||
WORD ne_swaparea; /* 3c Reserved by Microsoft */
|
||||
WORD ne_expver; /* 3e Expected Windows version number */
|
||||
} IMAGE_OS2_HEADER, *PIMAGE_OS2_HEADER;
|
||||
#include "poppack.h"
|
||||
|
||||
#include "pshpack2.h"
|
||||
typedef struct _IMAGE_VXD_HEADER {
|
||||
WORD e32_magic;
|
||||
BYTE e32_border;
|
||||
|
@ -1856,7 +1861,7 @@ typedef struct _IMAGE_VXD_HEADER {
|
|||
WORD e32_devid;
|
||||
WORD e32_ddkver;
|
||||
} IMAGE_VXD_HEADER, *PIMAGE_VXD_HEADER;
|
||||
|
||||
#include "poppack.h"
|
||||
|
||||
/* These defines describe the meanings of the bits in the Characteristics
|
||||
field */
|
||||
|
@ -2325,11 +2330,10 @@ typedef struct _IMAGE_RELOCATION
|
|||
union {
|
||||
DWORD VirtualAddress;
|
||||
DWORD RelocCount;
|
||||
} u;
|
||||
} DUMMYUNIONNAME;
|
||||
DWORD SymbolTableIndex;
|
||||
WORD Type;
|
||||
} IMAGE_RELOCATION;
|
||||
typedef IMAGE_RELOCATION *PIMAGE_RELOCATION;
|
||||
} IMAGE_RELOCATION, *PIMAGE_RELOCATION;
|
||||
|
||||
#include "poppack.h"
|
||||
|
||||
|
@ -3053,8 +3057,10 @@ typedef struct _TOKEN_DEFAULT_DACL {
|
|||
* TOKEN_SOURCEL
|
||||
*/
|
||||
|
||||
#define TOKEN_SOURCE_LENGTH 8
|
||||
|
||||
typedef struct _TOKEN_SOURCE {
|
||||
char Sourcename[8];
|
||||
char SourceName[TOKEN_SOURCE_LENGTH];
|
||||
LUID SourceIdentifier;
|
||||
} TOKEN_SOURCE;
|
||||
|
||||
|
|
|
@ -325,8 +325,8 @@ typedef struct
|
|||
|
||||
typedef struct
|
||||
{
|
||||
HWND hWnd;
|
||||
UINT wMessage;
|
||||
HWND hwnd;
|
||||
UINT message;
|
||||
WPARAM wParam;
|
||||
LPARAM lParam;
|
||||
} HARDWAREHOOKSTRUCT, *PHARDWAREHOOKSTRUCT, *LPHARDWAREHOOKSTRUCT;
|
||||
|
@ -1683,14 +1683,14 @@ typedef struct {
|
|||
typedef struct
|
||||
{
|
||||
DWORD mkSize;
|
||||
CHAR mkKeyList;
|
||||
CHAR mkKeylist;
|
||||
CHAR szKeyphrase[1];
|
||||
} MULTIKEYHELPA, *PMULTIKEYHELPA, *LPMULTIKEYHELPA;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
DWORD mkSize;
|
||||
WCHAR mkKeyList;
|
||||
WCHAR mkKeylist;
|
||||
WCHAR szKeyphrase[1];
|
||||
} MULTIKEYHELPW, *PMULTIKEYHELPW, *LPMULTIKEYHELPW;
|
||||
|
||||
|
|
|
@ -523,8 +523,8 @@ static HMODULE16 NE_LoadExeHeader( HANDLE hFile, LPCSTR path )
|
|||
|
||||
if (ne_header.ne_flagsothers & NE_AFLAGS_FASTLOAD)
|
||||
{
|
||||
fastload_offset=ne_header.fastload_offset << ne_header.ne_align;
|
||||
fastload_length=ne_header.fastload_length << ne_header.ne_align;
|
||||
fastload_offset=ne_header.ne_pretthunks << ne_header.ne_align;
|
||||
fastload_length=ne_header.ne_psegrefbytes << ne_header.ne_align;
|
||||
TRACE("Using fast-load area offset=%x len=%d\n",
|
||||
fastload_offset, fastload_length );
|
||||
if ((fastload = HeapAlloc( GetProcessHeap(), 0, fastload_length )) != NULL)
|
||||
|
|
|
@ -129,7 +129,7 @@ static int DIB_GetBitmapInfo( const BITMAPINFOHEADER *header, DWORD *width,
|
|||
*width = v4hdr->bV4Width;
|
||||
*height = v4hdr->bV4Height;
|
||||
*bpp = v4hdr->bV4BitCount;
|
||||
*compr = v4hdr->bV4Compression;
|
||||
*compr = v4hdr->bV4V4Compression;
|
||||
return 4;
|
||||
}
|
||||
if (header->biSize == sizeof(BITMAPV5HEADER))
|
||||
|
|
|
@ -1346,9 +1346,9 @@ BOOL WINAPI PlayEnhMetaFileRecord(
|
|||
|
||||
SetWorldTransform(hdcSrc, &pPlgBlt->xformSrc);
|
||||
|
||||
pts[0].x = pPlgBlt->aptlDst[0].x; pts[0].y = pPlgBlt->aptlDst[0].y;
|
||||
pts[1].x = pPlgBlt->aptlDst[1].x; pts[1].y = pPlgBlt->aptlDst[1].y;
|
||||
pts[2].x = pPlgBlt->aptlDst[2].x; pts[2].y = pPlgBlt->aptlDst[2].y;
|
||||
pts[0].x = pPlgBlt->aptlDest[0].x; pts[0].y = pPlgBlt->aptlDest[0].y;
|
||||
pts[1].x = pPlgBlt->aptlDest[1].x; pts[1].y = pPlgBlt->aptlDest[1].y;
|
||||
pts[2].x = pPlgBlt->aptlDest[2].x; pts[2].y = pPlgBlt->aptlDest[2].y;
|
||||
|
||||
hBrush = CreateSolidBrush(pPlgBlt->crBkColorSrc);
|
||||
hBrushOld = SelectObject(hdcSrc, hBrush);
|
||||
|
|
|
@ -49,8 +49,8 @@ static void dump_ne_header( const IMAGE_OS2_HEADER *ne )
|
|||
printf( "Non-resident table: %lx\n", ne->ne_nrestab );
|
||||
printf( "Exe type: %x\n", ne->ne_exetyp );
|
||||
printf( "Other flags: %x\n", ne->ne_flagsothers );
|
||||
printf( "Fast load area: %x-%x\n", ne->fastload_offset << ne->ne_align,
|
||||
(ne->fastload_offset+ne->fastload_length) << ne->ne_align );
|
||||
printf( "Fast load area: %x-%x\n", ne->ne_pretthunks << ne->ne_align,
|
||||
(ne->ne_pretthunks+ne->ne_psegrefbytes) << ne->ne_align );
|
||||
printf( "Expected version: %d.%d\n", HIBYTE(ne->ne_expver), LOBYTE(ne->ne_expver) );
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue