mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-13 10:47:31 +09:00
Merge remote-tracking branch 'origin/tracking' into custom
This commit is contained in:
commit
e89a9eafb1
67 changed files with 693 additions and 434 deletions
|
|
@ -1130,6 +1130,14 @@ var declareFFI = function declareFFI(lib, symbol, abi,
|
|||
throw new TypeError("Missing type for argument " + ( i - 3 ) +
|
||||
" of symbol " + symbol);
|
||||
}
|
||||
// Ellipsis for variadic arguments.
|
||||
if (current == "...") {
|
||||
if (i != arguments.length - 1) {
|
||||
throw new TypeError("Variadic ellipsis must be the last argument");
|
||||
}
|
||||
signature.push(current);
|
||||
continue;
|
||||
}
|
||||
if (!current.implementation) {
|
||||
throw new TypeError("Missing implementation for argument " + (i - 3)
|
||||
+ " of symbol " + symbol
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@
|
|||
/*return*/ Type.negativeone_or_fd,
|
||||
/*path*/ Type.path,
|
||||
/*oflags*/ Type.int,
|
||||
/*mode*/ Type.int);
|
||||
"...");
|
||||
|
||||
if (OS.Constants.Sys.Name == "NetBSD") {
|
||||
libc.declareLazyFFI(SysFile, "opendir",
|
||||
|
|
|
|||
|
|
@ -320,7 +320,7 @@
|
|||
flags |= Const.O_APPEND;
|
||||
}
|
||||
}
|
||||
return error_or_file(UnixFile.open(path, flags, omode), path);
|
||||
return error_or_file(UnixFile.open(path, flags, ctypes.int(omode)), path);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -675,7 +675,7 @@
|
|||
|
||||
// If necessary, fail if the destination file exists
|
||||
if (options.noOverwrite) {
|
||||
let fd = UnixFile.open(destPath, Const.O_RDONLY, 0);
|
||||
let fd = UnixFile.open(destPath, Const.O_RDONLY);
|
||||
if (fd != -1) {
|
||||
fd.dispose();
|
||||
// The file exists and we have access
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue