Author: ion Date: Sat Apr 7 09:33:30 2007 New Revision: 26274
URL: http://svn.reactos.org/svn/reactos?rev=26274&view=rev Log: - 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.
Modified: trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.c trunk/reactos/config.template.rbuild trunk/reactos/include/ndk/extypes.h trunk/reactos/include/ndk/ketypes.h trunk/reactos/include/ndk/lpctypes.h trunk/reactos/include/ndk/mmtypes.h trunk/reactos/include/ndk/obtypes.h trunk/reactos/include/ndk/psfuncs.h trunk/reactos/include/ndk/pstypes.h trunk/reactos/include/ndk/rtlfuncs.h trunk/reactos/include/ndk/umtypes.h trunk/reactos/subsystems/win32/win32k/objects/region.c
Modified: trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/screensav... ============================================================================== --- trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.c (original) +++ trunk/reactos/base/applications/screensavers/cylfrac/cylfrac.c Sat Apr 7 09:33:30 2007 @@ -277,7 +277,7 @@ LPSTR lpCmdLine, int iCmdShow) { - HWND hwndParent; + HWND hwndParent = 0; int chOption = 0; MSG Message;
Modified: trunk/reactos/config.template.rbuild URL: http://svn.reactos.org/svn/reactos/trunk/reactos/config.template.rbuild?rev=... ============================================================================== --- trunk/reactos/config.template.rbuild (original) +++ trunk/reactos/config.template.rbuild Sat Apr 7 09:33:30 2007 @@ -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" />
<!--
Modified: trunk/reactos/include/ndk/extypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/extypes.h?rev=2... ============================================================================== --- trunk/reactos/include/ndk/extypes.h (original) +++ trunk/reactos/include/ndk/extypes.h Sat Apr 7 09:33:30 2007 @@ -31,6 +31,9 @@ #include <ketypes.h> #include <potypes.h> #include <lpctypes.h> +#ifdef NTOS_MODE_USER +#include <obtypes.h> +#endif
// // GCC compatibility
Modified: trunk/reactos/include/ndk/ketypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/ketypes.h?rev=2... ============================================================================== --- trunk/reactos/include/ndk/ketypes.h (original) +++ trunk/reactos/include/ndk/ketypes.h Sat Apr 7 09:33:30 2007 @@ -948,7 +948,12 @@ { 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;
Modified: trunk/reactos/include/ndk/lpctypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/lpctypes.h?rev=... ============================================================================== --- trunk/reactos/include/ndk/lpctypes.h (original) +++ trunk/reactos/include/ndk/lpctypes.h Sat Apr 7 09:33:30 2007 @@ -23,7 +23,7 @@ // Dependencies // #include <umtypes.h> -#include <pstypes.h> +//#include <pstypes.h>
// // Internal helper macro
Modified: trunk/reactos/include/ndk/mmtypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/mmtypes.h?rev=2... ============================================================================== --- trunk/reactos/include/ndk/mmtypes.h (original) +++ trunk/reactos/include/ndk/mmtypes.h Sat Apr 7 09:33:30 2007 @@ -24,6 +24,7 @@ // #include <umtypes.h> #include <arch/mmtypes.h> +#include <extypes.h>
// // Page-Rounding Macros @@ -576,20 +577,42 @@ // 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;
//
Modified: trunk/reactos/include/ndk/obtypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/obtypes.h?rev=2... ============================================================================== --- trunk/reactos/include/ndk/obtypes.h (original) +++ trunk/reactos/include/ndk/obtypes.h Sat Apr 7 09:33:30 2007 @@ -18,6 +18,9 @@
#ifndef _OBTYPES_H #define _OBTYPES_H + +#undef NTDDI_VERSION +#define NTDDI_VERSION NTDDI_WS03SP1
// // Dependencies @@ -26,9 +29,6 @@ #ifndef NTOS_MODE_USER #include <extypes.h> #endif - -#undef NTDDI_VERSION -#define NTDDI_VERSION NTDDI_WS03SP1
#ifdef NTOS_MODE_USER //
Modified: trunk/reactos/include/ndk/psfuncs.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/psfuncs.h?rev=2... ============================================================================== --- trunk/reactos/include/ndk/psfuncs.h (original) +++ trunk/reactos/include/ndk/psfuncs.h Sat Apr 7 09:33:30 2007 @@ -129,6 +129,12 @@ IN PCLIENT_ID Cid, OUT PEPROCESS *Process OPTIONAL, OUT PETHREAD *Thread +); + +BOOLEAN +NTAPI +PsIsProtectedProcess( + IN PEPROCESS Process );
#endif
Modified: trunk/reactos/include/ndk/pstypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/pstypes.h?rev=2... ============================================================================== --- trunk/reactos/include/ndk/pstypes.h (original) +++ trunk/reactos/include/ndk/pstypes.h Sat Apr 7 09:33:30 2007 @@ -234,6 +234,11 @@ #define PSF_SWAP_ALLOWED_BIT 0x2000000 #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 // @@ -528,19 +533,6 @@ (NTAPI *PPOST_PROCESS_INIT_ROUTINE)( 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 @@ // // Executive Thread (ETHREAD) // -#include <pshpack4.h> typedef struct _ETHREAD { KTHREAD Tcb; @@ -1200,7 +1191,11 @@ #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 @@ PVOID VdmObjects; PVOID DeviceMap; #if (NTDDI_VERSION >= NTDDI_LONGHORN) - ULONG AlpcPagedPoolQuotaCache; PVOID EtwDataSource; PVOID FreeTebHint; #else @@ -1351,7 +1345,6 @@ MM_AVL_TABLE VadRoot; ULONG Cookie; } EPROCESS; -#include <poppack.h>
// // Job Token Filter Data
Modified: trunk/reactos/include/ndk/rtlfuncs.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/rtlfuncs.h?rev=... ============================================================================== --- trunk/reactos/include/ndk/rtlfuncs.h (original) +++ trunk/reactos/include/ndk/rtlfuncs.h Sat Apr 7 09:33:30 2007 @@ -2768,7 +2768,17 @@ 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
Modified: trunk/reactos/include/ndk/umtypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/umtypes.h?rev=2... ============================================================================== --- trunk/reactos/include/ndk/umtypes.h (original) +++ trunk/reactos/include/ndk/umtypes.h Sat Apr 7 09:33:30 2007 @@ -160,6 +160,15 @@ 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;
Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/obj... ============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/region.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/region.c Sat Apr 7 09:33:30 2007 @@ -2712,7 +2712,7 @@ HRGN STDCALL NtGdiUnionRectWithRgn(HRGN hDest, CONST PRECT UnsafeRect) { - RECT SafeRect; + RECT SafeRect = {0}; PROSRGNDATA Rgn; NTSTATUS Status = STATUS_SUCCESS;