about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-01-29 11:28:30 +0000
committerbors <bors@rust-lang.org>2015-01-29 11:28:30 +0000
commit3d6f5100aff24aa97275dc92ade728caac605560 (patch)
tree46d24003505b7ac308de9b4d4130b73825379b64 /src/libstd
parentbedd8108dc9b79402d1ea5349d766275f73398ff (diff)
parent092330c6405c275f89fbbbb412e932dd7ed8513d (diff)
downloadrust-3d6f5100aff24aa97275dc92ade728caac605560.tar.gz
rust-3d6f5100aff24aa97275dc92ade728caac605560.zip
Auto merge of #21730 - Manishearth:rollup, r=alexcrichton
Should clear our backlog of rollups from the queue
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/sys/windows/fs.rs2
-rw-r--r--src/libstd/sys/windows/pipe.rs15
-rw-r--r--src/libstd/sys/windows/tcp.rs4
3 files changed, 7 insertions, 14 deletions
diff --git a/src/libstd/sys/windows/fs.rs b/src/libstd/sys/windows/fs.rs
index d9d1a374651..80cdf9782f2 100644
--- a/src/libstd/sys/windows/fs.rs
+++ b/src/libstd/sys/windows/fs.rs
@@ -342,7 +342,7 @@ pub fn chmod(p: &Path, mode: uint) -> IoResult<()> {
 
 pub fn rmdir(p: &Path) -> IoResult<()> {
     let p = try!(to_utf16(p));
-    mkerr_libc(unsafe { libc::wrmdir(p.as_ptr()) })
+    super::mkerr_winbool(unsafe { libc::RemoveDirectoryW(p.as_ptr()) })
 }
 
 pub fn chown(_p: &Path, _uid: int, _gid: int) -> IoResult<()> {
diff --git a/src/libstd/sys/windows/pipe.rs b/src/libstd/sys/windows/pipe.rs
index dc9fb3253ff..0bc2a827272 100644
--- a/src/libstd/sys/windows/pipe.rs
+++ b/src/libstd/sys/windows/pipe.rs
@@ -129,6 +129,9 @@ impl Drop for Event {
     }
 }
 
+unsafe impl Send for Event {}
+unsafe impl Sync for Event {}
+
 struct Inner {
     handle: libc::HANDLE,
     lock: Mutex<()>,
@@ -156,6 +159,9 @@ impl Drop for Inner {
     }
 }
 
+unsafe impl Send for Inner {}
+unsafe impl Sync for Inner {}
+
 unsafe fn pipe(name: *const u16, init: bool) -> libc::HANDLE {
     libc::CreateNamedPipeW(
         name,
@@ -220,9 +226,6 @@ pub struct UnixStream {
     write_deadline: u64,
 }
 
-unsafe impl Send for UnixStream {}
-unsafe impl Sync for UnixStream {}
-
 impl UnixStream {
     fn try_connect(p: *const u16) -> Option<libc::HANDLE> {
         // Note that most of this is lifted from the libuv implementation.
@@ -615,17 +618,11 @@ pub struct UnixAcceptor {
     deadline: u64,
 }
 
-unsafe impl Send for UnixAcceptor {}
-unsafe impl Sync for UnixAcceptor {}
-
 struct AcceptorState {
     abort: Event,
     closed: AtomicBool,
 }
 
-unsafe impl Send for AcceptorState {}
-unsafe impl Sync for AcceptorState {}
-
 impl UnixAcceptor {
     pub fn accept(&mut self) -> IoResult<UnixStream> {
         // This function has some funky implementation details when working with
diff --git a/src/libstd/sys/windows/tcp.rs b/src/libstd/sys/windows/tcp.rs
index b7e27fb37f0..64e440331c1 100644
--- a/src/libstd/sys/windows/tcp.rs
+++ b/src/libstd/sys/windows/tcp.rs
@@ -116,9 +116,6 @@ pub struct TcpAcceptor {
     deadline: u64,
 }
 
-unsafe impl Send for TcpAcceptor {}
-unsafe impl Sync for TcpAcceptor {}
-
 struct AcceptorInner {
     listener: TcpListener,
     abort: Event,
@@ -126,7 +123,6 @@ struct AcceptorInner {
     closed: AtomicBool,
 }
 
-unsafe impl Send for AcceptorInner {}
 unsafe impl Sync for AcceptorInner {}
 
 impl TcpAcceptor {