Author: fireball
Date: Sun Aug 5 15:27:39 2007
New Revision: 28174
URL:
http://svn.reactos.org/svn/reactos?rev=28174&view=rev
Log:
- More MSVC fixes
Modified:
trunk/reactos/include/ndk/halfuncs.h
trunk/reactos/ntoskrnl/ex/init.c
trunk/reactos/ntoskrnl/include/internal/mm.h
trunk/reactos/ntoskrnl/include/ntoskrnl.h
trunk/reactos/ntoskrnl/io/iomgr/controller.c
trunk/reactos/ntoskrnl/io/iomgr/device.c
trunk/reactos/ntoskrnl/io/iomgr/driver.c
trunk/reactos/ntoskrnl/io/iomgr/error.c
trunk/reactos/ntoskrnl/mm/freelist.c
trunk/reactos/ntoskrnl/mm/i386/page.c
trunk/reactos/ntoskrnl/mm/iospace.c
trunk/reactos/ntoskrnl/mm/mm.c
trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/include/ndk/halfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/halfuncs.h?rev…
==============================================================================
--- trunk/reactos/include/ndk/halfuncs.h (original)
+++ trunk/reactos/include/ndk/halfuncs.h Sun Aug 5 15:27:39 2007
@@ -55,8 +55,8 @@
// The DDK steals these away from you.
//
#ifdef _MSC_VER
-//void _enable(void);
-//void _disable(void);
+void _enable(void);
+void _disable(void);
#pragma intrinsic(_enable)
#pragma intrinsic(_disable)
#endif
Modified: trunk/reactos/ntoskrnl/ex/init.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=281…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/init.c (original)
+++ trunk/reactos/ntoskrnl/ex/init.c Sun Aug 5 15:27:39 2007
@@ -1094,7 +1094,7 @@
}
/* Update length */
- CmCSDVersionString.MaximumLength = (USHORT)sizeof(Buffer) - Remaining;
+ CmCSDVersionString.MaximumLength = sizeof(Buffer) - (USHORT)Remaining;
}
/* Check if we have an RC number */
Modified: trunk/reactos/ntoskrnl/include/internal/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/mm.h (original)
+++ trunk/reactos/ntoskrnl/include/internal/mm.h Sun Aug 5 15:27:39 2007
@@ -165,7 +165,7 @@
typedef struct _MM_SECTION_SEGMENT
{
- LONGLONG FileOffset; /* start offset into the file for image sections */
+ LONG FileOffset; /* start offset into the file for image sections */
ULONG_PTR VirtualAddress; /* dtart offset into the address range for image sections
*/
ULONG RawLength; /* length of the segment which is part of the mapped file */
ULONG Length; /* absolute length of the segment */
@@ -184,8 +184,8 @@
ULONG_PTR StackReserve;
ULONG_PTR StackCommit;
ULONG_PTR EntryPoint;
- ULONG Subsystem;
- ULONG ImageCharacteristics;
+ USHORT Subsystem;
+ USHORT ImageCharacteristics;
USHORT MinorSubsystemVersion;
USHORT MajorSubsystemVersion;
USHORT Machine;
Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/ntoskrnl.…
==============================================================================
--- trunk/reactos/ntoskrnl/include/ntoskrnl.h (original)
+++ trunk/reactos/ntoskrnl/include/ntoskrnl.h Sun Aug 5 15:27:39 2007
@@ -12,15 +12,14 @@
#include <ntverp.h>
#define _WIN32_WINNT _WIN32_WINNT_WS03
#define NTDDI_VERSION NTDDI_WS03SP1
-#define NTKERNELAPI
-#define NOEXTAPI
/* DDK/IFS/NDK Headers */
-#define NTKERNELAPI
-#define NOEXTAPI
+#ifdef _MSC_VER
+#include <ntdef.h>
+#undef DECLSPEC_IMPORT
+#define DECLSPEC_IMPORT
+#endif
#include <ntifs.h>
-#undef _KPROCESS
-#undef _EPROCESS
#include <wdmguid.h>
#include <arc/arc.h>
#include <ntndk.h>
@@ -55,6 +54,7 @@
#include <arc/setupblk.h>
/* KD Support */
+#define NOEXTAPI
#include <windbgkd.h>
#include <wdbgexts.h>
#include <kddll.h>
Modified: trunk/reactos/ntoskrnl/io/iomgr/controller.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/controll…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/controller.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/controller.c Sun Aug 5 15:27:39 2007
@@ -92,7 +92,7 @@
/* Zero the Object and set its data */
RtlZeroMemory(Controller, sizeof(CONTROLLER_OBJECT) + Size);
Controller->Type = IO_TYPE_CONTROLLER;
- Controller->Size = (CSHORT)sizeof(CONTROLLER_OBJECT) + Size;
+ Controller->Size = sizeof(CONTROLLER_OBJECT) + (CSHORT)Size;
Controller->ControllerExtension = (Controller + 1);
/* Initialize its Queue */
Modified: trunk/reactos/ntoskrnl/io/iomgr/device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/device.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/device.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/device.c Sun Aug 5 15:27:39 2007
@@ -765,7 +765,7 @@
* because that's only padding for the DevObjExt and not part of the Object.
*/
CreatedDeviceObject->Type = IO_TYPE_DEVICE;
- CreatedDeviceObject->Size = (USHORT)sizeof(DEVICE_OBJECT) + DeviceExtensionSize;
+ CreatedDeviceObject->Size = sizeof(DEVICE_OBJECT) + (USHORT)DeviceExtensionSize;
/* The kernel extension is after the driver internal extension */
DeviceObjectExtension = (PDEVOBJ_EXTENSION)
Modified: trunk/reactos/ntoskrnl/io/iomgr/driver.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/driver.c…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/driver.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/driver.c Sun Aug 5 15:27:39 2007
@@ -1126,7 +1126,9 @@
if (!DriverName)
{
/* Create a random name and set up the string*/
- NameLength = swprintf(NameBuffer, L"\\Driver\\%08u", KeTickCount);
+ NameLength = (USHORT)swprintf(NameBuffer,
+ L"\\Driver\\%08u",
+ KeTickCount);
LocalDriverName.Length = NameLength * sizeof(WCHAR);
LocalDriverName.MaximumLength = LocalDriverName.Length + sizeof(UNICODE_NULL);
LocalDriverName.Buffer = NameBuffer;
Modified: trunk/reactos/ntoskrnl/io/iomgr/error.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/error.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/error.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/error.c Sun Aug 5 15:27:39 2007
@@ -338,8 +338,8 @@
if (NT_SUCCESS(Status))
{
/* Success, update the information */
- ObjectNameInfo->Name.Length = (USHORT)100 -
- DriverNameLength;
+ ObjectNameInfo->Name.Length =
+ 100 - (USHORT)DriverNameLength;
}
}
}
Modified: trunk/reactos/ntoskrnl/mm/freelist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/freelist.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/freelist.c (original)
+++ trunk/reactos/ntoskrnl/mm/freelist.c Sun Aug 5 15:27:39 2007
@@ -183,8 +183,8 @@
KeAcquireSpinLock(&PageListLock, &oldIrql);
- last = min(HighestAcceptableAddress.QuadPart / PAGE_SIZE, MmPageArraySize - 1);
- boundary = BoundaryAddressMultiple.QuadPart / PAGE_SIZE;
+ last = min(HighestAcceptableAddress.LowPart / PAGE_SIZE, MmPageArraySize - 1);
+ boundary = BoundaryAddressMultiple.LowPart / PAGE_SIZE;
for (j = 0; j < 2; j++)
{
@@ -195,7 +195,7 @@
* pages above the 16MB area because the caller has specify an upper limit.
* The second try uses the specified lower limit.
*/
- for (i = j == 0 ? 0x100000 / PAGE_SIZE : LowestAcceptableAddress.QuadPart /
PAGE_SIZE; i <= last; )
+ for (i = j == 0 ? 0x100000 / PAGE_SIZE : LowestAcceptableAddress.LowPart /
PAGE_SIZE; i <= last; )
{
if (MmPageArray[i].Flags.Type == MM_PHYSICAL_PAGE_FREE)
{
@@ -1017,8 +1017,8 @@
if (NumberOfPages == 0)
return 0;
- LowestPage = LowestAddress.QuadPart / PAGE_SIZE;
- HighestPage = HighestAddress.QuadPart / PAGE_SIZE;
+ LowestPage = LowestAddress.LowPart / PAGE_SIZE;
+ HighestPage = HighestAddress.LowPart / PAGE_SIZE;
if ((HighestAddress.u.LowPart % PAGE_SIZE) != 0)
HighestPage++;
Modified: trunk/reactos/ntoskrnl/mm/i386/page.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/page.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/i386/page.c (original)
+++ trunk/reactos/ntoskrnl/mm/i386/page.c Sun Aug 5 15:27:39 2007
@@ -625,7 +625,7 @@
if (Address < MmSystemRangeStart && Process && Process !=
PsGetCurrentProcess())
{
- PageDir =
MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase.QuadPart));
+ PageDir =
MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase.LowPart));
if (PageDir == NULL)
{
KEBUGCHECK(0);
Modified: trunk/reactos/ntoskrnl/mm/iospace.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/iospace.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/iospace.c (original)
+++ trunk/reactos/ntoskrnl/mm/iospace.c Sun Aug 5 15:27:39 2007
@@ -95,7 +95,7 @@
DPRINT("MmMapIoSpace failed (%lx)\n", Status);
return (NULL);
}
- Pfn = PhysicalAddress.QuadPart >> PAGE_SHIFT;
+ Pfn = PhysicalAddress.LowPart >> PAGE_SHIFT;
for (i = 0; i < PAGE_ROUND_UP(NumberOfBytes); i += PAGE_SIZE, Pfn++)
{
Status = MmCreateVirtualMappingForKernel((char*)Result + i,
Modified: trunk/reactos/ntoskrnl/mm/mm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/mm.c?rev=28174…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/mm.c (original)
+++ trunk/reactos/ntoskrnl/mm/mm.c Sun Aug 5 15:27:39 2007
@@ -273,7 +273,7 @@
break;
case MEMORY_AREA_SHARED_DATA:
- Pfn = MmSharedDataPagePhysicalAddress.QuadPart >> PAGE_SHIFT;
+ Pfn = MmSharedDataPagePhysicalAddress.LowPart >> PAGE_SHIFT;
Status =
MmCreateVirtualMapping(PsGetCurrentProcess(),
(PVOID)PAGE_ROUND_DOWN(Address),
Modified: trunk/reactos/ntoskrnl/mm/section.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c (original)
+++ trunk/reactos/ntoskrnl/mm/section.c Sun Aug 5 15:27:39 2007
@@ -611,7 +611,7 @@
* Retrieve the page from the cache segment that we actually want.
*/
(*Page) = MmGetPhysicalAddress((char*)BaseAddress +
- FileOffset - BaseOffset).QuadPart >>
PAGE_SHIFT;
+ FileOffset - BaseOffset).LowPart >>
PAGE_SHIFT;
CcRosReleaseCacheSegment(Bcb, CacheSeg, TRUE, FALSE, TRUE);
}