fix open bindings
`open` specifies the `mode` argument as vararg (presumably to make it optional). varargs actually have rules about casting, in this case the rule that any integer arg of size <= 4 has to be casted to `i32` before passing it. Not doing that implicit cast makes the permissions wrong or not apply at all.
This commit is contained in:
1 parent
970dc7a1f2
commit
f7d7d65bc0
8 files changed
+45
-21
No files matched your search
@@ -58,7 +58,7 @@ foreign lib {
|
||||
|
||||
[[ More; https://pubs.opengroup.org/onlinepubs/9699919799/functions/open.html ]]
|
||||
*/
|
||||
open :: proc(path: cstring, flags: O_Flags, mode: mode_t = {}) -> FD ---
|
||||
open :: proc(path: cstring, flags: O_Flags, #c_vararg mode: ..mode_t) -> FD ---
|
||||
|
||||
/*
|
||||
Equivalent to the open() function except in the case where path specifies a relative path.
|
||||
|
||||
Reference in new issue
Block a user