Skip to content

Commit

Permalink
Make :open ccall use variadic cconv (JuliaLang#49212)
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy authored and Xnartharax committed Apr 13, 2023
1 parent 5476a70 commit 066e586
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ if Sys.iswindows()
end
else
function cd(f::Function, dir::AbstractString)
fd = ccall(:open, Int32, (Cstring, Int32), :., 0)
fd = ccall(:open, Int32, (Cstring, Int32, UInt32...), :., 0)
systemerror(:open, fd == -1)
try
cd(dir)
Expand Down
2 changes: 1 addition & 1 deletion test/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ let f = open(file, "w")
if Sys.iswindows()
f = RawFD(ccall(:_open, Cint, (Cstring, Cint), file, Base.Filesystem.JL_O_RDONLY))
else
f = RawFD(ccall(:open, Cint, (Cstring, Cint), file, Base.Filesystem.JL_O_RDONLY))
f = RawFD(ccall(:open, Cint, (Cstring, Cint, UInt32...), file, Base.Filesystem.JL_O_RDONLY))
end
test_LibcFILE(Libc.FILE(f, Libc.modestr(true, false)))
end
Expand Down
2 changes: 1 addition & 1 deletion test/testhelpers/FakePTYs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function open_fake_pty()
rc = ccall(:unlockpt, Cint, (Cint,), fdm)
rc != 0 && error("unlockpt")

fds = ccall(:open, Cint, (Ptr{UInt8}, Cint),
fds = ccall(:open, Cint, (Ptr{UInt8}, Cint, UInt32...),
ccall(:ptsname, Ptr{UInt8}, (Cint,), fdm), O_RDWR | O_NOCTTY)
pts = RawFD(fds)

Expand Down

0 comments on commit 066e586

Please sign in to comment.