Commit 1298eb40 authored by Patrik Stridvall's avatar Patrik Stridvall Committed by Alexandre Julliard

Fixed mismatches between the Wine headers and the Microsoft headers.

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