about summary refs log tree commit diff
path: root/src/libstd/sys/windows/ext
AgeCommit message (Collapse)AuthorLines
2019-03-31libstd: deny(elided_lifetimes_in_paths)Mazdak Farrokhzad-2/+2
2019-03-29implement `AsRawFd` for stdio locksAndy Russell-0/+21
2019-03-02Auto merge of #58216 - pitdicker:sqos_flags, r=alexcrichtonbors-6/+20
Set secure flags when opening a named pipe on Windows Fixes https://github.com/rust-lang/rust/issues/42036, see also the previous attempt in https://github.com/rust-lang/rust/pull/44556. Whether this is correct depends on if it is somehow possible to create a symlink to a named pipe, outside the named pipe filesystem (NPFS). But as far as I can tell that should be impossible. Also fixes that `security_qos_flags(SECURITY_ANONYMOUS)` does not set the `SECURITY_SQOS_PRESENT` flag, and the incorrect documentation about the default value of `security_qos_flags`.
2019-02-28libstd => 2018Taiki Endo-25/+25
2019-02-23Correct OpenOptions::security_qos_flags documentationPaul Dicker-6/+20
2019-02-10libs: doc commentsAlexander Regueiro-5/+5
2019-02-10tests: doc commentsAlexander Regueiro-8/+8
2019-01-03Fix repeated word typosWiktor Kuchta-1/+1
Found with `git grep -P '\b([a-z]+)\s+\1\b'`
2018-12-25Remove licensesMark Rousskov-70/+0
2018-12-07Various minor/cosmetic improvements to codeAlexander Regueiro-1/+1
2018-08-11Add links to std::char::REPLACEMENT_CHARACTER from docs.Corey Farwell-1/+2
There are a few places where we mention the replacement character in the docs, and it could be helpful for users to utilize the constant which is available in the standard library, so let’s link to it!
2018-06-13Add missing allow_missing_docsGuillaume Gomez-0/+1
2018-04-14Prefer unprefixed paths for well known structsDylan MacKenzie-8/+8
2018-04-14Add doc links to `std::os` extension traitsDylan MacKenzie-13/+23
Add documentation links to the original type for various OS-specific extension traits and normalize the language for introducing such traits. Also, remove some outdated comments around the extension trait definitions.
2018-03-28Remove hidden `foo` functions from doc examples; use `Termination` trait.Corey Farwell-49/+49
Fixes https://github.com/rust-lang/rust/issues/49233.
2018-02-11Add an unstable FileTypeExt extension trait for WindowsPeter Atashian-0/+18
2017-10-20Fix most rendering warnings from switching to CommonMarksteveklabnik-1/+1
2017-10-17Remove duplicated wordGuillaume Gomez-2/+2
2017-09-25Module overview for std::os::windows:ffiFederico Mena Quintero-0/+56
2017-08-13Rollup merge of #43814 - Eijebong:fix_typos2, r=petrochenkovGuillaume Gomez-1/+1
Fix some typos Follow up of #43794 If refined my script a little bit and found some more.
2017-08-12Fix some typosBastien Orivel-1/+1
2017-08-10Exposed all platform-specific documentation.kennytm-0/+1
2017-08-03Fix AsRawHandleIan Douglas Scott-3/+3
2017-08-03Implement AsRawHandle for Std* on WindowsIan Douglas Scott-0/+22
2017-07-13windows::fs::symlink_dir: fix example to actually use symlink_dirRalf Jung-1/+1
2017-06-23Removed as many "```ignore" as possible.kennytm-2/+6
Replaced by adding extra imports, adding hidden code (`# ...`), modifying examples to be runnable (sorry Homura), specifying non-Rust code, and converting to should_panic, no_run, or compile_fail. Remaining "```ignore"s received an explanation why they are being ignored.
2017-05-19Fix doc test failure for OpenOptionsExtDavid LeGare-1/+1
2017-05-18Normalize docs in windows::ffi and windows::fsDavid LeGare-57/+64
- Remove `()` parens when referencing functions in docs. - Change some examples to be no_run instead of ignore. - Normalize style in examples for `OpenOptionsExt`. - Fix typo in windows mod docs.
2017-05-09Fix tidy errorsDavid LeGare-3/+6
2017-05-07Fix documentation tests in windows::fsDavid LeGare-3/+1
2017-05-06Update documentation in windows::fsDavid LeGare-10/+127
2017-05-05Merge remote-tracking branch 'rust-lang/master' into iss29367-windows-docsDavid LeGare-1/+2
2017-05-05Update documentation in windows::ffiDavid LeGare-21/+91
2017-05-05Update documention in windows::ffiDavid LeGare-9/+43
2017-04-06Fix Markdown issues in the docsOliver Middleton-1/+2
* Since the switch to pulldown-cmark reference links need a blank line before the URLs. * Reference link references are not case sensitive. * Doc comments need to be indented uniformly otherwise rustdoc gets confused.
2017-01-25std: Stabilize APIs for the 1.16.0 releaseAlex Crichton-3/+3
This commit applies the stabilization/deprecations of the 1.16.0 release, as tracked by the rust-lang/rust issue tracker and the final-comment-period tag. The following APIs were stabilized: * `VecDeque::truncate` * `VecDeque::resize` * `String::insert_str` * `Duration::checked_{add,sub,div,mul}` * `str::replacen` * `SocketAddr::is_ipv{4,6}` * `IpAddr::is_ipv{4,6}` * `str::repeat` * `Vec::dedup_by` * `Vec::dedup_by_key` * `Result::unwrap_or_default` * `<*const T>::wrapping_offset` * `<*mut T>::wrapping_offset` * `CommandExt::creation_flags` (on Windows) * `File::set_permissions` * `String::split_off` The following APIs were deprecated * `EnumSet` - replaced with other ecosystem abstractions, long since unstable Closes #27788 Closes #35553 Closes #35774 Closes #36436 Closes #36949 Closes #37079 Closes #37087 Closes #37516 Closes #37827 Closes #37916 Closes #37966 Closes #38080
2017-01-22libstd: replace all `try!` with `?` in documentation examplesUtkarsh Kukreti-2/+2
See #38644.
2016-12-15Stabilize std::os::*::fs::FileExtAaron Turon-5/+5
2016-11-30just add one method named creation_flags, fix the tidy errorTed Mielczarek-13/+3
2016-11-30Add std::os::windows::process::CommandExt, with set_creation_flags and ↵Ted Mielczarek-1/+30
add_creation_flags methods. 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-10-09Implement reading and writing atomically at certain offsetsTobias Bucher-1/+52
These functions allow to read from and write to a file in one atomic action from multiple threads, avoiding the race between the seek and the read. The functions are named `{read,write}_at` on non-Windows (which don't change the file cursor), and `seek_{read,write}` on Windows (which change the file cursor).
2016-10-01std: Correct stability attributes for some implementationsOliver Middleton-5/+5
These are displayed by rustdoc so should be correct.
2016-08-19std: Stabilize APIs for the 1.12 releaseAlex Crichton-1/+2
Stabilized * `Cell::as_ptr` * `RefCell::as_ptr` * `IpAddr::is_{unspecified,loopback,multicast}` * `Ipv6Addr::octets` * `LinkedList::contains` * `VecDeque::contains` * `ExitStatusExt::from_raw` - both on Unix and Windows * `Receiver::recv_timeout` * `RecvTimeoutError` * `BinaryHeap::peek_mut` * `PeekMut` * `iter::Product` * `iter::Sum` * `OccupiedEntry::remove_entry` * `VacantEntry::into_key` Deprecated * `Cell::as_unsafe_cell` * `RefCell::as_unsafe_cell` * `OccupiedEntry::remove_pair` Closes #27708 cc #27709 Closes #32313 Closes #32630 Closes #32713 Closes #34029 Closes #34392 Closes #34285 Closes #34529
2016-05-24std: Stabilize APIs for the 1.10 releaseAlex Crichton-12/+7
This commit applies the FCP decisions made by the libs team for the 1.10 cycle, including both new stabilizations and deprecations. Specifically, the list of APIs is: Stabilized: * `os::windows::fs::OpenOptionsExt::access_mode` * `os::windows::fs::OpenOptionsExt::share_mode` * `os::windows::fs::OpenOptionsExt::custom_flags` * `os::windows::fs::OpenOptionsExt::attributes` * `os::windows::fs::OpenOptionsExt::security_qos_flags` * `os::unix::fs::OpenOptionsExt::custom_flags` * `sync::Weak::new` * `Default for sync::Weak` * `panic::set_hook` * `panic::take_hook` * `panic::PanicInfo` * `panic::PanicInfo::payload` * `panic::PanicInfo::location` * `panic::Location` * `panic::Location::file` * `panic::Location::line` * `ffi::CStr::from_bytes_with_nul` * `ffi::CStr::from_bytes_with_nul_unchecked` * `ffi::FromBytesWithNulError` * `fs::Metadata::modified` * `fs::Metadata::accessed` * `fs::Metadata::created` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange` * `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak` * `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key` * `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}` * `SocketAddr::is_unnamed` * `SocketAddr::as_pathname` * `UnixStream::connect` * `UnixStream::pair` * `UnixStream::try_clone` * `UnixStream::local_addr` * `UnixStream::peer_addr` * `UnixStream::set_read_timeout` * `UnixStream::set_write_timeout` * `UnixStream::read_timeout` * `UnixStream::write_Timeout` * `UnixStream::set_nonblocking` * `UnixStream::take_error` * `UnixStream::shutdown` * Read/Write/RawFd impls for `UnixStream` * `UnixListener::bind` * `UnixListener::accept` * `UnixListener::try_clone` * `UnixListener::local_addr` * `UnixListener::set_nonblocking` * `UnixListener::take_error` * `UnixListener::incoming` * RawFd impls for `UnixListener` * `UnixDatagram::bind` * `UnixDatagram::unbound` * `UnixDatagram::pair` * `UnixDatagram::connect` * `UnixDatagram::try_clone` * `UnixDatagram::local_addr` * `UnixDatagram::peer_addr` * `UnixDatagram::recv_from` * `UnixDatagram::recv` * `UnixDatagram::send_to` * `UnixDatagram::send` * `UnixDatagram::set_read_timeout` * `UnixDatagram::set_write_timeout` * `UnixDatagram::read_timeout` * `UnixDatagram::write_timeout` * `UnixDatagram::set_nonblocking` * `UnixDatagram::take_error` * `UnixDatagram::shutdown` * RawFd impls for `UnixDatagram` * `{BTree,Hash}Map::values_mut` * `<[_]>::binary_search_by_key` Deprecated: * `StaticCondvar` - this, and all other static synchronization primitives below, are usable today through the lazy-static crate on stable Rust today. Additionally, we'd like the non-static versions to be directly usable in a static context one day, so they're unlikely to be the final forms of the APIs in any case. * `CONDVAR_INIT` * `StaticMutex` * `MUTEX_INIT` * `StaticRwLock` * `RWLOCK_INIT` * `iter::Peekable::is_empty` Closes #27717 Closes #27720 cc #27784 (but encode methods still exist) Closes #30014 Closes #30425 Closes #30449 Closes #31190 Closes #31399 Closes #31767 Closes #32111 Closes #32281 Closes #32312 Closes #32551 Closes #33018
2016-04-26std: Allow creating ExitStatus from raw valuesAlex Crichton-0/+15
Sometimes a process may be waited on externally from the standard library, in which case it can be useful to create a raw `ExitStatus` structure to return. This commit extends the existing Unix `ExitStatusExt` extension trait and adds a new Windows-specific `ExitStatusExt` extension trait to do this. The methods are currently called `ExitStatus::from_raw`. cc #32713
2016-04-11std: Stabilize APIs for the 1.9 releaseAlex Crichton-1/+3
This commit applies all stabilizations, renamings, and deprecations that the library team has decided on for the upcoming 1.9 release. All tracking issues have gone through a cycle-long "final comment period" and the specific APIs stabilized/deprecated are: Stable * `std::panic` * `std::panic::catch_unwind` (renamed from `recover`) * `std::panic::resume_unwind` (renamed from `propagate`) * `std::panic::AssertUnwindSafe` (renamed from `AssertRecoverSafe`) * `std::panic::UnwindSafe` (renamed from `RecoverSafe`) * `str::is_char_boundary` * `<*const T>::as_ref` * `<*mut T>::as_ref` * `<*mut T>::as_mut` * `AsciiExt::make_ascii_uppercase` * `AsciiExt::make_ascii_lowercase` * `char::decode_utf16` * `char::DecodeUtf16` * `char::DecodeUtf16Error` * `char::DecodeUtf16Error::unpaired_surrogate` * `BTreeSet::take` * `BTreeSet::replace` * `BTreeSet::get` * `HashSet::take` * `HashSet::replace` * `HashSet::get` * `OsString::with_capacity` * `OsString::clear` * `OsString::capacity` * `OsString::reserve` * `OsString::reserve_exact` * `OsStr::is_empty` * `OsStr::len` * `std::os::unix::thread` * `RawPthread` * `JoinHandleExt` * `JoinHandleExt::as_pthread_t` * `JoinHandleExt::into_pthread_t` * `HashSet::hasher` * `HashMap::hasher` * `CommandExt::exec` * `File::try_clone` * `SocketAddr::set_ip` * `SocketAddr::set_port` * `SocketAddrV4::set_ip` * `SocketAddrV4::set_port` * `SocketAddrV6::set_ip` * `SocketAddrV6::set_port` * `SocketAddrV6::set_flowinfo` * `SocketAddrV6::set_scope_id` * `<[T]>::copy_from_slice` * `ptr::read_volatile` * `ptr::write_volatile` * The `#[deprecated]` attribute * `OpenOptions::create_new` Deprecated * `std::raw::Slice` - use raw parts of `slice` module instead * `std::raw::Repr` - use raw parts of `slice` module instead * `str::char_range_at` - use slicing plus `chars()` plus `len_utf8` * `str::char_range_at_reverse` - use slicing plus `chars().rev()` plus `len_utf8` * `str::char_at` - use slicing plus `chars()` * `str::char_at_reverse` - use slicing plus `chars().rev()` * `str::slice_shift_char` - use `chars()` plus `Chars::as_str` * `CommandExt::session_leader` - use `before_exec` instead. Closes #27719 cc #27751 (deprecating the `Slice` bits) Closes #27754 Closes #27780 Closes #27809 Closes #27811 Closes #27830 Closes #28050 Closes #29453 Closes #29791 Closes #29935 Closes #30014 Closes #30752 Closes #31262 cc #31398 (still need to deal with `before_exec`) Closes #31405 Closes #31572 Closes #31755 Closes #31756
2016-02-10std: Push process stdio setup in std::sysAlex Crichton-1/+2
Most of this is platform-specific anyway, and we generally have to jump through fewer hoops to do the equivalent operation on Windows. One benefit for Windows today is that this new structure avoids an extra `DuplicateHandle` when creating pipes. For Unix, however, the behavior should be the same. Note that this is just a pure refactoring, no functionality was added or removed.
2016-02-04std: Expose SystemTime accessors on fs::MetadataAlex Crichton-3/+3
These accessors are used to get at the last modification, last access, and creation time of the underlying file. Currently not all platforms provide the creation time, so that currently returns `Option`.
2016-01-15Addressed commentsPaul Dicker-27/+26
2016-01-14Fix doctestsPaul Dicker-1/+2