mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-09-03 12:23:25 +00:00
2003-08-24 Casper S. Hornstrup <[email protected]>
* include/structs.h: Apply packed attribute to the typedef, not the type's name. * include/ntos/keyboard.h: Ditto. * include/ntos/tss.h: Ditto. * include/win32k/cursoricon.h: Ditto. * include/win32k/math.h: Include the compiler's math.h for builtins. * ntoskrnl/nt/vdm.c (NtEarlyInitVdm): Avoid warning when compiling using GCC 3.4. svn path=/trunk/; revision=5812
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
2003-08-24 Casper S. Hornstrup <[email protected]>
|
||||
|
||||
* include/structs.h: Apply packed attribute to the typedef, not the
|
||||
type's name.
|
||||
* include/ntos/keyboard.h: Ditto.
|
||||
* include/ntos/tss.h: Ditto.
|
||||
* include/win32k/cursoricon.h: Ditto.
|
||||
* include/win32k/math.h: Include the compiler's math.h for builtins.
|
||||
* ntoskrnl/nt/vdm.c (NtEarlyInitVdm): Avoid warning when compiling using
|
||||
GCC 3.4.
|
||||
|
||||
2003-08-23 Casper S. Hornstrup <[email protected]>
|
||||
|
||||
* apps/tests/tcpsvr/tcpsvr.c (main): Fix multiline string constant.
|
||||
|
||||
@@ -95,7 +95,7 @@ typedef struct _KEY_EVENT_RECORD
|
||||
CHAR AsciiChar;
|
||||
} uChar;
|
||||
DWORD dwControlKeyState;
|
||||
} KEY_EVENT_RECORD PACKED;
|
||||
} PACKED KEY_EVENT_RECORD;
|
||||
|
||||
typedef struct _MOUSE_EVENT_RECORD
|
||||
{
|
||||
|
||||
@@ -52,7 +52,7 @@ typedef struct _KTSSNOIOPM
|
||||
USHORT IoMapBase;
|
||||
/* no interrupt redirection map */
|
||||
UCHAR IoBitmap[1];
|
||||
} KTSSNOIOPM __attribute__((packed));
|
||||
} PACKED KTSSNOIOPM;
|
||||
|
||||
typedef struct _KTSS
|
||||
{
|
||||
@@ -96,7 +96,7 @@ typedef struct _KTSS
|
||||
USHORT IoMapBase;
|
||||
/* no interrupt redirection map */
|
||||
UCHAR IoBitmap[8193];
|
||||
} KTSS __attribute__((packed));
|
||||
} PACKED KTSS;
|
||||
|
||||
#endif /* not __ASM__ */
|
||||
|
||||
|
||||
@@ -226,7 +226,7 @@ typedef struct tagBITMAPFILEHEADER {
|
||||
WORD bfReserved1;
|
||||
WORD bfReserved2;
|
||||
DWORD bfOffBits;
|
||||
} BITMAPFILEHEADER __attribute__((packed));
|
||||
} PACKED BITMAPFILEHEADER;
|
||||
|
||||
typedef struct tagBITMAPINFOHEADER {
|
||||
DWORD biSize;
|
||||
@@ -1087,7 +1087,7 @@ typedef struct {
|
||||
short cx;
|
||||
short cy;
|
||||
WORD id;
|
||||
} DLGITEMTEMPLATE PACKED;
|
||||
} PACKED DLGITEMTEMPLATE;
|
||||
|
||||
typedef DLGITEMTEMPLATE *LPDLGITEMTEMPLATE;
|
||||
typedef DLGITEMTEMPLATE *PDLGITEMTEMPLATE;
|
||||
@@ -1100,7 +1100,7 @@ typedef struct {
|
||||
short y;
|
||||
short cx;
|
||||
short cy;
|
||||
} DLGTEMPLATE PACKED;
|
||||
} PACKED DLGTEMPLATE;
|
||||
|
||||
typedef DLGTEMPLATE *LPDLGTEMPLATE;
|
||||
typedef const DLGTEMPLATE *LPCDLGTEMPLATE;
|
||||
@@ -2856,7 +2856,7 @@ typedef struct tagMETAHEADER {
|
||||
WORD mtNoObjects;
|
||||
DWORD mtMaxRecord;
|
||||
WORD mtNoParameters;
|
||||
} METAHEADER PACKED;
|
||||
} PACKED METAHEADER;
|
||||
|
||||
typedef struct tagMETARECORD {
|
||||
DWORD rdSize;
|
||||
@@ -3912,7 +3912,7 @@ typedef struct tagPDA {
|
||||
LPCSTR lpSetupTemplateName;
|
||||
HANDLE hPrintTemplate;
|
||||
HANDLE hSetupTemplate;
|
||||
} PRINTDLGA PACKED, *LPPRINTDLGA PACKED;
|
||||
} PACKED PRINTDLGA, *LPPRINTDLGA;
|
||||
|
||||
typedef struct tagPDW {
|
||||
DWORD lStructSize;
|
||||
@@ -3934,7 +3934,7 @@ typedef struct tagPDW {
|
||||
LPCWSTR lpSetupTemplateName;
|
||||
HANDLE hPrintTemplate;
|
||||
HANDLE hSetupTemplate;
|
||||
} PRINTDLGW PACKED, *LPPRINTDLGW PACKED;
|
||||
} PACKED PRINTDLGW, *LPPRINTDLGW;
|
||||
|
||||
typedef_tident(PRINTDLG)
|
||||
typedef_tident(LPPRINTDLG)
|
||||
|
||||
@@ -13,7 +13,7 @@ typedef struct _ICONIMAGE
|
||||
RGBQUAD icColors[1]; // Color table
|
||||
BYTE icXOR[1]; // DIB bits for XOR mask
|
||||
BYTE icAND[1]; // DIB bits for AND mask
|
||||
} ICONIMAGE, *LPICONIMAGE __attribute__((packed));
|
||||
} PACKED ICONIMAGE, *LPICONIMAGE;
|
||||
|
||||
typedef struct _CURSORIMAGE
|
||||
{
|
||||
@@ -21,7 +21,7 @@ typedef struct _CURSORIMAGE
|
||||
RGBQUAD icColors[1]; // Color table
|
||||
BYTE icXOR[1]; // DIB bits for XOR mask
|
||||
BYTE icAND[1]; // DIB bits for AND mask
|
||||
} CURSORIMAGE, *LPCURSORIMAGE __attribute__((packed));
|
||||
} PACKED CURSORIMAGE, *LPCURSORIMAGE;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -29,25 +29,25 @@ typedef struct
|
||||
BYTE bHeight;
|
||||
BYTE bColorCount;
|
||||
BYTE bReserved;
|
||||
} ICONRESDIR __attribute__((packed));
|
||||
} PACKED ICONRESDIR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WORD wWidth;
|
||||
WORD wHeight;
|
||||
} CURSORRESDIR __attribute__((packed));
|
||||
} PACKED CURSORRESDIR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WORD wPlanes; // Number of Color Planes in the XOR image
|
||||
WORD wBitCount; // Bits per pixel in the XOR image
|
||||
} ICONDIR __attribute__((packed));
|
||||
} PACKED ICONDIR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WORD wXHotspot; // Number of Color Planes in the XOR image
|
||||
WORD wYHotspot; // Bits per pixel in the XOR image
|
||||
} CURSORDIR __attribute__((packed));
|
||||
} PACKED CURSORDIR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -61,7 +61,7 @@ typedef struct
|
||||
} Info;
|
||||
DWORD dwBytesInRes; // How many bytes in this resource?
|
||||
DWORD dwImageOffset; // Where in the file is this image?
|
||||
} CURSORICONDIRENTRY __attribute__((packed));
|
||||
} PACKED CURSORICONDIRENTRY;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -69,7 +69,7 @@ typedef struct
|
||||
WORD idType; // Resource Type (1 for icons, 0 for cursors)
|
||||
WORD idCount; // How many images?
|
||||
CURSORICONDIRENTRY idEntries[1] __attribute__((packed)); // An entry for idCount number of images
|
||||
} CURSORICONDIR __attribute__((packed));
|
||||
} PACKED CURSORICONDIR;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@@ -81,15 +81,15 @@ typedef struct
|
||||
WORD wBitCount; // Bits per pixel
|
||||
DWORD dwBytesInRes; // how many bytes in this resource?
|
||||
WORD nID; // the ID
|
||||
} GRPCURSORICONDIRENTRY __attribute__((packed));
|
||||
} PACKED GRPCURSORICONDIRENTRY;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
WORD idReserved; // Reserved (must be 0)
|
||||
WORD idType; // Resource type (1 for icons)
|
||||
WORD idCount; // How many images?
|
||||
GRPCURSORICONDIRENTRY idEntries[1] __attribute__((packed)); // The entries for each image
|
||||
} GRPCURSORICONDIR __attribute__((packed));
|
||||
GRPCURSORICONDIRENTRY idEntries[1] PACKED; // The entries for each image
|
||||
} PACKED GRPCURSORICONDIR;
|
||||
|
||||
/* GDI logical Icon/Cursor object */
|
||||
typedef struct _ICONCURSOROBJ
|
||||
|
||||
@@ -18,9 +18,9 @@
|
||||
* DISCLAMED. This includes but is not limited to warranties of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*
|
||||
* $Revision: 1.2 $
|
||||
* $Author: robd $
|
||||
* $Date: 2002/11/24 18:24:52 $
|
||||
* $Revision: 1.3 $
|
||||
* $Author: chorns $
|
||||
* $Date: 2003/08/24 10:00:12 $
|
||||
*
|
||||
*/
|
||||
// added modfl
|
||||
@@ -28,6 +28,8 @@
|
||||
#ifndef _MATH_H_
|
||||
#define _MATH_H_
|
||||
|
||||
#include_next <math.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
@@ -142,7 +144,10 @@ double _yn (int n, double x);
|
||||
* Non-underscored versions of non-ANSI functions. These reside in
|
||||
* liboldnames.a. Provided for extra portability.
|
||||
*/
|
||||
#if 0
|
||||
/* GCC 3.4 warns that this is not equal to it's internal definition for cabs */
|
||||
double cabs (struct _complex x);
|
||||
#endif
|
||||
double hypot (double x, double y);
|
||||
double j0 (double x);
|
||||
double j1 (double x);
|
||||
|
||||
@@ -31,11 +31,14 @@ extern VOID Ki386RetToV86Mode(PKV86M_REGISTERS InRegs,
|
||||
VOID
|
||||
NtEarlyInitVdm(VOID)
|
||||
{
|
||||
/* GCC 3.4 warns if NULL is passed in parameter 2 to the standard function memcpy */
|
||||
PVOID start = (PVOID)0x0;
|
||||
|
||||
/*
|
||||
* Save various BIOS data tables. At this point the lower 4MB memory
|
||||
* map is still active so we can just copy the data from low memory.
|
||||
*/
|
||||
memcpy(OrigIVT, (PVOID)0x0, 1024);
|
||||
memcpy(OrigIVT, start, 1024);
|
||||
memcpy(OrigBDA, (PVOID)0x400, 256);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user