Fix _preload.odin; Add for in without parameters; Change sync.Mutex for windows

This commit is contained in:
Ginger Bill
2017-07-08 23:13:57 +01:00
parent 4b051a0d3b
commit b201670f7a
6 changed files with 122 additions and 28 deletions
+2 -2
View File
@@ -75,8 +75,8 @@ open :: proc(path: string, mode: int = O_RDONLY, perm: u32 = 0) -> (Handle, Errn
}
share_mode := u32(win32.FILE_SHARE_READ|win32.FILE_SHARE_WRITE);
sa: ^win32.Security_Attributes = nil;
sa_inherit := win32.Security_Attributes{length = size_of(win32.Security_Attributes), inherit_handle = 1};
sa: ^win32.SecurityAttributes = nil;
sa_inherit := win32.SecurityAttributes{length = size_of(win32.SecurityAttributes), inherit_handle = 1};
if mode&O_CLOEXEC == 0 {
sa = &sa_inherit;
}