From 3d28b8b98e6e4f55ef4ecd8babf0a050f48a3d11 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Mon, 2 Nov 2015 16:23:22 -0800 Subject: std: Migrate to the new libc * Delete `sys::unix::{c, sync}` as these are now all folded into libc itself * Update all references to use `libc` as a result. * Update all references to the new flat namespace. * Moves all windows bindings into sys::c --- src/libstd/io/stdio.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/libstd/io/stdio.rs') diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index d6a9778ced2..985dbdd895f 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -16,7 +16,6 @@ use cmp; use fmt; use io::lazy::Lazy; use io::{self, BufReader, LineWriter}; -use libc; use sync::{Arc, Mutex, MutexGuard}; use sys::stdio; use sys_common::io::{read_to_end_uninitialized}; @@ -121,9 +120,9 @@ impl io::Read for Maybe { fn handle_ebadf(r: io::Result, default: T) -> io::Result { #[cfg(windows)] - const ERR: libc::c_int = libc::ERROR_INVALID_HANDLE; + const ERR: i32 = ::sys::c::ERROR_INVALID_HANDLE as i32; #[cfg(not(windows))] - const ERR: libc::c_int = libc::EBADF; + const ERR: i32 = ::libc::EBADF as i32; match r { Err(ref e) if e.raw_os_error() == Some(ERR) => Ok(default), -- cgit 1.4.1-3-g733a5