Commit 89e92318 authored by Alex Brainman's avatar Alex Brainman

runtime: fix windows build

R=rsc, r2
CC=golang-dev
https://golang.org/cl/2135045
parent e1b79b71
......@@ -31,5 +31,5 @@ SysUnused(void *v, uintptr n)
void
SysFree(void *v, uintptr n)
{
return stdcall(VirtualFree, 3, v, n, MEM_RELEASE);
stdcall(VirtualFree, 3, v, n, MEM_RELEASE);
}
......@@ -8,6 +8,7 @@
void *get_proc_addr(void *library, void *name);
extern void *VirtualAlloc;
extern void *VirtualFree;
extern void *LoadLibraryEx;
extern void *GetProcAddress;
extern void *GetLastError;
......
......@@ -14,6 +14,7 @@ void *GetStdHandle;
void *SetEvent;
void *WriteFile;
void *VirtualAlloc;
void *VirtualFree;
void *LoadLibraryEx;
void *GetProcAddress;
void *GetLastError;
......@@ -63,6 +64,7 @@ osinit(void)
GetStdHandle = get_proc_addr("kernel32.dll", "GetStdHandle");
SetEvent = get_proc_addr("kernel32.dll", "SetEvent");
VirtualAlloc = get_proc_addr("kernel32.dll", "VirtualAlloc");
VirtualFree = get_proc_addr("kernel32.dll", "VirtualFree");
WaitForSingleObject = get_proc_addr("kernel32.dll", "WaitForSingleObject");
WriteFile = get_proc_addr("kernel32.dll", "WriteFile");
GetLastError = get_proc_addr("kernel32.dll", "GetLastError");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment