@@ -16,6 +16,14 @@ if VERSION >= v"0.4.0-dev+3844"
1616else
1717 using Base: EAGAIN
1818end
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
1927
2028const depfile = joinpath (dirname (@__FILE__ )," .." ," deps" ," deps.jl" )
2129if isfile (depfile)
@@ -61,7 +69,11 @@ function jl_zmq_error_str()
6169 end
6270end
6371
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 )
6577 @windows_only using Base. Libc: WindowsRawSocket
6678 const _FDWatcher = Base. _FDWatcher
6779 const _have_good_fdwatcher = true
@@ -251,13 +263,16 @@ end
251263
252264# Raw FD access
253265@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)))
255268if _have_good_fdwatcher
256269 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))
258272else
259273 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))
261276end
262277
263278# Socket options of string type
0 commit comments