Author: sginsberg
Date: Thu Oct 22 20:27:17 2009
New Revision: 43691
URL:
http://svn.reactos.org/svn/reactos?rev=43691&view=rev
Log:
- Fix 43192 -- MAXUINT and MAXULONGLONG are only defined for Vista and later.
- Add some leftover MAXULONG.
Modified:
trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c
trunk/reactos/dll/cpl/main/mouse.c
trunk/reactos/include/psdk/basetsd.h
trunk/reactos/lib/rtl/rangelist.c
trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
trunk/reactos/ntoskrnl/mm/i386/pagepae.c
Modified: trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/nt…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c [iso-8859-1] Thu Oct 22 20:27:17 2009
@@ -292,7 +292,7 @@
{
CurrentOffset += DataRunLength * Volume->ClusterSize;
DataRun = NtfsDecodeRun(DataRun, &DataRunOffset, &DataRunLength);
- if (DataRunLength != MAXULONGLONG)
+ if (DataRunLength != (ULONGLONG)-1)
{
DataRunStartLCN = LastLCN + DataRunOffset;
LastLCN = DataRunStartLCN;
Modified: trunk/reactos/dll/cpl/main/mouse.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/main/mouse.c?rev=4…
==============================================================================
--- trunk/reactos/dll/cpl/main/mouse.c [iso-8859-1] (original)
+++ trunk/reactos/dll/cpl/main/mouse.c [iso-8859-1] Thu Oct 22 20:27:17 2009
@@ -971,7 +971,7 @@
GetSysColor(COLOR_WINDOWTEXT));
}
- if (lpdis->itemID != MAXUINT)
+ if (lpdis->itemID != (UINT)-1)
{
CopyRect(&rc, &lpdis->rcItem);
rc.left += 5;
Modified: trunk/reactos/include/psdk/basetsd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/basetsd.h?rev…
==============================================================================
--- trunk/reactos/include/psdk/basetsd.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/basetsd.h [iso-8859-1] Thu Oct 22 20:27:17 2009
@@ -48,9 +48,12 @@
#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
#define MINHALF_PTR (~MAXHALF_PTR)
+#if _WIN32_WINNT >= 0x0600
+
#define MAXUINT ((UINT)~((UINT)0))
+#define MAXULONGLONG ((ULONGLONG)~((ULONGLONG)0))
-#define MAXULONGLONG ((ULONGLONG)~((ULONGLONG)0))
+#endif
#ifndef RC_INVOKED
#ifdef __cplusplus
Modified: trunk/reactos/lib/rtl/rangelist.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/rangelist.c?rev=43…
==============================================================================
--- trunk/reactos/lib/rtl/rangelist.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/rangelist.c [iso-8859-1] Thu Oct 22 20:27:17 2009
@@ -608,11 +608,11 @@
}
/* Add trailing range */
- if (Previous->Range.End + 1 != MAXULONGLONG)
+ if (Previous->Range.End + 1 != (ULONGLONG)-1)
{
Status = RtlAddRange (InvertedRangeList,
Previous->Range.End + 1,
- MAXULONGLONG,
+ (ULONGLONG)-1,
0,
0,
NULL,
Modified: trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.…
==============================================================================
--- trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/io/pnpmgr/pnpmgr.c [iso-8859-1] Thu Oct 22 20:27:17 2009
@@ -1420,7 +1420,7 @@
sizeof(ULONG));
/* Set 'UINumber' value */
- if (DeviceCapabilities.UINumber != (ULONG)-1)
+ if (DeviceCapabilities.UINumber != MAXULONG)
{
RtlInitUnicodeString(&ValueName, L"UINumber");
Status = ZwSetValueKey(InstanceKey,
@@ -3078,7 +3078,7 @@
case DevicePropertyAddress:
/* Query the device caps */
Status = IopQueryDeviceCapabilities(DeviceNode, &DeviceCaps);
- if (NT_SUCCESS(Status) && (DeviceCaps.Address != (ULONG)-1))
+ if (NT_SUCCESS(Status) && (DeviceCaps.Address != MAXULONG))
{
/* Return length */
*ResultLength = sizeof(ULONG);
Modified: trunk/reactos/ntoskrnl/mm/i386/pagepae.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/i386/pagepae.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/i386/pagepae.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/i386/pagepae.c [iso-8859-1] Thu Oct 22 20:27:17 2009
@@ -78,11 +78,11 @@
NTAPI
MiFlushTlbIpiRoutine(ULONG_PTR Address)
{
- if (Address == MAXULONGLONG)
+ if (Address == (ULONGLONG)-1)
{
KeFlushCurrentTb();
}
- else if (Address == MAXULONGLONG-1)
+ else if (Address == (ULONGLONG)-2)
{
KeFlushCurrentTb();
}