- NDK updates and compatibility fixes for Vista/WDK/User-Mode/Individual per-file...
authorAlex Ionescu <aionescu@gmail.com>
Sat, 7 Apr 2007 05:33:30 +0000 (05:33 +0000)
committerAlex Ionescu <aionescu@gmail.com>
Sat, 7 Apr 2007 05:33:30 +0000 (05:33 +0000)
- 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

12 files changed:
reactos/base/applications/screensavers/cylfrac/cylfrac.c
reactos/config.template.rbuild
reactos/include/ndk/extypes.h
reactos/include/ndk/ketypes.h
reactos/include/ndk/lpctypes.h
reactos/include/ndk/mmtypes.h
reactos/include/ndk/obtypes.h
reactos/include/ndk/psfuncs.h
reactos/include/ndk/pstypes.h
reactos/include/ndk/rtlfuncs.h
reactos/include/ndk/umtypes.h
reactos/subsystems/win32/win32k/objects/region.c

index fcc7d99..995f4d6 100644 (file)
@@ -277,7 +277,7 @@ int WINAPI WinMain (HINSTANCE hInst,
                     LPSTR lpCmdLine,
                     int iCmdShow)
 {
-       HWND    hwndParent;
+       HWND    hwndParent = 0;
        int     chOption = 0;
        MSG     Message;
 
index 415bed7..bf0ad6f 100644 (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" />
 
 
 <!--
index fb221c6..71e4fe1 100644 (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
index 2ff4ba7..d0ca955 100644 (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;
index a17c76d..7586c31 100644 (file)
@@ -23,7 +23,7 @@ Author:
 // Dependencies
 //
 #include <umtypes.h>
-#include <pstypes.h>
+//#include <pstypes.h>
 
 //
 // Internal helper macro
index 9fb50af..82d5642 100644 (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;
 
 //
index 0b4ed52..c82dcb3 100644 (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
index a439bdb..21e8249 100644 (file)
@@ -131,6 +131,12 @@ PsLookupProcessThreadByCid(
     OUT PETHREAD *Thread
 );
 
+BOOLEAN
+NTAPI
+PsIsProtectedProcess(
+    IN PEPROCESS Process
+);
+
 #endif
 
 //
index 6617419..42b3888 100644 (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
index 70aacd9..d0b3118 100644 (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
index 831b0e7..f36d6b0 100644 (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;
index 64460ca..e085c28 100644 (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;