- NDK updates and compatibility fixes for Vista/WDK/User-Mode/Individual per-file NDK Usage.

- Update targets to pentium to take advantage of cmpxhg8b when possible. (ROS won't run on 386/486 anyway).
- Fix some compiler problems when building with -O3.

svn path=/trunk/; revision=26274
This commit is contained in:
Alex Ionescu 2007-04-07 05:33:30 +00:00
parent dd4ede8870
commit 2d88738681
12 changed files with 73 additions and 24 deletions

View file

@ -277,7 +277,7 @@ int WINAPI WinMain (HINSTANCE hInst,
LPSTR lpCmdLine,
int iCmdShow)
{
HWND hwndParent;
HWND hwndParent = 0;
int chOption = 0;
MSG Message;

View file

@ -32,7 +32,7 @@
See GCC manual for more CPU names and which CPUs GCC can optimize for.
-->
<property name="OARCH" value="i486" />
<property name="OARCH" value="pentium" />
<!--

View file

@ -31,6 +31,9 @@ Author:
#include <ketypes.h>
#include <potypes.h>
#include <lpctypes.h>
#ifdef NTOS_MODE_USER
#include <obtypes.h>
#endif
//
// GCC compatibility

View file

@ -948,7 +948,12 @@ typedef struct _KPROCESS
{
DISPATCHER_HEADER Header;
LIST_ENTRY ProfileListHead;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
ULONG DirectoryTableBase;
ULONG Unused0;
#else
LARGE_INTEGER DirectoryTableBase;
#endif
#if defined(_M_IX86)
KGDTENTRY LdtDescriptor;
KIDTENTRY Int21Descriptor;

View file

@ -23,7 +23,7 @@ Author:
// Dependencies
//
#include <umtypes.h>
#include <pstypes.h>
//#include <pstypes.h>
//
// Internal helper macro

View file

@ -24,6 +24,7 @@ Author:
//
#include <umtypes.h>
#include <arch/mmtypes.h>
#include <extypes.h>
//
// Page-Rounding Macros
@ -576,20 +577,42 @@ typedef struct _MMSUPPORT_FLAGS
//
typedef struct _MMSUPPORT
{
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
LIST_ENTRY WorkingSetExpansionLinks;
USHORT LastTrimpStamp;
USHORT NextPageColor;
#else
LARGE_INTEGER LastTrimTime;
#endif
MMSUPPORT_FLAGS Flags;
ULONG PageFaultCount;
ULONG PeakWorkingSetSize;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
ULONG Spare0;
#else
ULONG WorkingSetSize;
#endif
ULONG MinimumWorkingSetSize;
ULONG MaximumWorkingSetSize;
PMMWSL MmWorkingSetList;
#if (NTDDI_VERSION < NTDDI_LONGHORN)
LIST_ENTRY WorkingSetExpansionLinks;
#endif
ULONG Claim;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
ULONG Spare;
ULONG WorkingSetPrivateSize;
ULONG WorkingSetSizeOverhead;
ULONG WorkingSetSize;
PKEVENT ExitEvent;
EX_PUSH_LOCK WorkingSetMutex;
PVOID AccessLog;
#else
ULONG NextEstimationSlot;
ULONG NextAgingSlot;
ULONG EstimatedAvailable;
ULONG GrowthSinceLastEstimate;
#endif
} MMSUPPORT, *PMMSUPPORT;
//

View file

@ -19,6 +19,9 @@ Author:
#ifndef _OBTYPES_H
#define _OBTYPES_H
#undef NTDDI_VERSION
#define NTDDI_VERSION NTDDI_WS03SP1
//
// Dependencies
//
@ -27,9 +30,6 @@ Author:
#include <extypes.h>
#endif
#undef NTDDI_VERSION
#define NTDDI_VERSION NTDDI_WS03SP1
#ifdef NTOS_MODE_USER
//
// Definitions for Object Creation

View file

@ -131,6 +131,12 @@ PsLookupProcessThreadByCid(
OUT PETHREAD *Thread
);
BOOLEAN
NTAPI
PsIsProtectedProcess(
IN PEPROCESS Process
);
#endif
//

View file

@ -235,6 +235,11 @@ Author:
#define PSF_CREATE_FAILED_BIT 0x4000000
#define PSF_DEFAULT_IO_PRIORITY_BIT 0x8000000
//
// Vista Process Flags
//
#define PSF2_PROTECTED_BIT 0x800
#ifdef NTOS_MODE_USER
//
// Current Process/Thread built-in 'special' handles
@ -529,19 +534,6 @@ typedef NTSTATUS
VOID
);
#ifdef NTOS_MODE_USER
//
// ClientID Structure
//
typedef struct _CLIENT_ID
{
HANDLE UniqueProcess;
HANDLE UniqueThread;
} CLIENT_ID, *PCLIENT_ID;
#endif
//
// Descriptor Table Entry Definition
//
@ -1001,7 +993,6 @@ typedef struct _PSP_RATE_APC
//
// Executive Thread (ETHREAD)
//
#include <pshpack4.h>
typedef struct _ETHREAD
{
KTHREAD Tcb;
@ -1200,7 +1191,11 @@ typedef struct _EPROCESS
#endif
PETHREAD ForkInProgress;
ULONG HardwareTrigger;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
PMM_AVL_TABLE PhysicalVadroot;
#else
MM_AVL_TABLE PhysicalVadroot;
#endif
PVOID CloneRoot;
ULONG NumberOfPrivatePages;
ULONG NumberOfLockedPages;
@ -1217,7 +1212,6 @@ typedef struct _EPROCESS
PVOID VdmObjects;
PVOID DeviceMap;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
ULONG AlpcPagedPoolQuotaCache;
PVOID EtwDataSource;
PVOID FreeTebHint;
#else
@ -1351,7 +1345,6 @@ typedef struct _EPROCESS
MM_AVL_TABLE VadRoot;
ULONG Cookie;
} EPROCESS;
#include <poppack.h>
//
// Job Token Filter Data

View file

@ -2768,7 +2768,17 @@ RtlCheckRegistryKey(
NTSYSAPI
NTSTATUS
NTAPI
RtlFormatCurrentUserKeyPath(IN OUT PUNICODE_STRING KeyPath);
RtlCreateRegistryKey(
IN ULONG RelativeTo,
IN PWSTR Path
);
NTSYSAPI
NTSTATUS
NTAPI
RtlFormatCurrentUserKeyPath(
IN OUT PUNICODE_STRING KeyPath
);
NTSYSAPI
NTSTATUS

View file

@ -160,6 +160,15 @@ typedef struct _OBJECT_ATTRIBUTES
PVOID SecurityQualityOfService;
} OBJECT_ATTRIBUTES, *POBJECT_ATTRIBUTES;
//
// ClientID Structure
//
typedef struct _CLIENT_ID
{
HANDLE UniqueProcess;
HANDLE UniqueThread;
} CLIENT_ID, *PCLIENT_ID;
typedef const UNICODE_STRING* PCUNICODE_STRING;
typedef STRING ANSI_STRING;
typedef PSTRING PANSI_STRING;

View file

@ -2712,7 +2712,7 @@ NtGdiSetRectRgn(HRGN hRgn,
HRGN STDCALL
NtGdiUnionRectWithRgn(HRGN hDest, CONST PRECT UnsafeRect)
{
RECT SafeRect;
RECT SafeRect = {0};
PROSRGNDATA Rgn;
NTSTATUS Status = STATUS_SUCCESS;