diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c index 63ca2774e96..bd3d74add8e 100644 --- a/dlls/kernel32/cpu.c +++ b/dlls/kernel32/cpu.c @@ -681,7 +681,7 @@ VOID WINAPI GetSystemInfo( valSize = sizeof(int); if (sysctlbyname ("hw.activecpu", &value, &valSize, NULL, 0) == 0) - cachedsi.dwActiveProcessorMask = (1 << value) - 1; + cachedsi.dwActiveProcessorMask = ((ULONG_PTR)1 << value) - 1; valSize = sizeof(int); if (sysctlbyname ("hw.cputype", &cputype, &valSize, NULL, 0) == 0) @@ -780,12 +780,12 @@ VOID WINAPI GetSystemInfo( FIXME("not yet supported on this system\n"); #endif if (!cachedsi.dwActiveProcessorMask) - cachedsi.dwActiveProcessorMask = (1 << cachedsi.dwNumberOfProcessors) - 1; + cachedsi.dwActiveProcessorMask = ((ULONG_PTR)1 << cachedsi.dwNumberOfProcessors) - 1; *si = cachedsi; TRACE("<- CPU arch %d, res'd %d, pagesize %d, minappaddr %p, maxappaddr %p," - " act.cpumask %08x, numcpus %d, CPU type %d, allocgran. %d, CPU level %d, CPU rev %d\n", + " act.cpumask %lx, numcpus %d, CPU type %d, allocgran. %d, CPU level %d, CPU rev %d\n", si->u.s.wProcessorArchitecture, si->u.s.wReserved, si->dwPageSize, si->lpMinimumApplicationAddress, si->lpMaximumApplicationAddress, si->dwActiveProcessorMask, si->dwNumberOfProcessors, si->dwProcessorType, diff --git a/include/winbase.h b/include/winbase.h index d3b392c7012..521bb16f680 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -776,7 +776,7 @@ typedef struct _SYSTEM_INFO DWORD dwPageSize; LPVOID lpMinimumApplicationAddress; LPVOID lpMaximumApplicationAddress; - DWORD dwActiveProcessorMask; + DWORD_PTR dwActiveProcessorMask; DWORD dwNumberOfProcessors; DWORD dwProcessorType; DWORD dwAllocationGranularity; diff --git a/include/winnt.h b/include/winnt.h index 0c8e0a96f9f..57f4c5c354b 100644 --- a/include/winnt.h +++ b/include/winnt.h @@ -540,7 +540,12 @@ typedef DWORD FLONG; #define PROCESSOR_ARM920 2336 /* 0x920 */ #define PROCESSOR_ARM_7TDMI 70001 +#ifdef _WIN64 +#define MAXIMUM_PROCESSORS 64 +#else #define MAXIMUM_PROCESSORS 32 +#endif + typedef struct _MEMORY_BASIC_INFORMATION { LPVOID BaseAddress;