about summary refs log tree commit diff
path: root/src/libstd/os
AgeCommit message (Collapse)AuthorLines
2016-01-31Rename sunos to solarisNikita Baksalyar-1/+1
2016-01-31Add Illumos supportNikita Baksalyar-0/+90
2016-01-29add support for mips(el)-unknown-linux-muslJorge Aparicio-0/+9
This target covers MIPS devices that run the trunk version of OpenWRT. The x86_64-unknown-linux-musl target always links statically to C libraries. For the mips(el)-unknown-linux-musl target, we opt for dynamic linking (like most of other targets do) to keep binary size down. As for the C compiler flags used in the build system, we use the same flags used for the mips(el)-unknown-linux-gnu target.
2016-01-26Fix warnings during testsAlex Crichton-0/+1
The deny(warnings) attribute is now enabled for tests so we need to weed out these warnings as well.
2016-01-15Rollup merge of #30925 - semarie:blksize_t, r=alexcrichtonManish Goregaokar-1/+1
make `os::raw::tests::unix` test to pass again r? @alexcrichton
2016-01-14update blksize_t in raw to reflect libc change under openbsdSébastien Marie-1/+1
2016-01-13Add powerpc64 and powerpc64le supportAnton Blanchard-3/+10
This adds support for big endian and little endian PowerPC64. make check runs clean apart from one big endian backtrace issue.
2015-12-29Fix warnings when compiling stdlib with --testFlorian Hahn-1/+3
2015-12-04Add JoinHandleExt to get the pthread_t on unix platformsPeter Atashian-0/+24
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-11-18Fix buildbot failuresVadim Petrochenkov-9/+20
2015-11-18Add missing annotations and some testsVadim Petrochenkov-3/+9
2015-11-11Cleaner c_char cfg logicarcnmx-6/+6
2015-11-11Prefer raw::c_char or libc::c_char and fix armarcnmx-2/+6
2015-11-09std: Migrate to the new libcAlex Crichton-2/+2
* Delete `sys::unix::{c, sync}` as these are now all folded into libc itself * Update all references to use `libc` as a result. * Update all references to the new flat namespace. * Moves all windows bindings into sys::c
2015-10-28Port the standard crates to PNaCl/NaCl.Richard Diamond-239/+30
2015-10-13Make the Metadata struct CloneBen S-0/+18
This commit adds #[derive(Clone)] to std::fs::Metadata, making that struct cloneable. Although the exact contents of that struct differ between OSes, they all have it contain only value types, meaning that the data can be re-used without repercussions. It also adds #[derive(Clone)] to every type used by that struct across all OSes, including the various Unix `stat` structs and Windows's `WIN32_FILE_ATTRIBUTE_DATA`.
2015-10-06Replace multiple trailing newlines with a single trailing newlineCarlos Liam-1/+0
Sorry I didn’t get this in the last PR (#28864), I hadn’t thought of it.
2015-09-21Various fixes for NetBSD/amd64Sebastian Wicki-6/+7
2015-09-02Fix compile on DragonFly: Replace unknown uint32_t/in64_t by u32/i64.Michael Neumann-4/+4
2015-08-23New cross target: i686-linux-androidTim JIANG-1/+2
- All the libstd tests are now passing in the optimized build against a Zenfone2 and the x86 Android simulator.
2015-08-15std: Add issues to all unstable featuresAlex Crichton-2/+4
2015-07-28Fixes #25155 and fixes #27359 by fixing the stat defines for both freebsd ↵Dave Huseby-67/+124
10.1 x86_64 and i686
2015-07-01Add netbsd amd64 supportAlex Newman-0/+92
2015-06-09std: Stabilize a number of new fs featuresAlex Crichton-122/+518
This commit stabilizes the following APIs, slating them all to be cherry-picked into the 1.1 release. * fs::FileType (and transitively the derived trait implementations) * fs::Metadata::file_type * fs::FileType::is_dir * fs::FileType::is_file * fs::FileType::is_symlink * fs::DirEntry::metadata * fs::DirEntry::file_type * fs::DirEntry::file_name * fs::set_permissions * fs::symlink_metadata * os::raw::{self, *} * os::{android, bitrig, linux, ...}::raw::{self, *} * os::{android, bitrig, linux, ...}::fs::MetadataExt * os::{android, bitrig, linux, ...}::fs::MetadataExt::as_raw_stat * os::unix::fs::PermissionsExt * os::unix::fs::PermissionsExt::mode * os::unix::fs::PermissionsExt::set_mode * os::unix::fs::PermissionsExt::from_mode * os::unix::fs::OpenOptionsExt * os::unix::fs::OpenOptionsExt::mode * os::unix::fs::DirEntryExt * os::unix::fs::DirEntryExt::ino * os::windows::fs::MetadataExt * os::windows::fs::MetadataExt::file_attributes * os::windows::fs::MetadataExt::creation_time * os::windows::fs::MetadataExt::last_access_time * os::windows::fs::MetadataExt::last_write_time * os::windows::fs::MetadataExt::file_size The `os::unix::fs::Metadata` structure was also removed entirely, moving all of its associated methods into the `os::unix::fs::MetadataExt` trait instead. The methods are all marked as `#[stable]` still. As some minor cleanup, some deprecated and unstable fs apis were also removed: * File::path * Metadata::accessed * Metadata::modified Features that were explicitly left unstable include: * fs::WalkDir - the semantics of this were not considered in the recent fs expansion RFC. * fs::DirBuilder - it's still not 100% clear if the naming is right here and if the set of functionality exposed is appropriate. * fs::canonicalize - the implementation on Windows here is specifically in question as it always returns a verbatim path. Additionally the Unix implementation is susceptible to buffer overflows on long paths unfortunately. * fs::PathExt - as this is just a convenience trait, it is not stabilized at this time. * fs::set_file_times - this funciton is still waiting on a time abstraction.
2015-06-04support aarch64-android raw type definitionsSae-bom Kim-33/+82
2015-05-09Rollup merge of #25140 - kevinmehall:mips, r=steveklabnikManish Goregaokar-2/+2
Building with `--target=mipsel-unknown-linux-gnu` currently results in the following errors, fixed by this PR: ``` rustc: x86_64-unknown-linux-gnu/stage2/lib/rustlib/mipsel-unknown-linux-gnu/lib/libstd /vol/rust/src/libstd/os/linux/raw.rs:76:21: 76:28 error: use of undeclared type name `c_ulong` /vol/rust/src/libstd/os/linux/raw.rs:76 pub st_dev: c_ulong, ^~~~~~~ /vol/rust/src/libstd/os/linux/raw.rs:83:22: 83:29 error: use of undeclared type name `c_ulong` /vol/rust/src/libstd/os/linux/raw.rs:83 pub st_rdev: c_ulong, ^~~~~~~ /vol/rust/src/libstd/sys/common/net2.rs:210:52: 210:70 error: unresolved name `libc::TCP_KEEPIDLE` /vol/rust/src/libstd/sys/common/net2.rs:210 setsockopt(&self.inner, libc::IPPROTO_TCP, libc::TCP_KEEPIDLE, ```
2015-05-07std: Rename sys::foo2 modules to sys::fooAlex Crichton-9/+9
Now that `std::old_io` has been removed for quite some time the naming real estate here has opened up to allow these modules to move back to their proper names.
2015-05-05Fix MIPS build errors in libstd/os/linux/raw.rsKevin Mehall-2/+2
2015-04-30remove denied unused import: pid_t in rawSébastien Marie-4/+4
- unbreak the build under openbsd - while here, apply same modification to dragonfly, freebsd, ios (pid_t imported, but not used in raw.rs)
2015-04-27std: Expand the area of std::fsAlex Crichton-0/+971
This commit is an implementation of [RFC 1044][rfc] which adds additional surface area to the `std::fs` module. All new APIs are `#[unstable]` behind assorted feature names for each one. [rfc]: https://github.com/rust-lang/rfcs/pull/1044 The new APIs added are: * `fs::canonicalize` - bindings to `realpath` on unix and `GetFinalPathNameByHandle` on windows. * `fs::symlink_metadata` - similar to `lstat` on unix * `fs::FileType` and accessor methods as `is_{file,dir,symlink}` * `fs::Metadata::file_type` - accessor for the raw file type * `fs::DirEntry::metadata` - acquisition of metadata which is free on Windows but requires a syscall on unix. * `fs::DirEntry::file_type` - access the file type which may not require a syscall on most platforms. * `fs::DirEntry::file_name` - access just the file name without leading components. * `fs::PathExt::symlink_metadata` - convenience method for the top-level function. * `fs::PathExt::canonicalize` - convenience method for the top-level function. * `fs::PathExt::read_link` - convenience method for the top-level function. * `fs::PathExt::read_dir` - convenience method for the top-level function. * `std::os::raw` - type definitions for raw OS/C types available on all platforms. * `std::os::$platform` - new modules have been added for all currently supported platforms (e.g. those more specific than just `unix`). * `std::os::$platform::raw` - platform-specific type definitions. These modules are populated with the bare essentials necessary for lowing I/O types into their raw representations, and currently largely consist of the `stat` definition for unix platforms. This commit also deprecates `Metadata::{modified, accessed}` in favor of inspecting the raw representations via the lowering methods of `Metadata`.