1
0
mirror of https://github.com/golang/go synced 2024-11-24 23:47:55 -07:00

runtime: fix windows build

R=rsc, r2
CC=golang-dev
https://golang.org/cl/2135045
This commit is contained in:
Alex Brainman 2010-09-09 12:09:10 +10:00
parent e1b79b712c
commit 89e9231865
3 changed files with 4 additions and 1 deletions

View File

@ -31,5 +31,5 @@ SysUnused(void *v, uintptr n)
void void
SysFree(void *v, uintptr n) SysFree(void *v, uintptr n)
{ {
return stdcall(VirtualFree, 3, v, n, MEM_RELEASE); stdcall(VirtualFree, 3, v, n, MEM_RELEASE);
} }

View File

@ -8,6 +8,7 @@
void *get_proc_addr(void *library, void *name); void *get_proc_addr(void *library, void *name);
extern void *VirtualAlloc; extern void *VirtualAlloc;
extern void *VirtualFree;
extern void *LoadLibraryEx; extern void *LoadLibraryEx;
extern void *GetProcAddress; extern void *GetProcAddress;
extern void *GetLastError; extern void *GetLastError;

View File

@ -14,6 +14,7 @@ void *GetStdHandle;
void *SetEvent; void *SetEvent;
void *WriteFile; void *WriteFile;
void *VirtualAlloc; void *VirtualAlloc;
void *VirtualFree;
void *LoadLibraryEx; void *LoadLibraryEx;
void *GetProcAddress; void *GetProcAddress;
void *GetLastError; void *GetLastError;
@ -63,6 +64,7 @@ osinit(void)
GetStdHandle = get_proc_addr("kernel32.dll", "GetStdHandle"); GetStdHandle = get_proc_addr("kernel32.dll", "GetStdHandle");
SetEvent = get_proc_addr("kernel32.dll", "SetEvent"); SetEvent = get_proc_addr("kernel32.dll", "SetEvent");
VirtualAlloc = get_proc_addr("kernel32.dll", "VirtualAlloc"); VirtualAlloc = get_proc_addr("kernel32.dll", "VirtualAlloc");
VirtualFree = get_proc_addr("kernel32.dll", "VirtualFree");
WaitForSingleObject = get_proc_addr("kernel32.dll", "WaitForSingleObject"); WaitForSingleObject = get_proc_addr("kernel32.dll", "WaitForSingleObject");
WriteFile = get_proc_addr("kernel32.dll", "WriteFile"); WriteFile = get_proc_addr("kernel32.dll", "WriteFile");
GetLastError = get_proc_addr("kernel32.dll", "GetLastError"); GetLastError = get_proc_addr("kernel32.dll", "GetLastError");