Skip to content

Commit

Permalink
Fix 5
Browse files Browse the repository at this point in the history
  • Loading branch information
staticfloat committed Mar 22, 2018
1 parent 5b526ac commit 42c1909
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions base/sysinfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,12 @@ const WINDOWS_VISTA_VER = v"6.0"
Returns `true` if the given `path` has executable permissions.
"""
function isexecutable(path::AbstractString)
# We use `access()` and `X_OK` to determine if a given path is executable
# by the current user. `X_OK` comes from `unistd.h`.
X_OK = 1 << 0
@static if iswindows()
ccall(:_access, Cint, (Ptr{UInt8}, Cint), path, X_OK) == 0
return true
else
# We use `access()` and `X_OK` to determine if a given path is
# executable by the current user. `X_OK` comes from `unistd.h`.
X_OK = 0x01
ccall(:access, Cint, (Ptr{UInt8}, Cint), path, X_OK) == 0
end
end
Expand Down

0 comments on commit 42c1909

Please sign in to comment.