mirror of
https://github.com/golang/go
synced 2024-11-12 08:50:22 -07:00
runtime: fix windows build
R=rsc, r2 CC=golang-dev https://golang.org/cl/2135045
This commit is contained in:
parent
e1b79b712c
commit
89e9231865
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user