about summary refs log tree commit diff
path: root/library/std/src/sys/pal/unix
AgeCommit message (Collapse)AuthorLines
2024-01-27std: thread_local::register_dtor fix proposal for FreeBSD.David Carlier-2/+2
following-up 5d3d347 commit, rust started to spin __cxa_thread_call_dtors warnings even without any TLS usage. using instead home made TLS destructor handler `register_dtor_fallback`. close #120413
2024-01-24Finishing clone3 clean upAskar Safin-2/+1
2024-01-24This commit is part of clone3 clean up. Merge tests from ↵Askar Safin-2/+18
tests/ui/command/command-create-pidfd.rs to library/std/src/sys/pal/unix/process/process_unix/tests.rs to remove code duplication
2024-01-24This commit is part of clone3 clean up. As part of clean up we willAskar Safin-1/+12
remove tests/ui/command/command-create-pidfd.rs . But it contains very useful comment, so let's move the comment to library/std/src/sys/pal/unix/rand.rs , which contains another instance of the same Docker problem
2024-01-23Rollup merge of #120188 - devnexen:update_bsd_compiler_base_specs, r=wesleywiserLeón Orell Valerian Liehr-1/+4
compiler: update freebsd and netbsd base specs. both support thread local.
2024-01-22fixing build for the BSDDavid Carlier-1/+4
2024-01-22Rollup merge of #120109 - joboet:move_pal_cmath, r=ChrisDentonMatthias Krüger-39/+0
Move cmath into `sys` Part of #117276. r? ``@ChrisDenton``
2024-01-22Rollup merge of #117910 - madsmtm:msg-send-no-clashing, r=thomccMatthias Krüger-37/+44
Refactor uses of `objc_msgSend` to no longer have clashing definitions This is very similar to what Apple's own headers encourage you to do (cast the function pointer before use instead of making new declarations). Additionally, I'm documenting a few of the memory management rules we're following, ensuring that the `args` function doesn't leak memory (if you wrap it in an autorelease pool). Motivation is to avoid issues with clashing definitions, like described in https://github.com/rust-lang/rust/issues/12707#issuecomment-1570735643 and https://github.com/rust-lang/rust/issues/46188#issuecomment-1288058453, CC ``@bjorn3.``
2024-01-22std: move cmath into `sys`joboet-39/+0
2024-01-15std: move OS String implementation into `sys`joboet-306/+0
2024-01-13Refactor uses of `objc_msgSend` to no longer have clashing definitionsMads Marquart-37/+44
This is very similar to what Apple's own headers encourage you to do (cast the function pointer before use instead of making new declarations). Additionally, I'm documenting a few of the memory management rules we're following, ensuring that the `args` function doesn't leak memory (if you wrap it in an autorelease pool).
2024-01-11std: fix module references on UNIXjoboet-8/+8
2024-01-11std: begin moving platform support modules into `pal`joboet-0/+15123
2023-10-25Convert `Unix{Datagram,Stream}::{set_}passcred()` to per-OS traitsJohn Millikin-10/+16
These methods are the pre-stabilized API for obtaining peer credentials from an `AF_UNIX` socket, part of the `unix_socket_ancillary_data` feature. Their current behavior is to get/set one of the `SO_PASSCRED` (Linux), `LOCAL_CREDS_PERSISTENT` (FreeBSD), or `LOCAL_CREDS` (NetBSD) socket options. On other targets the `{set_}passcred()` methods do not exist. There are two problems with this approach: 1. Having public methods only exist for certain targets isn't permitted in a stable `std` API. 2. These options have generally similar purposes, but they are non-POSIX and their details can differ in subtle and surprising ways (such as whether they continue to be set after the next call to `recvmsg()`). Splitting into OS-specific extension traits is the preferred solution to both problems.