@@ -16,6 +16,14 @@ if VERSION >= v"0.4.0-dev+3844"
16
16
else
17
17
using Base: EAGAIN
18
18
end
19
+ if VERSION >= v " 0.5.0-dev+1229"
20
+ import Base. Filesystem: UV_READABLE, uv_pollcb
21
+ else
22
+ import Base: UV_READABLE
23
+ if isdefined (Base, :uv_pollcb )
24
+ import Base: uv_pollcb
25
+ end
26
+ end
19
27
20
28
const depfile = joinpath (dirname (@__FILE__ )," .." ," deps" ," deps.jl" )
21
29
if isfile (depfile)
@@ -61,7 +69,11 @@ function jl_zmq_error_str()
61
69
end
62
70
end
63
71
64
- if VERSION >= v " 0.4-" && isdefined (Base,:_FDWatcher )
72
+ if VERSION >= v " 0.5-" && isdefined (Base, :Filesystem )
73
+ @windows_only using Base. Libc: WindowsRawSocket
74
+ const _FDWatcher = Base. Filesystem. _FDWatcher
75
+ const _have_good_fdwatcher = true
76
+ elseif VERSION >= v " 0.4-" && isdefined (Base, :_FDWatcher )
65
77
@windows_only using Base. Libc: WindowsRawSocket
66
78
const _FDWatcher = Base. _FDWatcher
67
79
const _have_good_fdwatcher = true
@@ -251,13 +263,16 @@ end
251
263
252
264
# Raw FD access
253
265
@unix_only fd (socket:: Socket ) = RawFD (get_fd (socket))
254
- @windows_only fd (socket:: Socket ) = WindowsRawSocket (convert (Ptr{Void}, get_fd (socket)))
266
+ @windows_only fd (socket:: Socket ) = WindowsRawSocket (convert (Ptr{Void},
267
+ get_fd (socket)))
255
268
if _have_good_fdwatcher
256
269
wait (socket:: Socket ) = wait (socket. pollfd, readable= true , writable= false )
257
- notify (socket:: Socket ) = Base. uv_pollcb (socket. pollfd. handle, Int32 (0 ), Int32 (Base. UV_READABLE))
270
+ notify (socket:: Socket ) = uv_pollcb (socket. pollfd. handle, Int32 (0 ),
271
+ Int32 (UV_READABLE))
258
272
else
259
273
wait (socket:: Socket ) = Base. _wait (socket. pollfd, #= readable=# true , #= writable=# false )
260
- notify (socket:: Socket ) = Base. _uv_hook_pollcb (socket. pollfd, int32 (0 ), int32 (Base. UV_READABLE))
274
+ notify (socket:: Socket ) = Base. _uv_hook_pollcb (socket. pollfd, int32 (0 ),
275
+ int32 (UV_READABLE))
261
276
end
262
277
263
278
# Socket options of string type
0 commit comments