about summary refs log tree commit diff
path: root/library/std/src/sys
AgeCommit message (Collapse)AuthorLines
2020-10-10Remove `target_os`, which does not have `SO_PASSCRED` constant in `libc`LinkTed-56/+5
2020-10-10Remove `target_os`, which does not have `cmsghdr` struct in `libc`LinkTed-12/+0
2020-10-10Remove `target_os`, which does not have `MSG_CMSG_CLOEXEC` constant in `libc`LinkTed-54/+31
2020-10-10Add the code of the tracking issueLinkTed-36/+36
2020-10-10Replace `assert` with `unreachable`LinkTed-3/+3
2020-10-10Cast boolean into int directly in function set_passcredLinkTed-2/+1
2020-10-10Remove unsupported target_os for SocketCredLinkTed-125/+7
2020-10-10Change standard types to libc typesLinkTed-6/+8
2020-10-10Change name of struct to SocketCredLinkTed-9/+9
2020-10-10Change API to unsafe and add doc commentsLinkTed-3/+20
2020-10-10Add `set_passcred` and `passcred` methods to `UnixStream` and `UnixDatagram`LinkTed-11/+131
2020-10-10Rename `test.rs` to `tests.rs`LinkTed-625/+19
2020-10-10Add doc commentsLinkTed-1/+21
2020-10-10Add doc(cfg(...))LinkTed-0/+24
2020-10-10Reduce impl trait by using macro in `raw_fd.rs`LinkTed-61/+34
2020-10-10Move conditional compilation to the upper module and sort the target OS list ↵LinkTed-189/+199
alphabetically
2020-10-10Remove unnecessary pathLinkTed-1/+1
2020-10-10Use `fill` instead of `memset`LinkTed-9/+16
2020-10-10Remove inner function in `bind`, `connect` and `send_to`LinkTed-49/+33
2020-10-10Remove lifetime annotation in `messages` functionLinkTed-1/+1
2020-10-10Remove `Clone` trait bound in `add_to_ancillary_data`LinkTed-1/+1
2020-10-10Add integer overflow checkLinkTed-1/+9
2020-10-10Replace `TryFrom` of `AncillaryData` with a private method.LinkTed-23/+18
2020-10-10Using `read_unaligned` instead of `memcpy`.LinkTed-8/+6
2020-10-10Move `add_to_ancillary_data` and `AncillaryDataIter` to ancillary.rsLinkTed-87/+86
2020-10-10Add UCred structLinkTed-9/+53
2020-10-10Add AncillaryErrorLinkTed-29/+44
2020-10-10Split net.rs into multiple filesLinkTed-2635/+3297
2020-10-10unix: Extend UnixStream and UnixDatagram to send and receive file descriptorsLinkTed-0/+1111
Add the functions `recv_vectored_fds` and `send_vectored_fds` to send and receive file descriptors, by using `recvmsg` and `sendmsg` system call.
2020-10-10Auto merge of #77717 - tmiasko:posix-spawn-error-check, r=cuviperbors-18/+24
Fix error checking in posix_spawn implementation of Command * Check for errors returned from posix_spawn*_init functions * Check for non-zero return value from posix_spawn functions
2020-10-09simplify the cfg in ReadDir constructionJosh Stone-8/+6
Co-authored-by: David Tolnay <dtolnay@gmail.com>
2020-10-09remove ReadDir.end_of_stream on targets that don't use itJosh Stone-1/+18
2020-10-09unix/vxworks: make DirEntry slightly smallerJosh Stone-10/+8
`DirEntry` contains a `ReadDir` handle, which used to just be a wrapper on `Arc<InnerReadDir>`. Commit af75314ecdbc5 added `end_of_stream: bool` which is not needed by `DirEntry`, but adds 8 bytes after padding. We can let `DirEntry` have an `Arc<InnerReadDir>` directly to avoid that.
2020-10-09Remove some dead code in windows-gnu stdMateusz Mikuła-64/+0
2020-10-08Implement the same optimization in windows/timeThom Chiovoloni-19/+17
2020-10-08Switch to using a single atomic and treating 0 as 'uninitialized'Thom Chiovoloni-16/+12
2020-10-09Assert state in sys/unsupported's RwLock::write_unlock.Mara Bos-1/+1
Co-authored-by: Joshua Nelson <joshua@yottadb.com>
2020-10-08Fiddle with the commentsThom Chiovoloni-5/+5
2020-10-08Check for errors returned from posix_spawn*_init functionsTomasz Miąsko-8/+10
The posix_spawnattr_init & posix_spawn_file_actions_init might fail, but their return code is not checked. Check for non-zero return code and destroy only succesfully initialized objects.
2020-10-08Check for non-zero return value from posix_spawn functionsTomasz Miąsko-10/+14
The cvt function compares the argument with -1 and when equal returns a new io::Error constructed from errno. It is used together posix_spawn_* functions. This is incorrect. Those functions do not set errno. Instead they return non-zero error code directly. Check for non-zero return code and use it to construct a new io::Error.
2020-10-08Apply deny(unsafe_op_in_unsafe_fn) to all of sys/unsupported.Mara Bos-9/+10
2020-10-08Implement `AsRawFd` for `StdinLock` etc. on WASI.Dan Gohman-0/+18
WASI implements `AsRawFd` for `Stdin`, `Stdout`, and `Stderr`, so implement it for `StdinLock`, `StdoutLock`, and `StderrLock` as well.
2020-10-08Avoid SeqCst or static mut in mach_timebase_info cacheThom Chiovoloni-22/+36
2020-10-08Remove unsafety from unsupported/rwlosck.rs by using a Cell.Mara Bos-18/+16
Replacing the UnsafeCell by a Cell makes it all safe.
2020-10-08Remove unsafety from unsupported/mutex.rs by using a Cell.Mara Bos-14/+8
Replacing the UnsafeCell by a Cell simplifies things and makes it all safe.
2020-10-08Remove unnecessary rustc_const_stable attributes.Mara Bos-1/+0
2020-10-08Auto merge of #77346 - Caduser2020:master, r=Mark-Simulacrumbors-119/+170
`#[deny(unsafe_op_in_unsafe_fn)]` in sys/sgx This is part of #73904. Enclose unsafe operations in unsafe blocks in `libstd/sys/sgx`.
2020-10-08`#[deny(unsafe_op_in_unsafe_fn)]` in sys/sgxCaduser2020-119/+170
Run `./x.py` fmt Add reference link Fix reference link Apply review suggestions.
2020-10-08Remove #![allow(unsafe_op_in_unsafe_fn)] except for mod.rsmaekawatoshiki-15/+0
2020-10-07Formatting.Mara Bos-1/+5