diff options
| author | bors <bors@rust-lang.org> | 2019-10-20 06:10:51 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-10-20 06:10:51 +0000 |
| commit | 7bf377f289a4f79829309ed69dccfe33f20b089c (patch) | |
| tree | d97a9a5cc582cc5f0ec5ccff051d08855f00be67 /src/libstd/sys | |
| parent | e66a6282275802fcb0a29ba58ddc445fc64ac8ef (diff) | |
| parent | 6de4924b6c1ff5a99397ca1a3894c51f085f3e6f (diff) | |
| download | rust-7bf377f289a4f79829309ed69dccfe33f20b089c.tar.gz rust-7bf377f289a4f79829309ed69dccfe33f20b089c.zip | |
Auto merge of #65469 - mati865:libc, r=alexcrichton
Update libc to 0.2.64 Passed local tests. cc potentially interested people: @gnzlbg @tlively
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/unix/fd.rs | 34 | ||||
| -rw-r--r-- | src/libstd/sys/unix/fs.rs | 2 |
2 files changed, 2 insertions, 34 deletions
diff --git a/src/libstd/sys/unix/fd.rs b/src/libstd/sys/unix/fd.rs index ac43526b50f..ba611a6b7e7 100644 --- a/src/libstd/sys/unix/fd.rs +++ b/src/libstd/sys/unix/fd.rs @@ -71,22 +71,7 @@ impl FileDesc { #[cfg(target_os = "android")] use super::android::cvt_pread64; - #[cfg(target_os = "emscripten")] - unsafe fn cvt_pread64(fd: c_int, buf: *mut c_void, count: usize, offset: i64) - -> io::Result<isize> - { - use crate::convert::TryInto; - use libc::pread64; - // pread64 on emscripten actually takes a 32 bit offset - if let Ok(o) = offset.try_into() { - cvt(pread64(fd, buf, count, o)) - } else { - Err(io::Error::new(io::ErrorKind::InvalidInput, - "cannot pread >2GB")) - } - } - - #[cfg(not(any(target_os = "android", target_os = "emscripten")))] + #[cfg(not(target_os = "android"))] unsafe fn cvt_pread64(fd: c_int, buf: *mut c_void, count: usize, offset: i64) -> io::Result<isize> { @@ -128,22 +113,7 @@ impl FileDesc { #[cfg(target_os = "android")] use super::android::cvt_pwrite64; - #[cfg(target_os = "emscripten")] - unsafe fn cvt_pwrite64(fd: c_int, buf: *const c_void, count: usize, offset: i64) - -> io::Result<isize> - { - use crate::convert::TryInto; - use libc::pwrite64; - // pwrite64 on emscripten actually takes a 32 bit offset - if let Ok(o) = offset.try_into() { - cvt(pwrite64(fd, buf, count, o)) - } else { - Err(io::Error::new(io::ErrorKind::InvalidInput, - "cannot pwrite >2GB")) - } - } - - #[cfg(not(any(target_os = "android", target_os = "emscripten")))] + #[cfg(not(target_os = "android"))] unsafe fn cvt_pwrite64(fd: c_int, buf: *const c_void, count: usize, offset: i64) -> io::Result<isize> { diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index 13dd9f5f34f..39cc120594a 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -785,8 +785,6 @@ impl File { SeekFrom::End(off) => (libc::SEEK_END, off), SeekFrom::Current(off) => (libc::SEEK_CUR, off), }; - #[cfg(target_os = "emscripten")] - let pos = pos as i32; let n = cvt(unsafe { lseek64(self.0.raw(), pos, whence) })?; Ok(n as u64) } |
