summary refs log tree commit diff
path: root/src/libstd/os.rs
AgeCommit message (Collapse)AuthorLines
2014-10-07Rename slice::SliceNick Cameron-1/+1
2014-10-07Use slice syntax instead of slice_to, etc.Nick Cameron-1/+1
2014-10-02Revert "Review and rebasing changes"Aaron Turon-1/+1
This reverts commit 6e0611a48707a1f5d90aee32a02b2b15957ef25b.
2014-10-02Review and rebasing changesNick Cameron-1/+1
2014-09-30Fix libstdSteven Fackler-20/+16
2014-09-23Fixed: iOS build was broken because of deprecated APIsValerii Hiora-3/+1
2014-09-21Fix fallout from Vec stabilizationAlex Crichton-23/+27
2014-09-21Remove #[allow(deprecated)] from libstdAlex Crichton-4/+5
2014-09-16Fallout from renamingAaron Turon-10/+10
2014-08-30Unify non-snake-case lints and non-uppercase statics lintsP1start-1/+1
This unifies the `non_snake_case_functions` and `uppercase_variables` lints into one lint, `non_snake_case`. It also now checks for non-snake-case modules. This also extends the non-camel-case types lint to check type parameters, and merges the `non_uppercase_pattern_statics` lint into the `non_uppercase_statics` lint. Because the `uppercase_variables` lint is now part of the `non_snake_case` lint, all non-snake-case variables that start with lowercase characters (such as `fooBar`) will now trigger the `non_snake_case` lint. New code should be updated to use the new `non_snake_case` lint instead of the previous `non_snake_case_functions` and `uppercase_variables` lints. All use of the `non_uppercase_pattern_statics` should be replaced with the `non_uppercase_statics` lint. Any code that previously contained non-snake-case module or variable names should be updated to use snake case names or disable the `non_snake_case` lint. Any code with non-camel-case type parameters should be changed to use camel case or disable the `non_camel_case_types` lint. [breaking-change]
2014-08-26Use temp vars for implicit coercion to ^[T]Nick Cameron-1/+2
2014-08-23Complete renaming of win32 to windowsVadim Chugunov-6/+6
2014-08-23Remove stage0 attributes.Vadim Chugunov-1/+0
2014-08-20liblibc: don't use int/uint for intptr_t/uintptr_tCorey Richardson-1/+1
int/uint aren't considered FFI safe, replace them with the actual type they represent (i64/u64 or i32/u32). This is a breaking change, but at most a cast to `uint` or `int` needs to be added. [breaking-change]
2014-08-15auto merge of #16435 : vadimcn/rust/windows, r=pcwaltonbors-2/+3
Using "win32" to mean "Windows" is confusing, especially now, that Rust supports win64 builds. Let's call spade a spade.
2014-08-13core: Rename ImmutableEqSlice to ImmutablePartialEqSliceBrian Anderson-1/+1
This is in the prelude and won't break much code. [breaking-change]
2014-08-13std: Rename slice::Vector to SliceBrian Anderson-1/+1
This required some contortions because importing both raw::Slice and slice::Slice makes rustc crash. Since `Slice` is in the prelude, this renaming is unlikely to casue breakage. [breaking-change]
2014-08-13std: Rename various slice traits for consistencyBrian Anderson-2/+2
ImmutableVector -> ImmutableSlice ImmutableEqVector -> ImmutableEqSlice ImmutableOrdVector -> ImmutableOrdSlice MutableVector -> MutableSlice MutableVectorAllocating -> MutableSliceAllocating MutableCloneableVector -> MutableCloneableSlice MutableOrdVector -> MutableOrdSlice These are all in the prelude so most code will not break. [breaking-change]
2014-08-12Replace #[cfg(target_os = "win32")] with #[cfg(target_os = "windows")]Vadim Chugunov-2/+3
2014-08-06auto merge of #16291 : nham/rust/byte_literals, r=alexcrichtonbors-1/+1
This replaces many instances chars being casted to u8 with byte literals.
2014-08-06Use byte literals in libstdnham-1/+1
2014-08-04stabilize atomics (now atomic)Aaron Turon-1/+1
This commit stabilizes the `std::sync::atomics` module, renaming it to `std::sync::atomic` to match library precedent elsewhere, and tightening up behavior around incorrect memory ordering annotations. The vast majority of the module is now `stable`. However, the `AtomicOption` type has been deprecated, since it is essentially unused and is not truly a primitive atomic type. It will eventually be replaced by a higher-level abstraction like MVars. Due to deprecations, this is a: [breaking-change]
2014-08-01Fix misspelled comments.Joseph Crail-1/+1
2014-07-29Port Rust to DragonFlyBSDMichael Neumann-0/+44
Not included are two required patches: * LLVM: segmented stack support for DragonFly [1] * jemalloc: simple configure patches [1]: http://reviews.llvm.org/D4705
2014-07-24Add `string::raw::from_buf`Adolfo Ochagavía-2/+1
2014-07-24Fix travis errorsAdolfo Ochagavía-1/+1
2014-07-24Deprecated `str::raw::from_buf_len`Adolfo Ochagavía-5/+5
Replaced by `string::raw::from_buf_len` [breaking-change]
2014-07-24Deprecated `str::raw::from_c_str`Adolfo Ochagavía-1/+1
Use `string::raw::from_buf` instead [breaking-change]
2014-07-24Remove OwnedStr traitAdolfo Ochagavía-4/+0
This trait was only implemented by `String`. It provided the methods `into_bytes` and `append`, both of which **are already implemented as normal methods** of `String` (not as trait methods). This change improves the consistency of strings. This shouldn't break any code, except if somebody has implemented `OwnedStr` for a user-defined type.
2014-07-23collections: Move push/pop to MutableSeqBrian Anderson-1/+1
Implement for Vec, DList, RingBuf. Add MutableSeq to the prelude. Since the collections traits are in the prelude most consumers of these methods will continue to work without change. [breaking-change]
2014-07-15Fix errorsAdolfo Ochagavía-1/+0
2014-07-15Deprecate `str::from_utf8_lossy`Adolfo Ochagavía-7/+7
Use `String::from_utf8_lossy` instead [breaking-change]
2014-07-15Deprecate `str::from_utf16_lossy`Adolfo Ochagavía-1/+1
Use `String::from_utf16_lossy` instead. [breaking-change]
2014-07-15Deprecate `str::from_utf16`Adolfo Ochagavía-4/+4
Use `String::from_utf16` instead [breaking-change]
2014-07-13libstd: Add a few doc examplesAnton Lofgren-7/+45
This patch adds doc examples for the make_absolute, change_dir, errors_string and args functions in the os module.
2014-07-11std: Move MemoryMap fields to methodsAlex Crichton-6/+12
If modified, you can safely unmap arbitrary memory. These fields are not intended to be modified, so read-only accessors are the only ones that are provided. Closes #15478
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-3/+3
[breaking-change]
2014-07-03Test fixes from the rollupAlex Crichton-1/+1
2014-07-03Fix spelling errors.Joseph Crail-1/+1
2014-07-03Add os::join_paths, make setenv non-utf8 capableAaron Turon-60/+147
This commit changes `os` in three ways: * It adds a `join_paths` function that is the converse to `split_paths`, easing manipulation of the `PATH` environment variable according to platform conventions. * **Breaking change**: It changes `split_paths` to no longer drop empty paths, since they are meaningful to some shells (where they are synonymous with the current working directory). * It changes `setenv` to take a `BytesContainer` rather than a `&str` value, since environment variables may have non-utf8 values on some platforms. Since `&str` is a `BytesContainer`, this is *not* a breaking change. Along the way, it also refactors the `split_paths` function so that `cfg` switches are applied internally (and the function header is given only once). This fixes a bug: the doc comment had an example for only one platform. [breaking-change]
2014-06-30libstd: set baseline stability levels.Aaron Turon-0/+2
Earlier commits have established a baseline of `experimental` stability for all crates under the facade (so their contents are considered experimental within libstd). Since `experimental` is `allow` by default, we should use the same baseline stability for libstd itself. This commit adds `experimental` tags to all of the modules defined in `std`, and `unstable` to `std` itself.
2014-06-30auto merge of #14613 : schmee/rust/utf16-iterator, r=huonwbors-5/+9
Closes #14358. ~~The tests are not yet moved to `utf16_iter`, so this probably won't compile. I'm submitting this PR anyway so it can be reviewed and since it was mentioned in #14611.~~ EDIT: Tests now use `utf16_iter`. This deprecates `.to_utf16`. `x.to_utf16()` should be replaced by either `x.utf16_iter().collect::<Vec<u16>>()` (the type annotation may be optional), or just `x.utf16_iter()` directly, if it can be used in an iterator context. [breaking-change] cc @huonw
2014-06-30Add `utf16_units`John Schmidt-5/+9
This deprecates `.to_utf16`. `x.to_utf16()` should be replaced by either `x.utf16_units().collect::<Vec<u16>>()` (the type annotation may be optional), or just `x.utf16_units()` directly, if it can be used in an iterator context. Closes #14358 [breaking-change]
2014-06-29librustc: Remove the fallback to `int` for integers and `f64` forPatrick Walton-1/+1
floating point numbers for real. This will break code that looks like: let mut x = 0; while ... { x += 1; } println!("{}", x); Change that code to: let mut x = 0i; while ... { x += 1; } println!("{}", x); Closes #15201. [breaking-change]
2014-06-28Rename all raw pointers as necessaryAlex Crichton-35/+39
2014-06-24auto merge of #14963 : w3ln4/rust/master, r=alexcrichtonbors-0/+4
The aim of these changes is not working out a generic bi-endianness architectures support but to allow people develop for little endian MIPS machines (issue #7190).
2014-06-24Added Mipsel architecture supportPawel Olzacki-0/+4
2014-06-18fix signatures of mmap-related functions from libcDaniel Micay-6/+5
2014-06-16Move `num_cpus` from `std::rt::util` to `std::os`. Closes #14707Jorge Aparicio-0/+15
2014-06-16std: Improve pipe() functionalityAlex Crichton-23/+34
* os::pipe() now returns IoResult<os::Pipe> * os::pipe() is now unsafe because it does not arrange for deallocation of file descriptors * os::Pipe fields are renamed from input to reader and out to write. * PipeStream::pair() has been added. This is a safe method to get a pair of pipes. * Dealing with pipes in native process bindings have been improved to be more robust in the face of failure and intermittent errors. This converts a few fail!() situations to Err situations. Closes #9458 cc #13538 Closes #14724 [breaking-change]