Skip to content

Commit

Permalink
Move the include to avoid warning from Sys (#383)
Browse files Browse the repository at this point in the history
  • Loading branch information
ararslan authored Jul 21, 2017
1 parent c8df172 commit 3f2391c
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -645,22 +645,23 @@ if VERSION < v"0.7.0-DEV.1041"
chol(J::UniformScaling, args...) = UniformScaling(chol(J.λ, args...))
end

include("deprecated.jl")

# https://github.com/JuliaLang/julia/pull/21746
const macros_have_sourceloc = VERSION >= v"0.7-" && length(:(@test).args) == 2

# https://github.com/JuliaLang/julia/pull/22182
module Sys
const KERNEL = Base.Sys.KERNEL
if VERSION < v"0.7.0-DEV.914"
isapple(k::Symbol=Base.Sys.KERNEL) = k in (:Darwin, :Apple)
isbsd(k::Symbol=Base.Sys.KERNEL) = isapple(k) || k in (:FreeBSD, :OpenBSD, :NetBSD, :DragonFly)
islinux(k::Symbol=Base.Sys.KERNEL) = k == :Linux
isunix(k::Symbol=Base.Sys.KERNEL) = isbsd(k) || islinux(k)
iswindows(k::Symbol=Base.Sys.KERNEL) = k in (:Windows, :NT)
isapple(k::Symbol=KERNEL) = k in (:Darwin, :Apple)
isbsd(k::Symbol=KERNEL) = isapple(k) || k in (:FreeBSD, :OpenBSD, :NetBSD, :DragonFly)
islinux(k::Symbol=KERNEL) = k == :Linux
isunix(k::Symbol=KERNEL) = isbsd(k) || islinux(k)
iswindows(k::Symbol=KERNEL) = k in (:Windows, :NT)
else
import Base.Sys: isapple, isbsd, islinux, isunix, iswindows
end
end

include("deprecated.jl")

end # module Compat

0 comments on commit 3f2391c

Please sign in to comment.