rust/library/std/src/sys/pal/unix
Chris Denton 709f4fee50
Rollup merge of #139868 - thaliaarchi:move-env-consts-pal, r=joboet
Move `pal::env` to `std::sys::env_consts`

Combine the `std::env::consts` platform implementations as a single file. Use the Unix file as the base, since it has 28 entries, and fold the 8 singleton platforms into it. The Unix file was roughly grouped into Linux, Apple, BSD, and everything else, roughly in alphabetical order. Alphabetically order them to make it easier to maintain and discard the Unix-specific groups to generalize it to all platforms.

I'd prefer to have no fallback implementation, as I consider it a bug; however TEEOS, Trusty, and Xous have no definitions here. Since they otherwise have `pal` abstractions, that indicates that there are several platforms without `pal` abstractions which are also missing here. To support unsupported, create a little macro to handle the fallback case and not introduce ordering between the `cfg`s like `cfg_if!`.

I've named the module `std::sys::env_consts`, because they are used in `std::env::consts` and I intend to use the name `std::sys::env` for the combination of `Args` and `Vars`.

cc `@joboet` `@ChrisDenton`

Tracked in #117276.
2025-04-19 15:09:35 +00:00
..
kernel_copy std: get rid of sys_common::io 2025-02-07 16:54:07 +01:00
linux Move fd into sys 2025-04-04 20:11:08 -07:00
os Don't try to use confstr in Miri 2024-11-22 07:59:51 +01:00
sync expect EINVAL for pthread_mutex_destroy for aix 2025-02-12 00:54:00 -05:00
fuchsia.rs std: move process implementations to sys 2025-03-22 12:42:34 +01:00
futex.rs library: Use size_of from the prelude instead of imported 2025-03-06 20:20:38 -08:00
kernel_copy.rs Change the syntax of the internal weak! macro 2025-03-26 16:25:05 +01:00
mod.rs Combine env consts into std::sys::env_consts 2025-04-18 19:17:08 -07:00
os.rs std: deduplicate errno accesses 2025-03-28 19:32:36 +01:00
pipe.rs Initial STD support for Cygwin 2025-03-10 21:23:31 +08:00
stack_overflow.rs Change the syntax of the internal weak! macro 2025-03-26 16:25:05 +01:00
thread.rs Rollup merge of #139667 - 1c3t3a:remove-no-sanitize, r=m-ou-se 2025-04-17 00:16:21 +02:00
thread_parking.rs Mark extern blocks as unsafe 2025-02-09 17:11:13 +00:00
time.rs cfi: Remove #[no_sanitize(cfi)] for extern weak functions 2025-04-11 10:15:55 +00:00
weak.rs cfi: Remove #[no_sanitize(cfi)] for extern weak functions 2025-04-11 10:15:55 +00:00