Skip to content

Commit

Permalink
Use Vista as cutoff
Browse files Browse the repository at this point in the history
XP 64 or Server 2003 are version 5.2, apparently
  • Loading branch information
tkelman committed May 5, 2015
1 parent 2888210 commit 0fa3e34
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions base/fs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ end

@windows_only const UV_FS_SYMLINK_JUNCTION = 0x0002
function symlink(p::AbstractString, np::AbstractString)
@windows_only if Base.windows_version() <= Base.WINDOWS_XP_VER
error("WindowsXP does not support soft symlinks")
@windows_only if Base.windows_version() < Base.WINDOWS_VISTA_VER
error("Windows XP does not support soft symlinks")
end
flags = 0
@windows_only if isdir(p); flags |= UV_FS_SYMLINK_JUNCTION; p = abspath(p); end
Expand Down
2 changes: 1 addition & 1 deletion base/osutils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ end
end
@unix_only windows_version() = (0,0)

WINDOWS_XP_VER = (5,1)
WINDOWS_VISTA_VER = (6,0)
2 changes: 1 addition & 1 deletion base/pkg/cache.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function mkcachedir()
return
end

@windows_only if Base.windows_version() <= Base.WINDOWS_XP_VER
@windows_only if Base.windows_version() < Base.WINDOWS_VISTA_VER
mkdir(cache)
return
end
Expand Down
2 changes: 1 addition & 1 deletion test/backtrace.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ end
dlls = Libdl.dllist()
@test !isempty(dlls)
@test length(dlls) > 3 # at a bare minimum, probably have some version of libstdc, libgcc, libjulia, ...
if @unix? true : (Base.windows_version() > Base.WINDOWS_XP_VER)
if @unix? true : (Base.windows_version() >= Base.WINDOWS_VISTA_VER)
@test Base.samefile(Libdl.dlpath(dlls[1]), dlls[1])
@test Base.samefile(Libdl.dlpath(dlls[end]), dlls[end])
end
Expand Down
8 changes: 4 additions & 4 deletions test/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ mkdir(subdir)
subdir2 = joinpath(dir, "adir2")
mkdir(subdir2)

if @unix? true : (Base.windows_version() > Base.WINDOWS_XP_VER)
if @unix? true : (Base.windows_version() >= Base.WINDOWS_VISTA_VER)
dirlink = joinpath(dir, "dirlink")
symlink(subdir, dirlink)
# relative link
Expand Down Expand Up @@ -70,7 +70,7 @@ end
@unix_only @test islink(link) == true
@unix_only @test readlink(link) == file

if @unix? true : (Base.windows_version() > Base.WINDOWS_XP_VER)
if @unix? true : (Base.windows_version() >= Base.WINDOWS_VISTA_VER)
@test islink(dirlink) == true
@test isdir(dirlink) == true
@test readlink(dirlink) == subdir * @windows? "\\" : ""
Expand Down Expand Up @@ -441,7 +441,7 @@ rm(cfile)

# issue #10506 #10434
## Tests for directories and links to directories
if @unix? true : (Base.windows_version() > Base.WINDOWS_XP_VER)
if @unix? true : (Base.windows_version() >= Base.WINDOWS_VISTA_VER)
function setup_dirs(tmpdir)
srcdir = joinpath(tmpdir, "src")
hidden_srcdir = joinpath(tmpdir, ".hidden_srcdir")
Expand Down Expand Up @@ -729,7 +729,7 @@ end
rm(link)
rm(rellink)
end
if @unix? true : (Base.windows_version() > Base.WINDOWS_XP_VER)
if @unix? true : (Base.windows_version() >= Base.WINDOWS_VISTA_VER)
rm(dirlink)
rm(relsubdirlink)
end
Expand Down
4 changes: 2 additions & 2 deletions test/repl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ccall(:jl_exit_on_sigint, Void, (Cint,), 0)
# in the mix. If verification needs to be done, keep it to the bare minimum. Basically
# this should make sure nothing crashes without depending on how exactly the control
# characters are being used.
if @unix? true : (Base.windows_version() > Base.WINDOWS_XP_VER)
if @unix? true : (Base.windows_version() >= Base.WINDOWS_VISTA_VER)
stdin_write, stdout_read, stdout_read, repl = fake_repl()

repl.specialdisplay = Base.REPL.REPLDisplay(repl)
Expand Down Expand Up @@ -277,7 +277,7 @@ close(master)
end

# Test stream mode
if @unix? true : (Base.windows_version() > Base.WINDOWS_XP_VER)
if @unix? true : (Base.windows_version() >= Base.WINDOWS_VISTA_VER)
outs, ins, p = readandwrite(`$exename --startup-file=no --quiet`)
write(ins,"1\nquit()\n")
@test readall(outs) == "1\n"
Expand Down
2 changes: 1 addition & 1 deletion test/socket.jl
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ begin
close(a)
close(b)
end
if @unix? true : (Base.windows_version() > Base.WINDOWS_XP_VER)
if @unix? true : (Base.windows_version() >= Base.WINDOWS_VISTA_VER)
a = UDPSocket()
b = UDPSocket()
bind(a, ip"::1", UInt16(port))
Expand Down

0 comments on commit 0fa3e34

Please sign in to comment.