From d311079a6f70577d02f35bb80d27eef7e2b18a4a Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 22 Sep 2016 00:29:00 +0000 Subject: std: Move platform specific stdio code into sys --- src/libstd/sys/unix/stdio.rs | 2 ++ src/libstd/sys/windows/stdio.rs | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src/libstd/sys') diff --git a/src/libstd/sys/unix/stdio.rs b/src/libstd/sys/unix/stdio.rs index 972bdbc3818..947ba2cc752 100644 --- a/src/libstd/sys/unix/stdio.rs +++ b/src/libstd/sys/unix/stdio.rs @@ -65,3 +65,5 @@ impl io::Write for Stderr { } fn flush(&mut self) -> io::Result<()> { Ok(()) } } + +pub const EBADF_ERR: i32 = ::libc::EBADF as i32; diff --git a/src/libstd/sys/windows/stdio.rs b/src/libstd/sys/windows/stdio.rs index 01249f05f62..5f097d2631d 100644 --- a/src/libstd/sys/windows/stdio.rs +++ b/src/libstd/sys/windows/stdio.rs @@ -205,3 +205,5 @@ impl Output { fn invalid_encoding() -> io::Error { io::Error::new(io::ErrorKind::InvalidData, "text was not valid unicode") } + +pub const EBADF_ERR: i32 = ::sys::c::ERROR_INVALID_HANDLE as i32; -- cgit 1.4.1-3-g733a5