about summary refs log tree commit diff
path: root/src/liblibc/lib.rs
AgeCommit message (Collapse)AuthorLines
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
2014-09-02Fix MIPS targetJyun-Yan You-0/+6
Add missing liblibc constants
2014-09-01auto merge of #16844 : mrmonday/rust/liblibc-custom-socket, r=alexcrichtonbors-7/+152
These are the additions to liblibc required for raw/custom socket support. I've broken this into a separate pull request due to the upcoming I/O overhaul (was originally part of pull #15741). cc @alexcrichton.
2014-08-30Unify non-snake-case lints and non-uppercase statics lintsP1start-2/+2
This unifies the `non_snake_case_functions` and `uppercase_variables` lints into one lint, `non_snake_case`. It also now checks for non-snake-case modules. This also extends the non-camel-case types lint to check type parameters, and merges the `non_uppercase_pattern_statics` lint into the `non_uppercase_statics` lint. Because the `uppercase_variables` lint is now part of the `non_snake_case` lint, all non-snake-case variables that start with lowercase characters (such as `fooBar`) will now trigger the `non_snake_case` lint. New code should be updated to use the new `non_snake_case` lint instead of the previous `non_snake_case_functions` and `uppercase_variables` lints. All use of the `non_uppercase_pattern_statics` should be replaced with the `non_uppercase_statics` lint. Any code that previously contained non-snake-case module or variable names should be updated to use snake case names or disable the `non_snake_case` lint. Any code with non-camel-case type parameters should be changed to use camel case or disable the `non_camel_case_types` lint. [breaking-change]
2014-08-29Modifications to liblibc for raw/custom socket support.Robert Clipsham-7/+152
2014-08-23auto merge of #16693 : vadimcn/rust/rename--win32, r=pcwaltonbors-10/+3
2014-08-23Complete renaming of win32 to windowsVadim Chugunov-10/+3
2014-08-23Fix intptr_t on win64Vadim Chugunov-0/+8
2014-08-20liblibc: don't use int/uint for intptr_t/uintptr_tCorey Richardson-18/+19
int/uint aren't considered FFI safe, replace them with the actual type they represent (i64/u64 or i32/u32). This is a breaking change, but at most a cast to `uint` or `int` needs to be added. [breaking-change]
2014-08-20Add #[repr(C)] to all the things!Corey Richardson-2/+102
2014-08-20librustc: handle repr on structs, require it for ffi, unify with packedCorey Richardson-0/+1
As of RFC 18, struct layout is undefined. Opting into a C-compatible struct layout is now down with #[repr(C)]. For consistency, specifying a packed layout is now also down with #[repr(packed)]. Both can be specified. To fix errors caused by this, just add #[repr(C)] to the structs, and change #[packed] to #[repr(packed)] Closes #14309 [breaking-change]
2014-08-19Rename Nullable::Some to Nullable::NotNullSiegeLord-1/+1
2014-08-18snapshots: Register new snapshots.Patrick Walton-34/+0
2014-08-17librustc: Allow trait bounds on structures and enumerations, and checkPatrick Walton-0/+34
them during kind checking. This implements RFC #11. Closes #15759.
2014-08-16librustc: Forbid external crates, imports, and/or items from beingPatrick Walton-3/+3
declared with the same name in the same scope. This breaks several common patterns. First are unused imports: use foo::bar; use baz::bar; Change this code to the following: use baz::bar; Second, this patch breaks globs that import names that are shadowed by subsequent imports. For example: use foo::*; // including `bar` use baz::bar; Change this code to remove the glob: use foo::{boo, quux}; use baz::bar; Or qualify all uses of `bar`: use foo::{boo, quux}; use baz; ... baz::bar ... Finally, this patch breaks code that, at top level, explicitly imports `std` and doesn't disable the prelude. extern crate std; Because the prelude imports `std` implicitly, there is no need to explicitly import it; just remove such directives. The old behavior can be opted into via the `import_shadowing` feature gate. Use of this feature gate is discouraged. This implements RFC #116. Closes #16464. [breaking-change]
2014-08-12Replace #[cfg(target_os = "win32")] with #[cfg(target_os = "windows")]Vadim Chugunov-7/+14
2014-08-07windows: Fix INVALID_HANDLE_VALUEPeter Atashian-4/+3
Made INVALID_HANDLE_VALUE actually a HANDLE. Removed all useless casts during INVALID_HANDLE_VALUE comparisons. Signed-off-by: Peter Atashian <retep998@gmail.com>
2014-08-07windows: Fix several tests on 64-bit.Peter Atashian-12/+9
Signed-off-by: Peter Atashian <retep998@gmail.com>
2014-07-29Port Rust to DragonFlyBSDMichael Neumann-5/+221
Not included are two required patches: * LLVM: segmented stack support for DragonFly [1] * jemalloc: simple configure patches [1]: http://reviews.llvm.org/D4705
2014-07-13auto merge of #15584 : alexcrichton/rust/warn-annoyances, r=cmrbors-57/+61
* Don't warn about `#[crate_name]` if `--crate-name` is specified * Don't warn about non camel case identifiers on `#[repr(C)]` structs * Switch `mode` to `mode_t` in libc.
2014-07-11libc: Switch open to use a mode_t on unixAlex Crichton-57/+61
While I'm at it, export O_SYNC with the other flags that are exported. Closes #15582