Skip to content

Commit

Permalink
Revert "Define MS_ASYNC and similar constants on Windows too"
Browse files Browse the repository at this point in the history
This reverts commit fb10927.
  • Loading branch information
MikeInnes authored and KristofferC committed Jun 30, 2015
1 parent 0a8fb4b commit ec6141c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions base/docs/helpdb.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3088,7 +3088,7 @@ doc"""
MS_ASYNC
Enum constant for "msync()". See your platform man page for
details. (not meaningful on Windows).
details. (not available on Windows).
"""
Libc.MS_ASYNC
Expand All @@ -3097,7 +3097,7 @@ doc"""
MS_INVALIDATE
Enum constant for "msync()". See your platform man page for
details. (not meaningful on Windows).
details. (not available on Windows).
"""
Libc.MS_INVALIDATE
Expand All @@ -3106,7 +3106,7 @@ doc"""
MS_SYNC
Enum constant for "msync()". See your platform man page for
details. (not meaningful on Windows).
details. (not available on Windows).
"""
Libc.MS_SYNC
Expand Down
7 changes: 3 additions & 4 deletions base/libc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,6 @@ msync{T}(A::Array{T}) = msync(pointer(A), length(A)*sizeof(T))

msync(B::BitArray) = msync(pointer(B.chunks), length(B.chunks)*sizeof(UInt64))

const MS_ASYNC = 1
const MS_INVALIDATE = 2
const MS_SYNC = 4

@unix_only begin
# Low-level routines
# These are needed for things like MAP_ANONYMOUS
Expand All @@ -199,6 +195,9 @@ function munmap(p::Ptr,len::Integer)
systemerror("munmap", ccall(:munmap,Cint,(Ptr{Void},Int),p,len) != 0)
end

const MS_ASYNC = 1
const MS_INVALIDATE = 2
const MS_SYNC = 4
function msync(p::Ptr, len::Integer, flags::Integer)
systemerror("msync", ccall(:msync, Cint, (Ptr{Void}, Csize_t, Cint), p, len, flags) != 0)
end
Expand Down
6 changes: 3 additions & 3 deletions doc/stdlib/libc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@

.. data:: MS_ASYNC

Enum constant for :func:`msync`. See your platform man page for details. (not meaningful on Windows).
Enum constant for :func:`msync`. See your platform man page for details. (not available on Windows).

.. data:: MS_SYNC

Enum constant for :func:`msync`. See your platform man page for details. (not meaningful on Windows).
Enum constant for :func:`msync`. See your platform man page for details. (not available on Windows).

.. data:: MS_INVALIDATE

Enum constant for :func:`msync`. See your platform man page for details. (not meaningful on Windows).
Enum constant for :func:`msync`. See your platform man page for details. (not available on Windows).

.. function:: mmap(len, prot, flags, fd, offset)

Expand Down

0 comments on commit ec6141c

Please sign in to comment.