about summary refs log tree commit diff
path: root/src/liblibc
AgeCommit message (Collapse)AuthorLines
2015-01-21rollup merge of #21414: ejjeong/aarch64-linux-androidAlex Crichton-2/+2
Initial support for aarch64-linux-android (#18920) - Add new configuration files - Modify some options to compile & link succesfully. (PIE, disable tls on jemalloc, modify some external function linkage, ..) - To build, refer to https://github.com/rust-lang/rust/wiki/Doc-building-for-android. (tested with platform=21 and toolchain=aarch64-linux-android-4.9)
2015-01-20Initial support for aarch64-linux-androidEunji Jeong-2/+2
2015-01-19Fix HMODULEPeter Atashian-1/+2
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-01-19Auto merge of #21267 - danslapman:master, r=alexcrichtonbors-4/+4
This patch fixes IP_ADD_MEMBERSHIP problem described here: https://github.com/rust-lang/rust/issues/20381 I've tested on my ProbeR project, everything seems ok.
2015-01-17Set allow(unstable) in crates that use unstable featuresBrian Anderson-0/+1
Lets them build with the -dev, -nightly, or snapshot compiler
2015-01-17Add note about libc::exit's unsafety.Steve Klabnik-0/+21
Fixes #19245.
2015-01-17Fixes `join_multicast` on Windows #20381Daniil Smirnov-4/+4
2015-01-11powerpc: definition support for libcRicho Healey-7/+18
2015-01-09Merge pull request #20699 from vhbit/ios-archsbors-1/+1
Better iOS support Reviewed-by: alexcrichton
2015-01-09iOS: preliminary 64-bit archs supportValerii Hiora-1/+1
2015-01-08rollup merge of #20754: nikomatsakis/int-featureAlex Crichton-0/+1
Conflicts: src/test/compile-fail/borrowck-move-out-of-overloaded-auto-deref.rs src/test/compile-fail/issue-2590.rs src/test/compile-fail/lint-stability.rs src/test/compile-fail/slice-mut-2.rs src/test/compile-fail/std-uncopyable-atomics.rs
2015-01-08Remove warning from the libraries.Huon Wilson-0/+1
This adds the int_uint feature to *every* library, whether or not it needs it.
2015-01-08Improvements to feature stagingBrian Anderson-1/+1
This gets rid of the 'experimental' level, removes the non-staged_api case (i.e. stability levels for out-of-tree crates), and lets the staged_api attributes use 'unstable' and 'deprecated' lints. This makes the transition period to the full feature staging design a bit nicer.
2015-01-07rollup merge of #20708: aturon/new-int-modulesAlex Crichton-2/+0
Conflicts: src/libserialize/lib.rs
2015-01-07Preliminary feature stagingBrian Anderson-0/+1
This partially implements the feature staging described in the [release channel RFC][rc]. It does not yet fully conform to the RFC as written, but does accomplish its goals sufficiently for the 1.0 alpha release. It has three primary user-visible effects: * On the nightly channel, use of unstable APIs generates a warning. * On the beta channel, use of unstable APIs generates a warning. * On the beta channel, use of feature gates generates a warning. Code that does not trigger these warnings is considered 'stable', modulo pre-1.0 bugs. Disabling the warnings for unstable APIs continues to be done in the existing (i.e. old) style, via `#[allow(...)]`, not that specified in the RFC. I deem this marginally acceptable since any code that must do this is not using the stable dialect of Rust. Use of feature gates is itself gated with the new 'unstable_features' lint, on nightly set to 'allow', and on beta 'warn'. The attribute scheme used here corresponds to an older version of the RFC, with the `#[staged_api]` crate attribute toggling the staging behavior of the stability attributes, but the user impact is only in-tree so I'm not concerned about having to make design changes later (and I may ultimately prefer the scheme here after all, with the `#[staged_api]` crate attribute). Since the Rust codebase itself makes use of unstable features the compiler and build system to a midly elaborate dance to allow it to bootstrap while disobeying these lints (which would otherwise be errors because Rust builds with `-D warnings`). This patch includes one significant hack that causes a regression. Because the `format_args!` macro emits calls to unstable APIs it would trigger the lint. I added a hack to the lint to make it not trigger, but this in turn causes arguments to `println!` not to be checked for feature gates. I don't presently understand macro expansion well enough to fix. This is bug #20661. Closes #16678 [rc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
2015-01-07Register new snapshotsAlex Crichton-2/+0
2015-01-07libc: Prepare for movement to crates.ioAlex Crichton-21/+6
This commit prepares the liblibc library to be moved to crates.io. Unlike the log, serialize, term, etc crates, the source for this crate will *not* be duplicated out-of-tree. Instead a new rust-lang/libc repository will be created with a submodule to this repository and it will use the source directly. In order to compile within the stable ecosystem of Rust, this crate cannot link to libcore, and it also needs some tweaks for the other attributes that it has. As a result this commit tweaks the source of the crate to link to libcore when built in tree but link to libstd when built via cargo. Note that the rust-lang/libc crate isn't quite prepared just yet, there's a Cargo bug or two that I'd like to iron out before publishing it. This is simply preparing the in-tree source.
2015-01-06rollup merge of #20607: nrc/kindsAlex Crichton-1/+3
Conflicts: src/libcore/array.rs src/libcore/cell.rs src/libcore/prelude.rs src/libstd/path/posix.rs src/libstd/prelude/v1.rs src/test/compile-fail/dst-sized-trait-param.rs
2015-01-06Register new snapshotsAlex Crichton-2/+1
Conflicts: src/librbml/lib.rs src/libserialize/json_stage0.rs src/libserialize/serialize_stage0.rs src/libsyntax/ast.rs src/libsyntax/ext/deriving/generic/mod.rs src/libsyntax/parse/token.rs
2015-01-07markers -> markerNick Cameron-2/+2
2015-01-07Change `std::kinds` to `std::markers`; flatten `std::kinds::marker`Nick Cameron-1/+3
[breaking-change]
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-115/+115
2015-01-03Initial version of AArch64 support.Akos Kiss-5/+64
Adds AArch64 knowledge to: * configure, * make files, * sources, * tests, and * documentation.
2015-01-02More falloutNick Cameron-2/+2
2015-01-02Fallout - change array syntax to use `;`Nick Cameron-49/+49
2014-12-19Several fixes for DragonFly (rebase)Michael Neumann-0/+12
2014-12-18Make at_exit initialize lazilyAaron Turon-2/+2
2014-12-08librustc: Make `Copy` opt-in.Niko Matsakis-113/+135
This change makes the compiler no longer infer whether types (structures and enumerations) implement the `Copy` trait (and thus are implicitly copyable). Rather, you must implement `Copy` yourself via `impl Copy for MyType {}`. A new warning has been added, `missing_copy_implementations`, to warn you if a non-generic public type has been added that could have implemented `Copy` but didn't. For convenience, you may *temporarily* opt out of this behavior by using `#![feature(opt_out_copy)]`. Note though that this feature gate will never be accepted and will be removed by the time that 1.0 is released, so you should transition your code away from using it. This breaks code like: #[deriving(Show)] struct Point2D { x: int, y: int, } fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } Change this code to: #[deriving(Show)] struct Point2D { x: int, y: int, } impl Copy for Point2D {} fn main() { let mypoint = Point2D { x: 1, y: 1, }; let otherpoint = mypoint; println!("{}{}", mypoint, otherpoint); } This is the backwards-incompatible part of #13231. Part of RFC #3. [breaking-change]
2014-12-02liblibc: getsid() was missing though setsid() was already there.NODA, Kai-1/+2
include <unistd.h> pid_t getsid(pid_t pid); CONFORMING TO SVr4, POSIX.1-2001. Signed-off-by: NODA, Kai <nodakai@gmail.com>
2014-11-26rollup merge of #19329: steveklabnik/doc_style_cleanup2Alex Crichton-53/+51
2014-11-26/*! -> //!Steve Klabnik-53/+51
Sister pull request of https://github.com/rust-lang/rust/pull/19288, but for the other style of block doc comment.
2014-11-25/** -> ///Steve Klabnik-14/+12
This is considered good convention.
2014-11-20Fallout from libgreen and libnative removalAaron Turon-1/+0
2014-11-17Switch to purely namespaced enumsSteven Fackler-0/+2
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-10-28Update code with new lint namesAaron Turon-2/+2
2014-10-24auto merge of #17896 : mahkoh/rust/intmax, r=alexcrichtonbors-0/+16
Closes #17075 I don't know if this is correct. The easiest way to find out is to run the following program on all targets but I can't do it myself. ```c #include <stdint.h> #include <stdio.h> int main(void) { if (sizeof(intmax_t) != 8) { puts("ERROR"); return 1; } } ```
2014-10-12add intmaxJulian Orth-0/+16
2014-10-10auto merge of #17853 : alexcrichton/rust/issue-17718, r=pcwaltonbors-1770/+1770
This change is an implementation of [RFC 69][rfc] which adds a third kind of global to the language, `const`. This global is most similar to what the old `static` was, and if you're unsure about what to use then you should use a `const`. The semantics of these three kinds of globals are: * A `const` does not represent a memory location, but only a value. Constants are translated as rvalues, which means that their values are directly inlined at usage location (similar to a #define in C/C++). Constant values are, well, constant, and can not be modified. Any "modification" is actually a modification to a local value on the stack rather than the actual constant itself. Almost all values are allowed inside constants, whether they have interior mutability or not. There are a few minor restrictions listed in the RFC, but they should in general not come up too often. * A `static` now always represents a memory location (unconditionally). Any references to the same `static` are actually a reference to the same memory location. Only values whose types ascribe to `Sync` are allowed in a `static`. This restriction is in place because many threads may access a `static` concurrently. Lifting this restriction (and allowing unsafe access) is a future extension not implemented at this time. * A `static mut` continues to always represent a memory location. All references to a `static mut` continue to be `unsafe`. This is a large breaking change, and many programs will need to be updated accordingly. A summary of the breaking changes is: * Statics may no longer be used in patterns. Statics now always represent a memory location, which can sometimes be modified. To fix code, repurpose the matched-on-`static` to a `const`. static FOO: uint = 4; match n { FOO => { /* ... */ } _ => { /* ... */ } } change this code to: const FOO: uint = 4; match n { FOO => { /* ... */ } _ => { /* ... */ } } * Statics may no longer refer to other statics by value. Due to statics being able to change at runtime, allowing them to reference one another could possibly lead to confusing semantics. If you are in this situation, use a constant initializer instead. Note, however, that statics may reference other statics by address, however. * Statics may no longer be used in constant expressions, such as array lengths. This is due to the same restrictions as listed above. Use a `const` instead. [breaking-change] Closes #17718 [rfc]: https://github.com/rust-lang/rfcs/pull/246
2014-10-09Use the same html_root_url for all docsBrian Anderson-1/+1
2014-10-09Revert "Update html_root_url for 0.12.0 release"Brian Anderson-1/+1
This reverts commit 2288f332301b9e22db2890df256322650a7f3445.
2014-10-09libc: Convert all statics to constantAlex Crichton-1770/+1770
This crate is largely just one giant header file, so there's no need for any of these values to actually have a memory location, they're all just basically a regular #define.
2014-10-07Update html_root_url for 0.12.0 releaseBrian Anderson-1/+1
2014-09-30Fix cfg warnings for liblibcSteven Fackler-108/+93
2014-09-25auto merge of #17466 : nikomatsakis/rust/oibt, r=pcwaltonbors-0/+2
Moves the vast majority of builtin bound checking out of type contents and into the trait system. This is a preliminary step for a lot of follow-on work: - opt-in builtin types, obviously - generalized where clauses, because TypeContents has this notion that a type parameter has a single set of builtin kinds, but with where clauses it depends on context - generalized coherence, because this adds support for recursive trait selection Unfortunately I wasn't able to completely remove Type Contents from the front-end checking in this PR. It's still used by EUV to decide what gets moved and what doesn't. r? @pcwalton
2014-09-25Move checking of whether fields are Sized or not into wf / trait code.Niko Matsakis-0/+2
2014-09-24liblibc and libnative: send() should use const buffers.NODA, Kai-2/+2
2014-09-06readdir: return error instead of failing on invalid UTF-16Peter Atashian-4/+20
Fixes #15279 Signed-off-by: Peter Atashian <retep998@gmail.com>
2014-09-04auto merge of #16982 : jbcrail/rust/comment-and-string-corrections, ↵bors-1/+1
r=alexcrichton I corrected spelling and capitalization errors in comments and strings.
2014-09-03Fix spelling errors and capitalization.Joseph Crail-1/+1
2014-09-03Fix some non-FFI-safe types in externsKeegan McAllister-1/+1