summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2016-02-22Fix broken Solaris buildNikita Baksalyar-2/+3
2016-02-21RaiseException is used by everything except x86 gnuPaul Dicker-0/+1
2016-02-21Auto merge of #31792 - Zoxc:sysroot, r=alexcrichtonbors-0/+7
With these changes you can build a freestanding sysroot without using floating points using a Cargo.toml and copying the `deps` folder cargo outputs. ``` [package] name = "sysroot" version = "0.1.0" [lib] path = "lib.rs" crate-type = ["rlib"] [dependencies.core] path = "../vendor/rust/src/src/libcore" features = ["disable_float"] [dependencies] collections = { path = "../vendor/rust/src/src/libcollections" } ```
2016-02-21rustbuild: Sync some Cargo.toml/lib.rs dependenciesAlex Crichton-1/+0
The standard library doesn't depend on rustc_bitflags, so move it to explicit dependencies on all other crates. Additionally, the arena/fmt_macros deps could be dropped from libsyntax.
2016-02-21Fixes for 32-bitPaul Dicker-10/+11
2016-02-21Fix `struct stat` usage on NetBSDSebastian Wicki-10/+29
Some struct members have a slighty different name on NetBSD. This has been fixed in the libc crate, but not in libstd. This also removes `st_spare` from MetadataExt, since it is private field reserved for future use.
2016-02-21Fix liballoc dependenciesJohn Kåre Alsaker-0/+7
2016-02-21std: Use Android LFS off64_t, ftruncate64, and lseek64Josh Stone-1/+4
Android should use 64-bit LFS symbols for `lseek` and `ftruncate`, lest those offset parameters suffer a lossy cast down to a 32-bit `off_t`. Unlike GNU/Linux, Android's `stat`, `dirent`, and related functions are always 64-bit LFS compatible, and `open` already implies `O_LARGEFILE`, so all those don't need to follow Linux. It might be nice to unify them anyway, but those other LFS symbols aren't present in API 18 bionic. r? @alexcrichton
2016-02-20Auto merge of #31608 - frewsxcv:osstring-simple-functions, r=alexcrichtonbors-0/+268
https://github.com/rust-lang/rust/issues/29453
2016-02-20Add Capacity/length methods for OsString.Corey Farwell-0/+268
https://github.com/rust-lang/rust/issues/29453
2016-02-20Remove dead code from sys::windows::cPaul Dicker-210/+36
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-19Rollup merge of #31763 - tshepang:extraneous-word, r=steveklabnikSteve Klabnik-1/+1
2016-02-19Rollup merge of #31737 - dhuseby:netbsd_fixes, r=alexcrichtonSteve Klabnik-2/+2
this fixes a small compile error when building for netbsd.
2016-02-19Auto merge of #31742 - frewsxcv:needless-lifetimes, r=pnkfelixbors-2/+2
These explicit lifetimes can be ommitted because of lifetime elision rules. Instances were found using rust-clippy.
2016-02-19Auto merge of #31738 - seanmonstar:sys-rand, r=alexcrichtonbors-168/+167
2016-02-18Auto merge of #31684 - tmiasko:alternate-stack, r=alexcrichtonbors-5/+24
Remove alternate stack with sigaltstack before unmaping it. Also reuse existing signal stack if already set, this is especially useful when working with sanitizers that configure alternate stack themselves. This change depends on SS_DISABLE recently introduced in libc crate and updates this git submodule accordingly.
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-18Auto merge of #31734 - aliclark:bsd-stat-fixes, r=alexcrichtonbors-131/+63
In https://github.com/rust-lang/rust/issues/25155 the os::freebsd::raw stat was split for the x86 vs. x86-64 cases, which appears to have been done to implement the padding on the end of struct stat for the x86 case (the struct is otherwise the same notwistanding the size of long). This PR de-duplicates the struct using #[cfg(target_arch = "x86")] for the __unused field, which also fixes the definitions which had sinced changed with the LFS work d088b671872f1df6993ccca6fa6139ebed0a8cf3. Also changed definitions to c_long for dragonfly and freebsd where appropriate. Also removes some unused imports that the compiler was complaining about. dragonfly's long time_t: https://gitweb.dragonflybsd.org/dragonfly.git/blob/a2a57c243ff8016578bc559f8603fb25bbcf1768:/lib/libstand/machine/stdint.h freebsd's long time_t: https://svnweb.freebsd.org/base/release/10.1.0/sys/x86/include/_types.h?view=markup https://github.com/rust-lang/rust/blob/d088b671872f1df6993ccca6fa6139ebed0a8cf3/src/liblibc/lib.rs#L980 freebsd's padding for i686 stat: https://svnweb.freebsd.org/base/release/10.1.0/sys/sys/stat.h?view=markup#l139 https://github.com/rust-lang/rust/blob/d088b671872f1df6993ccca6fa6139ebed0a8cf3/src/liblibc/lib.rs#L1038
2016-02-18Add mutual PartialEq and PartialOrd impls for Path[Buf] and OsStr[ing]Gleb Kozyrev-0/+47
2016-02-18Add mutual PartialOrd impls for Path and PathBufGleb Kozyrev-6/+21
2016-02-18Impl AsRef<Path> for Cow<OsStr>Gleb Kozyrev-0/+7
2016-02-18Add mutual PartialEq and PartialCmp impls for OsStr, OsStringGleb Kozyrev-0/+38
2016-02-18Remove unnecessary explicit lifetime bounds.Corey Farwell-2/+2
These explicit lifetimes can be ommitted because of lifetime elision rules. Instances were found using rust-clippy.
2016-02-18Auto merge of #31728 - Amanieu:recoversafe_into_inner, r=alexcrichtonbors-0/+6
This allows a `FnOnce` to be wrapped in an `AssertRecoverSafe`.
2016-02-18Remove alternate stack with sigaltstack before unmapping it.Tomasz Miąsko-5/+24
Also reuse existing signal stack if already set, this is especially useful when working with sanitizers that configure alternate stack themselves.
2016-02-17std: restructure rand os code into sys modulesSean McArthur-168/+167
2016-02-17Rollup merge of #31733 - gkoz:strip_prefix_docs, r=alexcrichtonSteve Klabnik-1/+3
It wasn't fixed after copy-pasting. This probably needs to be backported to beta.
2016-02-17Rollup merge of #31695 - oconnor663:chardocs, r=alexcrichtonSteve Klabnik-21/+11
Previously the docs suggested that '❤️' doesn't fit in a char because it's 6 bytes. But that's misleading. 'a̚' also doesn't fit in a char, even though it's only 3 bytes. The important thing is the number of code points, not the number of bytes. Clarify the primitive char docs around this.
2016-02-17Rollup merge of #31694 - oconnor663:insertdocs, r=steveklabnikSteve Klabnik-6/+10
The first time I read the docs for `insert()`, I thought it was saying it didn't update existing *values*, and I was confused. Reword the docs to make it clear that `insert()` does update values.
2016-02-17fixes a small netbsd compile errorDave Huseby-2/+2
2016-02-17Update `Path::strip_prefix` docGleb Kozyrev-1/+3
2016-02-17re-add freebsd paddingAli Clark-0/+3
reproduces the padding found here: https://svnweb.freebsd.org/base/release/10.1.0/sys/sys/stat.h?view=markup#l139
2016-02-17time_t is long on freebsd and dragonfly (and nsec should be long)Ali Clark-16/+20
This becomes less relevant for dragonfly a i686 support is dropped since release 40, but using long allows some compatibility for older versions.
2016-02-17unfork freebsd stat definitions, fixes x86Ali Clark-122/+50
2016-02-17remove unused import from dragonfly os rawAli Clark-3/+0
2016-02-17Add into_inner to AssertRecoverSafeAmanieu d'Antras-0/+6
2016-02-16Avoid iteration when dropping `HashMap`s whose items don't need droppingAndrew Paseltiner-1/+4
This changes the performance of `drop` from linear to constant time for such `HashMap`s. Closes #31711.
2016-02-16Auto merge of #31675 - pitdicker:fs_metadata, r=alexcrichtonbors-28/+26
Because we no longer use `GetFileAttributesExW` FileAttr is never created directly from `WIN32_FILE_ATTRIBUTE_DATA` anymore. So we should no longer store FileAttr's attributes in that c struct. r? @alexcrichton Is this what you had in mind?
2016-02-16Auto merge of #31668 - cuviper:lfs, r=alexcrichtonbors-11/+14
This follows the pattern already used for stat functions from #31551. Now `ftruncate`, `lseek`, and `readdir_r` use their explicit 64-bit variants for LFS support, using wider `off_t` and `dirent` types. This also updates to `open64`, which uses no different types but implies the `O_LARGEFILE` flag. Non-Linux platforms just map their normal functions to the 64-bit names. r? @alexcrichton
2016-02-15clarify how insert() doesn't update keysJack O'Connor-6/+10
The first time I read the docs for `insert()`, I thought it was saying it didn't update existing *values*, and I was confused. Reword the docs to make it clear that `insert()` does update values.
2016-02-15correct the primitive char doc's use of bytes and code pointsJack O'Connor-21/+11
Previously the docs suggested that '❤️' doesn't fit in a char because it's 6 bytes. But that's misleading. 'a̚' also doesn't fit in a char, even though it's only 3 bytes. The important thing is the number of code points, not the number of bytes. Clarify the primitive char docs around this.
2016-02-15Refactor windows::fs::FileAttrPaul Dicker-28/+26
Because we no longer use `GetFileAttributesExW` FileAttr is never created directly from `WIN32_FILE_ATTRIBUTE_DATA` anymore. So we should no longer store FileAttr's attributes in that c struct.
2016-02-15Auto merge of #31652 - semarie:openbsd-os-raw, r=alexcrichtonbors-1/+0
remove unused import that cause an error at compile-time. r? @alexcrichton
2016-02-14std: use LFS open64 on LinuxJosh Stone-3/+3
2016-02-14std: use LFS readdir64_r on LinuxJosh Stone-5/+7
2016-02-14std: use LFS lseek64 on LinuxJosh Stone-7/+7