From 78ba79209d8b09daecb00a500a5b41b8d071e8da Mon Sep 17 00:00:00 2001 From: janwas Date: Thu, 29 Dec 2011 09:47:42 +0000 Subject: [PATCH] more minor fixes. rename uname.machine to x64 (less confusing than amd64) This was SVN commit r10827. --- source/lib/allocators/aligned_allocator.h | 2 +- source/lib/sysdep/arch/x86_x64/apic.cpp | 2 +- source/lib/sysdep/arch/x86_x64/apic.h | 2 +- source/lib/sysdep/gfx.cpp | 2 ++ source/lib/sysdep/os/win/wposix/wutsname.cpp | 4 ++-- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/source/lib/allocators/aligned_allocator.h b/source/lib/allocators/aligned_allocator.h index 3dbe685c0c..70eebfb2ae 100644 --- a/source/lib/allocators/aligned_allocator.h +++ b/source/lib/allocators/aligned_allocator.h @@ -107,7 +107,7 @@ public: // allocate uninitialized storage pointer allocate(size_type numElements) { - const size_type alignment = x86_x64::Caches(L1D)->entrySize; + const size_type alignment = x86_x64::Caches(x86_x64::L1D)->entrySize; const size_type elementSize = round_up(sizeof(T), alignment); const size_type size = numElements * elementSize; pointer p = (pointer)rtl_AllocateAligned(size, alignment); diff --git a/source/lib/sysdep/arch/x86_x64/apic.cpp b/source/lib/sysdep/arch/x86_x64/apic.cpp index 1a81b4b849..fa94596495 100644 --- a/source/lib/sysdep/arch/x86_x64/apic.cpp +++ b/source/lib/sysdep/arch/x86_x64/apic.cpp @@ -111,7 +111,7 @@ bool AreApicIdsReliable() } -static size_t IndexFromApicId(const ApicId* apicIds, size_t apicId) +static size_t IndexFromApicId(const ApicId* apicIds, ApicId apicId) { ModuleInit(&apicInitState, InitApicIds); diff --git a/source/lib/sysdep/arch/x86_x64/apic.h b/source/lib/sysdep/arch/x86_x64/apic.h index fb6db36155..4626019421 100644 --- a/source/lib/sysdep/arch/x86_x64/apic.h +++ b/source/lib/sysdep/arch/x86_x64/apic.h @@ -33,7 +33,7 @@ typedef u8 ApicId; // not necessarily contiguous values * feasible - mahaf_MapPhysicalMemory only works reliably on WinXP. we also * don't want to interfere with the OS's constant use of the APIC registers. **/ -LIB_API u8 GetApicId(); +LIB_API ApicId GetApicId(); // if this returns false, apicId = contiguousId = processor. // otherwise, there are unspecified but bijective mappings between diff --git a/source/lib/sysdep/gfx.cpp b/source/lib/sysdep/gfx.cpp index b14e2dcc90..c41f5f530e 100644 --- a/source/lib/sysdep/gfx.cpp +++ b/source/lib/sysdep/gfx.cpp @@ -27,8 +27,10 @@ #include "precompiled.h" #include "lib/sysdep/gfx.h" +#define WSDL_NO_KEYSYM #include "lib/external_libraries/sdl.h" #include "lib/ogl.h" + #if OS_WIN # include "lib/sysdep/os/win/wgfx.h" #endif diff --git a/source/lib/sysdep/os/win/wposix/wutsname.cpp b/source/lib/sysdep/os/win/wposix/wutsname.cpp index 3eedce9f21..b77822284a 100644 --- a/source/lib/sysdep/os/win/wposix/wutsname.cpp +++ b/source/lib/sysdep/os/win/wposix/wutsname.cpp @@ -57,9 +57,9 @@ int uname(struct utsname* un) SYSTEM_INFO si; GetSystemInfo(&si); if(si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64) - strcpy_s(un->machine, ARRAY_SIZE(un->machine), "AMD64"); + strcpy_s(un->machine, ARRAY_SIZE(un->machine), "x64"); else - strcpy_s(un->machine, ARRAY_SIZE(un->machine), "IA-32"); + strcpy_s(un->machine, ARRAY_SIZE(un->machine), "x86"); return 0; }