about summary refs log tree commit diff
path: root/src/libstd/sys_common
AgeCommit message (Collapse)AuthorLines
2017-03-25Fix libc::bind call on aarch64-linux-androidMarco A L Barbosa-2/+2
2017-03-17Rollup merge of #40503 - swgillespie:thread-hack-removal, r=sfacklerCorey Farwell-6/+1
std: remove a workaround for privacy limitations `std::thread::Thread` implements a non-exported `NewThread` trait to allow for internal-only use of `Thread::new`. Nowadays we have `pub(crate)`, which accomplishes the same thing but much more idiomatically. Rustdoc handles this correctly (I checked and I didn't see `Thread::new` on the rustdoc entry for `Thread` with this change), and the stage1 `rustc` emits the correct error still (I'm assuming that the stage1 compiler uses my `libstd`?): ``` $ ./build/x86_64-apple-darwin/stage1/bin/rustc test.rs error: method `new` is private --> test.rs:4:18 | 4 | let thread = thread::Thread::new(None); | ^^^^^^^^^^^^^^^^^^^ error: aborting due to previous error ```
2017-03-15Auto merge of #40009 - clarcharr:box_to_buf, r=alexcrichtonbors-0/+6
Leftovers from #39594; From<Box> impls These are a few more impls that follow the same reasoning as those from #39594. What's included: * `From<Box<str>> for String` * `From<Box<[T]>> for Vec<T>` * `From<Box<CStr>> for CString` * `From<Box<OsStr>> for OsString` * `From<Box<Path>> for PathBuf` * `Into<Box<str>> for String` * `Into<Box<[T]>> for Vec<T>` * `Into<Box<CStr>> for CString` * `Into<Box<OsStr>> for OsString` * `Into<Box<Path>> for PathBuf` * `<Box<CStr>>::into_c_string` * `<Box<OsStr>>::into_os_string` * `<Box<Path>>::into_path_buf` * Tracking issue for latter three methods + three from previous PR. Currently, the opposite direction isn't doable with `From` (only `Into`) because of the separation between `liballoc` and `libcollections`. I'm holding off on those for a later PR.
2017-03-13std: remove a workaround for privacy limitations that isn't necessary anymoreSean Gillespie-6/+1
2017-03-10Rollup merge of #40410 - clarcharr:os_string_shrink_to_fit, r=alexcrichtonAlex Crichton-0/+5
OsString::shrink_to_fit. Considering how the other capacity-related methods are there, I found it odd that this one wasn't included. Will create a tracking issue once I get an OK on this.
2017-03-10Add From<Box<..>> implementations.Clar Charr-0/+6
2017-03-10OsString::shrink_to_fit.Clar Charr-0/+5
2017-03-10travis: Fuchsia builderPetr Hosek-3/+0
This change introduces a Dockerfile and script which builds a complete Fuchsia toolchain which can be used to build Rust distribution for Fuchsia. We only support cross-compiling at the moment, hence only setting the target.
2017-03-02Rollup merge of #40081 - GuillaumeGomez:poison-docs, r=frewsxcvGuillaume Gomez-7/+22
Add missing url in sync structs r? @frewsxcv
2017-02-28Add missing url in sync structsGuillaume Gomez-7/+22
2017-02-26Also ignore std::panicYamakaky-0/+3
2017-02-26Fix tests on Windows in Debug configuration (#4)Vadim Petrochenkov-0/+6
2017-02-25Fix tests on ARM Linux (#3)Vadim Petrochenkov-0/+1
2017-02-23rposition() -> rev().position() (#2)Vadim Petrochenkov-1/+1
2017-02-23Fix tests on Windows (#1)Vadim Petrochenkov-40/+56
2017-02-15Improve backtrace formating while panicking.Yamakaky-189/+408
- `RUST_BACKTRACE=full` prints all the informations (old behaviour) - `RUST_BACKTRACE=(0|no)` disables the backtrace. - `RUST_BACKTRACE=<everything else>` (including `1`) shows a simplified backtrace, without the function addresses and with cleaned filenames and symbols. Also removes some unneded frames at the beginning and the end. Fixes #37783. PR is #38165.
2017-02-14Conversions between CStr/OsStr/Path and boxes.Clar Charr-0/+19
2017-02-06std: Remove cfg(cargobuild) annotationsAlex Crichton-5/+2
These are all now no longer needed that we've only got rustbuild in tree.
2017-02-05Rollup merge of #38983 - APTy:udp-peek, r=aturonCorey Farwell-11/+13
Add peek APIs to std::net Adds "peek" APIs to `std::net` sockets, including: - `UdpSocket.peek()` - `UdpSocket.peek_from()` - `TcpStream.peek()` These methods enable socket reads without side-effects. That is, repeated calls to `peek()` return identical data. This is accomplished by providing the POSIX flag `MSG_PEEK` to the underlying socket read operations. This also moves the current implementation of `recv_from` out of the platform-independent `sys_common` and into respective `sys/windows` and `sys/unix` implementations. This allows for more platform-dependent implementations where necessary. Fixes #38980
2017-02-04libstd/net: Add `peek` APIs to UdpSocket and TcpStreamTyler Julian-11/+13
These methods enable socket reads without side-effects. That is, repeated calls to peek() return identical data. This is accomplished by providing the POSIX flag MSG_PEEK to the underlying socket read operations. This also moves the current implementation of recv_from out of the platform-independent sys_common and into respective sys/windows and sys/unix implementations. This allows for more platform-dependent implementations.
2017-01-27Attempt at fixing dead code lintsSegev Finer-1/+1
2017-01-24Make backtraces work on Windows GNU targets again.Segev Finer-1/+16
This is done by adding a function that can return a filename to pass to backtrace_create_state. The filename is obtained in a safe way by first getting the filename, locking the file so it can't be moved, and then getting the filename again and making sure it's the same. See: https://github.com/rust-lang/rust/pull/37359#issuecomment-260123399 Issue: #33985
2016-12-20Fix compile errors and suchAlex Crichton-0/+1
2016-11-10Merge branch 'master' into redoxJeremy Soller-1/+1
2016-11-10Use target_os = redox for cfgJeremy Soller-2/+2
2016-11-10doc: fix typosTshepang Lekhonkhobe-1/+1
2016-11-03Merge branch 'master' into redoxJeremy Soller-0/+3939
2016-11-01Clean up and add more comments to libstd/lib.rsBrian Anderson-12/+4
2016-11-01Document sys_common and sysBrian Anderson-0/+14
2016-11-01std: Move sys_common to libstd/sys_commonBrian Anderson-0/+3928
Make the directory structure reflect the module structure. I've always found the existing structure confusing.