summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2017-01-19let BSD to use gmake for GNU-makeSébastien Marie-1/+1
the diff extends build_helper to provide an function to return the expected name of GNU-make on the host: "make" or "gmake". Fixes #38429
2017-01-06std: Don't pass overlapped handles to processesAlex Crichton-29/+63
This commit fixes a mistake introduced in #31618 where overlapped handles were leaked to child processes on Windows. On Windows once a handle is in overlapped mode it should always have I/O executed with an instance of `OVERLAPPED`. Most child processes, however, are not prepared to have their stdio handles in overlapped mode as they don't use `OVERLAPPED` on reads/writes to the handle. Now we haven't had any odd behavior in Rust up to this point, and the original bug was introduced almost a year ago. I believe this is because it turns out that if you *don't* pass an `OVERLAPPED` then the system will [supply one for you][link]. In this case everything will go awry if you concurrently operate on the handle. In Rust, however, the stdio handles are always locked, and there's no way to not use them unlocked in libstd. Due to that change we've always had synchronized access to these handles, which means that Rust programs typically "just work". Conversely, though, this commit fixes the test case included, which exhibits behavior that other programs Rust spawns may attempt to execute. Namely, the stdio handles may be concurrently used and having them in overlapped mode wreaks havoc. [link]: https://blogs.msdn.microsoft.com/oldnewthing/20121012-00/?p=6343 Closes #38811
2016-12-19Rollup merge of #38433 - GuillaumeGomez:thread_docs, r=frewsxcvSeo Sanghyeon-24/+38
Thread docs r? @frewscvx
2016-12-19Rollup merge of #38421 - apasel422:issue-36934, r=alexcrichtonSeo Sanghyeon-328/+328
Replace invalid use of `&mut` with `UnsafeCell` in `std::sync::mpsc` Closes #36934 r? @alexcrichton
2016-12-19Rollup merge of #38397 - frewsxcv:platform-specific-process-exit, r=alexcrichtonSeo Sanghyeon-0/+17
Document platform-specific differences for `std::process::exit`. Fixes https://github.com/rust-lang/rust/issues/35046.
2016-12-18Auto merge of #38051 - sanxiyn:unused-type-alias-3, r=eddybbors-3/+2
Warn unused type aliases, reimplemented Reimplementation of #37631. Fix #37455.
2016-12-18Document platform-specific differences for `std::process::exit`.Corey Farwell-0/+17
Fixes https://github.com/rust-lang/rust/issues/35046.
2016-12-18Fix WindowsSeo Sanghyeon-3/+2
2016-12-18Add missing urls for thread doc moduleGuillaume Gomez-24/+38
2016-12-16Address falloutAaron Turon-4/+4
2016-12-16Replace invalid use of `&mut` with `UnsafeCell` in `std::sync::mpsc`Andrew Paseltiner-328/+328
Closes #36934
2016-12-15Stabilize std::io::Take::into_innerAaron Turon-3/+1
2016-12-15Stabilize std::os::unix::process::CommandExt::before_execAaron Turon-1/+1
2016-12-15Stabilize std::sync::mpsc::Receiver::try_iterAaron Turon-3/+3
2016-12-15Stabilize std::os::*::fs::FileExtAaron Turon-10/+10
2016-12-14Merge branch 'master' into redoxJeremy Soller-10/+78
2016-12-12Fix tidy checksJeremy Soller-1/+2
2016-12-12Merge branch 'master' into redoxJeremy Soller-329/+1933
2016-12-12Fix accidental removal of importJeremy Soller-0/+1
2016-12-12Rollback prefixJeremy Soller-9/+4
2016-12-12Rollup merge of #38067 - GuillaumeGomez:udp-doc, r=frewsxcv,nagisaCorey Farwell-1/+58
Add more examples to UpdSocket r? @frewsxcv
2016-12-12Rollup merge of #37941 - Cobrand:docfix-issue-37915, r=GuillaumeGomezCorey Farwell-9/+20
Improve and fix mpsc documentation Closes #37915 This commit enhances documentation with several links and fixes an error in the `sync_channel` documentation as well: `send` doesn't panic when the senders are all disconnected r? @steveklabnik
2016-12-12Auto merge of #38049 - frewsxcv:libunicode, r=alexcrichtonbors-4/+4
Rename 'librustc_unicode' crate to 'libstd_unicode'. Fixes https://github.com/rust-lang/rust/issues/26554.
2016-12-09Auto merge of #38197 - mneumann:dragonfly-fixes-2016-12-06, r=alexcrichtonbors-7/+2
Fix current_exe() on DragonFly (again) This is a follow up on [this pull request][1]. Since DragonFly 4.6.1 ([this commit][2]), the ```kern.proc.pathname``` sysctl works correctly, i.e. it does not return paths including a ```:``` (see [here][3]). Use it and don't try to fix old versions of DragonFly! There are not many DragonFly installations out there that we can't control and no one is compiling Rust from source. If someone wants to run Rust on a pre-4.6.1 DragonFly system, the ports system should provide a patch. [1]: https://github.com/rust-lang/rust/pull/35494 [2]: https://gitweb.dragonflybsd.org/dragonfly.git/commit/726f7ca07e193db73635e9c4e24e40c96087d6d9 [3]: https://gist.github.com/mneumann/a2f6b6a0a03935b561d6185872a4b222
2016-12-08Auto merge of #38146 - kali:master, r=alexcrichtonbors-2/+15
fix objc ABI in std::env::args iOS use different calling convention for `objc_msgSend` depending on the platform. armv7 expect good old variadic arguments, but aarch64 wants "normal" convention: `objc_msgSend` has to be called mimicking the actual callee prototype. https://developer.apple.com/library/content/documentation/General/Conceptual/CocoaTouch64BitGuide/ConvertingYourAppto64-Bit/ConvertingYourAppto64-Bit.html#//apple_ref/doc/uid/TP40013501-CH3-SW26 This currently breaks std::env:args() on aarch64 iOS devices. As far as I can tell, in the standard library, this is the only occurrence of ObjectiveC dispatching.
2016-12-07Rollup merge of #38186 - frewsxcv:default, r=GuillaumeGomezGuillaume Gomez-0/+4
Add docs for last undocumented `Default` `impl`. Add doc comment for `Default` `impl` on `DefaultHasher`. Fixes https://github.com/rust-lang/rust/issues/36265.
2016-12-07Rollup merge of #38153 - GuillaumeGomez:typo, r=blussGuillaume Gomez-1/+1
Fix small typo
2016-12-07Rollup merge of #38151 - GuillaumeGomez:exit-examples, r=frewsxcvGuillaume Gomez-0/+8
Add examples for exit function r? @frewsxcv
2016-12-07Rollup merge of #38123 - GuillaumeGomez:panic_doc, r=frewsxcvGuillaume Gomez-2/+104
Add missing examples for panicking objects r? @frewsxcv
2016-12-07Improve and fix mpsc documentationCobrand-9/+20
Closes #37915 This commit enhances documentation with several links and fixes an error in the `sync_channel` documentation as well: `send` doesn't panic when the senders are all disconnected
2016-12-07Auto merge of #38149 - bluss:is-empty, r=alexcrichtonbors-0/+3
Forward more ExactSizeIterator methods and `is_empty` edits - Forward ExactSizeIterator methods in more places, like `&mut I` and `Box<I>` iterator impls. - Improve `VecDeque::is_empty` itself (see commit 4) - All the collections iterators now have `len` or `is_empty` forwarded if doing so is a benefit. In the remaining cases, they already use a simple size hint (using something like a stored `usize` value), which is sufficient for the default implementation of len and is_empty.
2016-12-06Add doc comment for `Default` `impl` on `DefaultHasher`.Corey Farwell-0/+4
2016-12-06Auto merge of #38017 - arthurprs:hm-extend, r=blussbors-11/+16
Smarter HashMap/HashSet pre-allocation for extend/from_iter HashMap/HashSet from_iter and extend are making totally different assumptions. A more balanced decision may allocate half the lower hint (rounding up). For "well defined" iterators this effectively limits the worst case to two resizes (the initial reserve + one resize). cc #36579 cc @bluss
2016-12-06Fix current_exe() on DragonFly (again)Michael Neumann-7/+2
This is a follow up on [this pull request][1]. Since DragonFly 4.6.1 ([this commit][2]), the "kern.proc.pathname" sysctl works correctly, i.e. it does not return paths including a ":" (see [here][3]). Use it and don't try to fix old versions of DragonFly! There are not many DragonFly installations out there that we can't control and no one is compiling Rust from source. If someone wants to run Rust on a pre-4.6.1 DragonFly system, the ports system should provide a patch. [1]: https://github.com/rust-lang/rust/pull/35494 [2]: https://gitweb.dragonflybsd.org/dragonfly.git/commit/726f7ca07e193db73635e9c4e24e40c96087d6d9 [3]: https://gist.github.com/mneumann/a2f6b6a0a03935b561d6185872a4b222
2016-12-06Smarter HashMap/HashSet extendarthurprs-11/+16
2016-12-05Auto merge of #38098 - luser:windows-commandext, r=alexcrichtonbors-2/+84
Add std::os::windows::process::CommandExt. Fixes #37827 This adds a CommandExt trait for Windows along with an implementation of it for std::process::Command with methods to set the process creation flags that are passed to CreateProcess.
2016-12-04Add missing examples for panicking objectsGuillaume Gomez-2/+104
2016-12-04std: Forward ExactSizeIterator::is_empty for Args, ArgsOs iteratorsUlrik Sverdrup-0/+3
2016-12-04Fix small typoGuillaume Gomez-1/+1
2016-12-04Add more examples to UpdSocketGuillaume Gomez-1/+58
2016-12-03Add examples for exit functionGuillaume Gomez-0/+8
2016-12-03Rollup merge of #38141 - GuillaumeGomez:component_doc, r=frewsxcvCorey Farwell-1/+11
Add Component examples r? @frewsxcv
2016-12-03Rollup merge of #38077 - GuillaumeGomez:ipaddr_doc, r=frewsxcvCorey Farwell-0/+88
Add missing examples for IpAddr enum r? @frewsxcv
2016-12-03Rollup merge of #38020 - GuillaumeGomez:udp-socket-doc, r=frewsxcvCorey Farwell-11/+215
Add part of missing UdpSocket's urls and examples r? @frewsxcv
2016-12-03Rollup merge of #37859 - GuillaumeGomez:net_examples, r=nagisaCorey Farwell-0/+158
Add missing examples for Ipv6Addr r? @steveklabnik cc @frewsxcv
2016-12-03fix objc ABI in std::env::argsMathieu Poumeyrol-2/+15
2016-12-02Add Component examplesGuillaume Gomez-1/+11
2016-12-02Auto merge of #37936 - tedsta:fuchsia_std_process, r=alexcrichtonbors-238/+689
Fuchsia support for std::process via liblaunchpad. Now we can launch processes on Fuchsia via the Rust standard library! ... Mostly. Right now, ~5% of the time, reading the stdout/stderr off the pipes will fail. Some Magenta kernel people think it's probably a bug in Magenta's pipes. I wrote a unit test that demonstrates the issue in C, which I was told will expedite a fix. https://fuchsia-review.googlesource.com/#/c/15628/ Hopefully this can get merged once the issue is fixed :) @raphlinus
2016-12-01std::process fuchsia support cleanupTheodore DeRego-34/+26
2016-12-01Auto merge of #38018 - sourcefrog:doc, r=alexcrichtonbors-0/+8
Document that Process::command will search the PATH