about summary refs log tree commit diff
path: root/src/libstd/env.rs
AgeCommit message (Collapse)AuthorLines
2016-05-12Cleanup formatting and wording for `std::env::temp_dir` docs.Corey Farwell-10/+10
2016-04-06Rollup merge of #32691 - frewsxcv:patch-28, r=alexcrichtonSteve Klabnik-1/+1
Indicate `None` is code-like in doc comment.
2016-04-06Rollup merge of #31762 - tshepang:in-which-case, r=steveklabnikSteve Klabnik-8/+8
doc: there is no case that is shown, so something was likely missing … …from the change
2016-04-05doc: make env::consts summaries less confusingTshepang Lekhonkhobe-8/+8
2016-04-02Indicate `None` is code-like in doc comment.Corey Farwell-1/+1
2016-03-30doc: "of the" seems more correct than "to the"Tshepang Lekhonkhobe-8/+8
It's also less ambiguous
2016-02-28doc: "ref" not needed in the exampleTshepang Lekhonkhobe-1/+1
Also, `path` seems better than `p`
2016-02-26Rollup merge of #31896 - tshepang:idiom, r=steveklabnikManish Goregaokar-1/+1
2016-02-26Rollup merge of #31894 - tshepang:more-clear, r=steveklabnikManish Goregaokar-2/+1
2016-02-25doc: follow the idiom of adding a trailing commaTshepang Lekhonkhobe-1/+1
2016-02-25doc: that explanation was a messTshepang Lekhonkhobe-2/+1
2016-02-25doc: add missing commaTshepang Lekhonkhobe-1/+1
2016-02-24Auto merge of #31778 - aturon:snapshot, r=alexcrichtonbors-1/+1
r? @alexcrichton
2016-02-23Register new snapshotsAaron Turon-1/+1
2016-02-19Rollup merge of #31765 - tshepang:shorten, r=steveklabnikSteve Klabnik-1/+1
2016-02-19Rollup merge of #31764 - tshepang:overlong-sentence, r=steveklabnikSteve Klabnik-1/+1
2016-02-18doc: make the sentence more simpleTshepang Lekhonkhobe-1/+1
2016-02-18doc: reduce overlong sentenceTshepang Lekhonkhobe-1/+1
2016-02-18doc: remove a word that makes the sentence hard to readTshepang Lekhonkhobe-1/+1
2016-02-06Add the asmjs-unknown-emscripten triple. Add cfgs to libs.Brian Anderson-0/+16
Backtraces, and the compilation of libbacktrace for asmjs, are disabled. This port doesn't use jemalloc so, like pnacl, it disables jemalloc *for all targets* in the configure file. It disables stack protection.
2016-02-03Auto merge of #31078 - nbaksalyar:illumos, r=alexcrichtonbors-0/+12
This pull request adds support for [Illumos](http://illumos.org/)-based operating systems: SmartOS, OpenIndiana, and others. For now it's x86-64 only, as I'm not sure if 32-bit installations are widespread. This PR is based on #28589 by @potatosalad, and also closes #21000, #25845, and #25846. Required changes in libc are already merged: https://github.com/rust-lang-nursery/libc/pull/138 Here's a snapshot required to build a stage0 compiler: https://s3-eu-west-1.amazonaws.com/nbaksalyar/rustc-sunos-snapshot.tar.gz It passes all checks from `make check`. There are some changes I'm not quite sure about, e.g. macro usage in `src/libstd/num/f64.rs` and `DirEntry` structure in `src/libstd/sys/unix/fs.rs`, so any comments on how to rewrite it better would be greatly appreciated. Also, LLVM configure script might need to be patched to build it successfully, or a pre-built libLLVM should be used. Some details can be found here: https://llvm.org/bugs/show_bug.cgi?id=25409 Thanks! r? @brson
2016-02-01Remove "powerpc64le" and "mipsel" target_archAlex Crichton-12/+0
Currently the `mipsel-unknown-linux-gnu` target doesn't actually set the `target_arch` value to `mipsel` but it rather uses `mips`. Alternatively the `powerpc64le` target does indeed set the `target_arch` as `powerpc64le`, causing a bit of inconsistency between theset two. As these are just the same instance of one instruction set, let's use `target_endian` to switch between them and only set the `target_arch` as one value. This should cut down on the number of `#[cfg]` annotations necessary and all around be a little more ergonomic.
2016-01-31Rename sunos to solarisNikita Baksalyar-3/+3
2016-01-31Add Illumos supportNikita Baksalyar-0/+12
2016-01-15Auto merge of #30898 - petrochenkov:tvarfstab, r=alexcrichtonbors-1/+1
This wasn't done in https://github.com/rust-lang/rust/pull/29083 because attributes weren't parsed on fields of tuple variant back then. r? @alexcrichton
2016-01-14Require stability annotations on fields of tuple variantsVadim Petrochenkov-1/+1
2016-01-13Add powerpc64 and powerpc64le supportAnton Blanchard-0/+12
This adds support for big endian and little endian PowerPC64. make check runs clean apart from one big endian backtrace issue.
2015-12-01Small fix to EXE_SUFFIX and DLL_EXTENSION docsSteve Klabnik-4/+6
2015-11-29Fix #30093Jack Fransham-1/+1
2015-11-08Spell out the fallback of `std::env::home_dir` on POSIXTobias Bucher-1/+3
2015-11-06Auto merge of #29305 - alexcrichton:bad-getenv, r=brsonbors-10/+10
As discovered in #29298, `env::set_var("", "")` will panic, but it turns out that it *also* deadlocks on Unix systems. This happens because if a panic happens while holding the environment lock, we then go try to read RUST_BACKTRACE, grabbing the environment lock, causing a deadlock. Specifically, the changes made here are: * The environment lock is pushed into `std::sys` instead of `std::env`. This also only puts it in the Unix implementation, not Windows where the functions are already threadsafe. * The `std::sys` implementation now returns `io::Result` so panics are explicitly at the `std::env` level.
2015-10-30Tweak env docs a bitSteven Fackler-3/+3
The "optionally" stuff just makes things confusing.
2015-10-29Auto merge of #29289 - DiamondLovesYou:pnacl-std-crates, r=alexcrichtonbors-0/+26
2015-10-28Port the standard crates to PNaCl/NaCl.Richard Diamond-0/+26
2015-10-26std: Slightly more robust env var handlingAlex Crichton-10/+10
As discovered in #29298, `env::set_var("", "")` will panic, but it turns out that it *also* deadlocks on Unix systems. This happens because if a panic happens while holding the environment lock, we then go try to read RUST_BACKTRACE, grabbing the environment lock, causing a deadlock. Specifically, the changes made here are: * The environment lock is pushed into `std::sys` instead of `std::env`. This also only puts it in the Unix implementation, not Windows where the functions are already threadsafe. * The `std::sys` implementation now returns `io::Result` so panics are explicitly at the `std::env` level. The panic messages have also been improved in these situations.
2015-10-25Say that `std::env::{set_var, unset_var}` *may* panicTobias Bucher-4/+6
Previously the documentation suggested that the documentation about the panics are guarantees.
2015-10-25Document possible panics for `std::env::{set_var, unset_var}`Tobias Bucher-0/+10
2015-10-11Clarify the behavior of `std::env::home_dir` and `std::env::temp_dir`Barosl Lee-2/+9
This concern was raised by #28940.
2015-09-09Reduce code bloat from conversion traits in function parametersVadim Petrochenkov-3/+19
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-33/+0
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
2015-07-27std: Deprecate a number of unstable featuresAlex Crichton-0/+2
Many of these have long since reached their stage of being obsolete, so this commit starts the removal process for all of them. The unstable features that were deprecated are: * cmp_partial * fs_time * hash_default * int_slice * iter_min_max * iter_reset_fuse * iter_to_vec * map_in_place * move_from * owned_ascii_ext * page_size * read_and_zero * scan_state * slice_chars * slice_position_elem * subslice_offset
2015-07-16Fixed typoKristof Söderström-1/+1
2015-07-08Make `std::env::current_dir` work for path names longer than 2048 bytes on ↵Tobias Bucher-1/+0
non-Windows
2015-07-01Add netbsd amd64 supportAlex Newman-0/+12
2015-06-17std: Deprecate the `exit_status` featureAlex Crichton-0/+2
These two functions should be replaceable with the `process::exit` function.
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-1/+1
2015-05-28Rollup merge of #25668 - steveklabnik:doc_const, r=alexcrichtonManish Goregaokar-0/+54
2015-05-27Use `const fn` to abstract away the contents of UnsafeCell & friends.Eduard Burtescu-4/+4
2015-05-26Document std::env::const valuesSteve Klabnik-0/+54
2015-05-13libstd/env: Add non-Rust synchronization warnings for setenv()Colin Walters-0/+22
See: https://sourceware.org/bugzilla/show_bug.cgi?id=4887#c9 https://bugs.freedesktop.org/show_bug.cgi?id=65681 I just noticed this while talking to someone who was using `os.environ['FOO'] = 'BAR'` in Python and since I'm learning Rust, I was curious if it did anything special here. It looks like Rust has an internal mutex, which helps for apps that are pure Rust, but it will be an evil trap for someone later adding in native code (apps like Servo and games will be at risk). Java got this right by disallowing `setenv()` from the start. I suggest Rust program authors only use `setenv()` early in main.