]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix windows build
authorAlex Brainman <alex.brainman@gmail.com>
Thu, 9 Sep 2010 02:09:10 +0000 (12:09 +1000)
committerAlex Brainman <alex.brainman@gmail.com>
Thu, 9 Sep 2010 02:09:10 +0000 (12:09 +1000)
R=rsc, r2
CC=golang-dev
https://golang.org/cl/2135045

src/pkg/runtime/windows/mem.c
src/pkg/runtime/windows/os.h
src/pkg/runtime/windows/thread.c

index 6f6efd7aa2553b5931cf9bf552e2c9d803d85f95..735dda09da4fba7996ec589b298a2939dbc6dbb3 100644 (file)
@@ -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);
 }
index 68cdd7ca44a607e3fa14ce3e4c9cb83a62e37e9a..68efaa036a7584a1ece7841e98eccf48de5864b3 100644 (file)
@@ -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;
index 38e0c9ddb83f7f774b91e0ac35a0ac691530f068..a9062250dc7482e1cfcda61bc6316408463836b8 100644 (file)
@@ -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");