Author: sginsberg
Date: Sun Oct 26 10:23:00 2008
New Revision: 36992
URL:
http://svn.reactos.org/svn/reactos?rev=36992&view=rev
Log:
- Fix csrss compilation (treat handles as pointer sized, use SIZE_T where appropriate)
Modified:
branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/handle.c
branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/process.c
branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/user.c
branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/wapi.c
branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/video.c
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/handle.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/handle.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/handle.c [iso-8859-1]
Sun Oct 26 10:23:00 2008
@@ -22,7 +22,7 @@
static BOOL
CsrIsConsoleHandle(HANDLE Handle)
{
- return ((ULONG)Handle & 0x10000003) == 0x3;
+ return ((ULONG_PTR)Handle & 0x10000003) == 0x3;
}
@@ -63,7 +63,7 @@
NTSTATUS STDCALL CsrGetObject( PCSRSS_PROCESS_DATA ProcessData, HANDLE Handle, Object_t
**Object, DWORD Access )
{
- ULONG h = (ULONG)Handle >> 2;
+ ULONG_PTR h = (ULONG_PTR)Handle >> 2;
DPRINT("CsrGetObject, Object: %x, %x, %x\n", Object, Handle, ProcessData ?
ProcessData->HandleTableSize : 0);
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
@@ -110,7 +110,7 @@
CsrReleaseObject(PCSRSS_PROCESS_DATA ProcessData,
HANDLE Handle)
{
- ULONG h = (ULONG)Handle >> 2;
+ ULONG_PTR h = (ULONG_PTR)Handle >> 2;
Object_t *Object;
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
@@ -164,7 +164,7 @@
ProcessData->HandleTable[i].Object = Object;
ProcessData->HandleTable[i].Access = Access;
ProcessData->HandleTable[i].Inheritable = Inheritable;
- *Handle = (HANDLE)((i << 2) | 0x3);
+ *Handle = (HANDLE)(ULONG_PTR)((i << 2) | 0x3);
_InterlockedIncrement( &Object->ReferenceCount );
RtlLeaveCriticalSection(&ProcessData->HandleTableLock);
return(STATUS_SUCCESS);
@@ -208,7 +208,7 @@
NTSTATUS STDCALL CsrVerifyObject( PCSRSS_PROCESS_DATA ProcessData, HANDLE Handle )
{
- ULONG h = (ULONG)Handle >> 2;
+ ULONG_PTR h = (ULONG_PTR)Handle >> 2;
if (h >= ProcessData->HandleTableSize
|| ProcessData->HandleTable[h].Object == NULL)
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/process.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/process.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/process.c [iso-8859-1]
Sun Oct 26 10:23:00 2008
@@ -243,7 +243,7 @@
if (Request->Data.CreateProcessRequest.Flags & CREATE_NEW_PROCESS_GROUP)
{
- NewProcessData->ProcessGroup = (DWORD)NewProcessData->ProcessId;
+ NewProcessData->ProcessGroup = (DWORD)(ULONG_PTR)NewProcessData->ProcessId;
}
else
{
@@ -362,14 +362,14 @@
CSR_API(CsrDuplicateHandle)
{
- ULONG Index;
+ ULONG_PTR Index;
PCSRSS_HANDLE Entry;
DWORD DesiredAccess;
Request->Header.u1.s1.TotalLength = sizeof(CSR_API_MESSAGE);
Request->Header.u1.s1.DataLength = sizeof(CSR_API_MESSAGE) -
sizeof(PORT_MESSAGE);
- Index = (ULONG)Request->Data.DuplicateHandleRequest.Handle >> 2;
+ Index = (ULONG_PTR)Request->Data.DuplicateHandleRequest.Handle >> 2;
RtlEnterCriticalSection(&ProcessData->HandleTableLock);
if (Index >= ProcessData->HandleTableSize
|| (Entry = &ProcessData->HandleTable[Index])->Object == NULL)
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/user.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/user.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/user.c [iso-8859-1] Sun
Oct 26 10:23:00 2008
@@ -19,7 +19,7 @@
/* GLOBALS *******************************************************************/
static BOOLEAN ServicesProcessIdValid = FALSE;
-static ULONG ServicesProcessId;
+static ULONG_PTR ServicesProcessId;
/* FUNCTIONS *****************************************************************/
@@ -36,7 +36,7 @@
}
else
{
- ServicesProcessId =
(ULONG)Request->Data.RegisterServicesProcessRequest.ProcessId;
+ ServicesProcessId =
(ULONG_PTR)Request->Data.RegisterServicesProcessRequest.ProcessId;
ServicesProcessIdValid = TRUE;
return STATUS_SUCCESS;
}
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/wapi.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/wapi.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/api/wapi.c [iso-8859-1] Sun
Oct 26 10:23:00 2008
@@ -272,8 +272,8 @@
}
if (ProcessData->Terminated)
{
- DPRINT1("Message %d: process %d already terminated\n",
- Request->Type, (ULONG)Request->Header.ClientId.UniqueProcess);
+ DPRINT1("Message %d: process %p already terminated\n",
+ Request->Type, Request->Header.ClientId.UniqueProcess);
continue;
}
Modified: branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/video.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/subsy…
==============================================================================
--- branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/video.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/subsystems/win32/csrss/video.c [iso-8859-1] Sun Oct
26 10:23:00 2008
@@ -24,7 +24,7 @@
HANDLE PhysMemHandle;
PVOID BaseAddress;
LARGE_INTEGER Offset;
- ULONG ViewSize;
+ SIZE_T ViewSize;
CHAR IVTAndBda[1024+256];
/* Open the physical memory section */