Merge branch 'iovec-cleanup' into 'master'
eliminate export function for struct iovec See merge request redox-os/relibc!1272
This commit is contained in:
@@ -16,3 +16,6 @@ cpp_compat = true
|
||||
|
||||
[enum]
|
||||
prefix_with_name = true
|
||||
|
||||
[export]
|
||||
include = ["iovec"]
|
||||
|
||||
@@ -4,6 +4,7 @@ use core::slice;
|
||||
use crate::platform::types::{c_void, size_t};
|
||||
|
||||
/// See <https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/sys_uio.h.html>.
|
||||
#[allow(non_camel_case_types)]
|
||||
#[repr(C)]
|
||||
#[derive(Debug, CheckVsLibcCrate)]
|
||||
pub struct iovec {
|
||||
@@ -33,6 +34,3 @@ pub unsafe fn scatter(iovs: &[iovec], vec: Vec<u8>) {
|
||||
i += slice.len();
|
||||
}
|
||||
}
|
||||
|
||||
#[unsafe(no_mangle)]
|
||||
pub unsafe extern "C" fn cbindgen_alias_iovec(_: iovec) {}
|
||||
|
||||
@@ -6,7 +6,7 @@ use core::{mem, ptr};
|
||||
|
||||
use crate::{
|
||||
error::ResultExt,
|
||||
header::{bits_iovec::iovec, bits_safamily_t::sa_family_t},
|
||||
header::{bits_safamily_t::sa_family_t, sys_uio::iovec},
|
||||
platform::{
|
||||
PalSocket, Sys,
|
||||
types::{
|
||||
|
||||
@@ -5,16 +5,15 @@
|
||||
use core::slice;
|
||||
|
||||
use crate::{
|
||||
header::{
|
||||
bits_iovec::{gather, iovec, scatter},
|
||||
errno, unistd,
|
||||
},
|
||||
header::{errno, unistd},
|
||||
platform::{
|
||||
self,
|
||||
types::{c_int, c_void, off_t, ssize_t},
|
||||
},
|
||||
};
|
||||
|
||||
pub use crate::header::bits_iovec::{gather, iovec, scatter};
|
||||
|
||||
pub const IOV_MAX: c_int = 1024;
|
||||
|
||||
/// Non-POSIX, see <https://man7.org/linux/man-pages/man2/readv.2.html>.
|
||||
|
||||
@@ -12,7 +12,7 @@ use syscall::{
|
||||
|
||||
use crate::{
|
||||
header::{
|
||||
bits_iovec::iovec, errno::EINVAL, fcntl::AT_FDCWD, signal::sigaction, sys_stat::UTIME_NOW,
|
||||
errno::EINVAL, fcntl::AT_FDCWD, signal::sigaction, sys_stat::UTIME_NOW, sys_uio::iovec,
|
||||
time::timespec,
|
||||
},
|
||||
out::Out,
|
||||
|
||||
@@ -13,7 +13,6 @@ use crate::{
|
||||
error::{Errno, Result},
|
||||
header::{
|
||||
arpa_inet::inet_aton,
|
||||
bits_iovec::iovec,
|
||||
bits_safamily_t::sa_family_t,
|
||||
errno::{
|
||||
EAFNOSUPPORT, EDOM, EFAULT, EINVAL, EMSGSIZE, ENOMEM, ENOSYS, ENOTSOCK, EOPNOTSUPP,
|
||||
@@ -26,6 +25,7 @@ use crate::{
|
||||
CMSG_ALIGN, CMSG_DATA, CMSG_FIRSTHDR, CMSG_LEN, CMSG_NXTHDR, CMSG_SPACE, cmsghdr,
|
||||
constants::*, msghdr, sockaddr, socklen_t, ucred,
|
||||
},
|
||||
sys_uio::iovec,
|
||||
sys_un::sockaddr_un,
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user