summaryrefslogtreecommitdiff
path: root/rts/win32
diff options
context:
space:
mode:
authorTamar Christina <tamar@zhox.com>2019-09-08 23:11:19 +0100
committerTamar Christina <tamar@zhox.com>2019-10-20 16:21:10 +0100
commit4b431f334018eaef2cf36de3316025c68c922915 (patch)
tree7f85d5a1a6bc6d39e9a8c51fe33904ff61461a7e /rts/win32
parentc4c9904b324736dc5d190a91418e8d8f564d4104 (diff)
downloadhaskell-4b431f334018eaef2cf36de3316025c68c922915.tar.gz
Windows: Update tarballs to GCC 9.2 and remove MAX_PATH limit.
Diffstat (limited to 'rts/win32')
-rw-r--r--rts/win32/OSMem.c8
-rw-r--r--rts/win32/OSThreads.c22
2 files changed, 19 insertions, 11 deletions
diff --git a/rts/win32/OSMem.c b/rts/win32/OSMem.c
index 57997b1ac5..35fe72fd58 100644
--- a/rts/win32/OSMem.c
+++ b/rts/win32/OSMem.c
@@ -41,7 +41,7 @@ static block_rec* free_blocks = NULL;
typedef LPVOID(WINAPI *VirtualAllocExNumaProc)(HANDLE, LPVOID, SIZE_T, DWORD, DWORD, DWORD);
/* Cache NUMA API call. */
-VirtualAllocExNumaProc VirtualAllocExNuma;
+VirtualAllocExNumaProc _VirtualAllocExNuma;
void
osMemInit(void)
@@ -52,8 +52,8 @@ osMemInit(void)
/* Resolve and cache VirtualAllocExNuma. */
if (osNumaAvailable() && RtsFlags.GcFlags.numa)
{
- VirtualAllocExNuma = (VirtualAllocExNumaProc)GetProcAddress(GetModuleHandleW(L"kernel32"), "VirtualAllocExNuma");
- if (!VirtualAllocExNuma)
+ _VirtualAllocExNuma = (VirtualAllocExNumaProc)(void*)GetProcAddress(GetModuleHandleW(L"kernel32"), "VirtualAllocExNuma");
+ if (!_VirtualAllocExNuma)
{
sysErrorBelch(
"osBindMBlocksToNode: VirtualAllocExNuma does not exist. How did you get this far?");
@@ -569,7 +569,7 @@ void osBindMBlocksToNode(
On windows also -xb is broken, it does nothing so that can't
be used to tweak it (see #12577). So for now, just let the OS decide.
*/
- temp = VirtualAllocExNuma(
+ temp = _VirtualAllocExNuma(
GetCurrentProcess(),
NULL, // addr? See base memory
size,
diff --git a/rts/win32/OSThreads.c b/rts/win32/OSThreads.c
index c67d621bc2..0942382da2 100644
--- a/rts/win32/OSThreads.c
+++ b/rts/win32/OSThreads.c
@@ -111,7 +111,7 @@ createOSThread (OSThreadId* pId, char *name STG_UNUSED,
HANDLE h;
h = CreateThread ( NULL, /* default security attributes */
0,
- (LPTHREAD_START_ROUTINE)startProc,
+ (LPTHREAD_START_ROUTINE)(void*)startProc,
param,
0,
pId);
@@ -314,7 +314,9 @@ getNumberOfProcessorsGroups (void)
on the API being available. So we'll have to resolve manually. */
HMODULE kernel = GetModuleHandleW(L"kernel32");
- GetGroupCountProc GetActiveProcessorGroupCount = (GetGroupCountProc)GetProcAddress(kernel, "GetActiveProcessorGroupCount");
+ GetGroupCountProc GetActiveProcessorGroupCount
+ = (GetGroupCountProc)(void*)
+ GetProcAddress(kernel, "GetActiveProcessorGroupCount");
n_groups = GetActiveProcessorGroupCount();
IF_DEBUG(scheduler, debugBelch("[*] Number of processor groups detected: %u\n", n_groups));
@@ -348,7 +350,9 @@ getProcessorsDistribution (void)
on the API being available. So we'll have to resolve manually. */
HMODULE kernel = GetModuleHandleW(L"kernel32");
- GetItemCountProc GetActiveProcessorCount = (GetItemCountProc)GetProcAddress(kernel, "GetActiveProcessorCount");
+ GetItemCountProc GetActiveProcessorCount
+ = (GetItemCountProc)(void*)
+ GetProcAddress(kernel, "GetActiveProcessorCount");
if (GetActiveProcessorCount)
{
@@ -449,7 +453,9 @@ getNumberOfProcessors (void)
on the API being available. So we'll have to resolve manually. */
HMODULE kernel = GetModuleHandleW(L"kernel32");
- GetItemCountProc GetActiveProcessorCount = (GetItemCountProc)GetProcAddress(kernel, "GetActiveProcessorCount");
+ GetItemCountProc GetActiveProcessorCount
+ = (GetItemCountProc)(void*)
+ GetProcAddress(kernel, "GetActiveProcessorCount");
if (GetActiveProcessorCount && !nproc)
{
nproc = GetActiveProcessorCount(ALL_PROCESSOR_GROUPS);
@@ -516,7 +522,9 @@ setThreadAffinity (uint32_t n, uint32_t m) // cap N of M
on the API being available. So we'll have to resolve manually. */
HMODULE kernel = GetModuleHandleW(L"kernel32");
- SetThreadGroupAffinityProc SetThreadGroupAffinity = (SetThreadGroupAffinityProc)GetProcAddress(kernel, "SetThreadGroupAffinity");
+ SetThreadGroupAffinityProc SetThreadGroupAffinity
+ = (SetThreadGroupAffinityProc)(void*)
+ GetProcAddress(kernel, "SetThreadGroupAffinity");
#endif
for (i = 0; i < n_groups; i++)
@@ -564,8 +572,8 @@ interruptOSThread (OSThreadId id)
sysErrorBelch("interruptOSThread: OpenThread");
stg_exit(EXIT_FAILURE);
}
- pCSIO = (PCSIO) GetProcAddress(GetModuleHandle(TEXT("Kernel32.dll")),
- "CancelSynchronousIo");
+ pCSIO = (PCSIO)(void*)GetProcAddress(GetModuleHandle(TEXT("Kernel32.dll")),
+ "CancelSynchronousIo");
if ( NULL != pCSIO ) {
pCSIO(hdl);
} else {