Skip to content

Commit d5e43eb

Browse files
committed
Support basic operations down to Julia v1.0
1 parent 2184a9d commit d5e43eb

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Project.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09"
99
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
1010

1111
[compat]
12-
julia = "1.3"
1312

1413
[extras]
1514
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

src/mmap.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,31 +35,31 @@ Base.cconvert(::Type{T}, pf::MmapProtection) where {T <: Integer} = T(pf)
3535
MAP_SYNC = 0x8_0000
3636
MAP_FIXED_NOREPLACE = 0x10_0000
3737
end
38-
@static if Sys.isnetbsd() || Sys.isdragonfly() || Sys.isapple()
38+
@static if Sys.isapple() || (VERSION >= v"1.1" && (Sys.isnetbsd() || Sys.isdragonfly()))
3939
MAP_RENAME = 0x0020
4040
MAP_NORESERVE = 0x0040
4141
MAP_INHERIT = 0x0080
4242
MAP_NOEXTEND = 0x0100
4343
MAP_HASSEMAPHORE = 0x0200
4444
end
45-
@static if Sys.isfreebsd()
45+
@static if VERSION >= v"1.1" && Sys.isfreebsd()
4646
MAP_STACK = 0x0400
4747
MAP_NOSYNC = 0x0800
4848
MAP_GUARD = 0x2000
4949
MAP_EXCL = 0x4000
5050
MAP_NOCORE = 0x4_0000
5151
MAP_32BIT = 0x8_0000
52-
elseif Sys.isdragonfly()
52+
elseif VERSION >= v"1.1" && Sys.isdragonfly()
5353
MAP_STACK = 0x0400
5454
MAP_NOSYNC = 0x0800
5555
MAP_VPAGETABLE = 0x2000
5656
MAP_TRYFIXED = 0x1_0000
5757
MAP_NOCORE = 0x2_0000
5858
MAP_SIZEALIGN = 0x4_0000
59-
elseif Sys.isopenbsd()
59+
elseif VERSION >= v"1.1" && Sys.isopenbsd()
6060
MAP_STACK = 0x4000
6161
MAP_CONCEAL = 0x8000
62-
elseif Sys.isnetbsd()
62+
elseif VERSION >= v"1.1" && Sys.isnetbsd()
6363
MAP_REMAPDUP = 0x0004
6464
MAP_TRYFIXED = 0x0400
6565
MAP_WIRED = 0x0800
@@ -98,19 +98,19 @@ Base.cconvert(::Type{T}, mf::MmapFlags) where {T <: Integer} = T(mf)
9898
MADV_SOFT_OFFLINE = 101
9999
elseif Sys.isapple()
100100
MADV_FREE = 5
101-
elseif Sys.isfreebsd() || Sys.isdragonfly()
101+
elseif VERSION >= v"1.1" && (Sys.isfreebsd() || Sys.isdragonfly())
102102
MADV_FREE = 5
103103
MADV_NOSYNC = 6
104104
MADV_AUTOSYNC = 7
105105
MADV_NOCORE = 8
106106
MADV_CORE = 9
107-
@static if Sys.isfreebsd()
107+
@static if VERSION >= v"1.1" && Sys.isfreebsd()
108108
MADV_PROTECT = 10
109109
else
110110
MADV_INVAL = 10
111111
MADV_SETMAP = 11
112112
end
113-
elseif Sys.isopenbsd() || Sys.isnetbsd()
113+
elseif VERSION >= v"1.1" && (Sys.isopenbsd() || Sys.isnetbsd())
114114
MADV_SPACEAVAIL = 5
115115
MADV_FREE = 6
116116
end

0 commit comments

Comments
 (0)