about summary refs log tree commit diff
path: root/src/libstd/sys/windows/c.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2015-04-14 11:17:47 -0700
committerAlex Crichton <alex@alexcrichton.com>2015-04-14 13:50:45 -0700
commit5e073293064a227ebf454053c8aa35d7d8bdcf52 (patch)
treec47ddec7819815ebf4385a7dcab6a7f52f204b8c /src/libstd/sys/windows/c.rs
parentdabf0c6371d3b193664f58746fa27c1835a010f3 (diff)
downloadrust-5e073293064a227ebf454053c8aa35d7d8bdcf52.tar.gz
rust-5e073293064a227ebf454053c8aa35d7d8bdcf52.zip
std: Remove final usage of fds from Windows
This commit removes the last remnants of file descriptors from the Windows
implementation of `std::sys` by using `CreatePipe` to create anonymous pipes
instead of the `pipe` shim provided in msvcrt.
Diffstat (limited to 'src/libstd/sys/windows/c.rs')
-rw-r--r--src/libstd/sys/windows/c.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libstd/sys/windows/c.rs b/src/libstd/sys/windows/c.rs
index c8f6aca7bd3..a23379e6b3b 100644
--- a/src/libstd/sys/windows/c.rs
+++ b/src/libstd/sys/windows/c.rs
@@ -463,6 +463,10 @@ extern "system" {
                            nOutBufferSize: libc::DWORD,
                            lpBytesReturned: libc::LPDWORD,
                            lpOverlapped: libc::LPOVERLAPPED) -> libc::BOOL;
+    pub fn CreatePipe(hReadPipe: libc::LPHANDLE,
+                      hWritePipe: libc::LPHANDLE,
+                      lpPipeAttributes: libc::LPSECURITY_ATTRIBUTES,
+                      nSize: libc::DWORD) -> libc::BOOL;
 }
 
 #[link(name = "userenv")]