about summary refs log tree commit diff
path: root/src/liblibc
AgeCommit message (Collapse)AuthorLines
2015-03-23Add #![feature] attributes to doctestsBrian Anderson-1/+1
2015-03-19Socket options constants for *BSD/Linux/WindowsValerii Hiora-12/+91
2015-03-19Adding sys/socket.h constants for iOS/Mac, particularly for SO_SOCKET options.Drew Crawford-1/+16
This is probably more broadly applicable than these two platforms (since it's part of the bsd4.4 standard) but that's outside my problem domain today. If this goes well, I may submit Linux/64 support in a separate PR. Reviewers should take a look at http://www.opensource.apple.com/source/xnu/xnu-792.17.14/bsd/sys/socket.h?txt which defines constants for OSX. iOS uses the same header. I release this patch under the MIT license.
2015-03-19Rollup merge of #23457 - nagisa:get-set-resources, r=alexcrichtonManish Goregaokar-0/+300
Hopefully didn’t miss or mess up anything. ~~EDIT: ah, as usual, just didn’t bother running build before pushing a submit request button. Build pending.~~
2015-03-18Add {get,set}rlimit and getrusage to libcSimonas Kazlauskas-0/+300
2015-03-17libc: Fix definition of sockaddr_storage on 32-bit linuxAlex Crichton-2/+2
The alignment field is actually a "pointer sized" type instead of always i64, requiring that the size of the padding field is also calculated slightly differently. Closes #23425
2015-03-15[BREAKING] Rename two instances of MAP_NONRESERVENicholas-2/+2
To the correct MAP_NORESERVE. Every other thing is known as MAP_NORESERVE, so this is just a basic typo. I really doubt this will break anybody's but my own code.
2015-03-06Rollup merge of #23056 - awlnx:master, r=nrcManish Goregaokar-0/+2
2015-03-06Rollup merge of #23070 - krdln:fix-stat-arm, r=alexcrichtonManish Goregaokar-4/+6
This separates definitions of struct stat and other typedefs between Android and Linux on ARM (Android has a non-standard one). This makes functions such as `File::metadata()` work correctly and makes one able to check file's size. All tests from std (and also run-pass: stat.rs) now pass on ARM Linux. Fixes #20007.
2015-03-06Rollup merge of #22862 - vhbit:broken-open, r=alexcrichtonManish Goregaokar-2/+29
According to Apple's [arm64 calling convention](https://developer.apple.com/library/ios/documentation/Xcode/Conceptual/iPhoneOSABIReference/Articles/ARM64FunctionCallingConventions.html#//apple_ref/doc/uid/TP40013702-SW1) varargs always are passed through stack. Since `open` is actually a vararg function on Darwin, it means that older declaration caused permissions to be taken from stack, while passed through register => it set file permissions to garbage and it was simply impossible to read/delete files after they were created. They way this commit handles it is to preserve compatibility with existing code - it simply creates a shim unsafe function so all existing callers continue work as nothing happened.
2015-03-05fix for new attributes failing. issue #22964awlnx-0/+2
2015-03-05iOS: open file on aarch64 breaks permissionsValerii Hiora-2/+29
According to Apple arm64 calling convention varargs always are passed through stack. Since `open` is actually a vararg function on Darwin's, it means that older declaration caused permissions to be taken from stack, while passed through register => it set file permissions to garbage and it was simply impossible to read/delete files after they were created. They way this commit handles it is to preserve compatibility with existing code - it simply creates a shim unsafe function so all existing callers continue work as nothing happened.
2015-03-05Rollup merge of #22994 - eddyb:unsuffix-ints-good, r=alexcrichtonManish Goregaokar-25/+25
Automatic has-same-types testing methodology can be found in #22501. Because most of them don't work with `--pretty=typed`, compile-fail tests were manually audited. r? @aturon
2015-03-05Remove integer suffixes where the types in compiled code are identical.Eduard Burtescu-25/+25
2015-03-04Fix struct stat on arm linuxMichał Krasnoborski-4/+6
2015-03-03libc: Move features behind a cfg_attr gateAlex Crichton-6/+3
This same source is being built in the Cargo ecosystem and hence needs to build on stable Rust as well. This commit places the `no_std` attribute along with the `no_std` feature behind a `cfg_attr` flag so they are not processed when compiled on crates.io
2015-03-01unbreak dragonfly build after nacl integrationSébastien Marie-1/+0
this is the same problem as openbsd (#22792). without the patch, liblibc don't build.
2015-02-25unbreak openbsd after nacl intergrationSébastien Marie-1/+0
2015-02-21Add cfgs to `liblibc` for NaCl targets.Richard Diamond-238/+241
2015-02-21Auto merge of #21959 - dhuseby:bitrig-support, r=brsonbors-80/+92
This patch adds the necessary pieces to support rust on Bitrig https://bitrig.org
2015-02-18Remove `i`, `is`, `u`, or `us` suffixes that are not necessary.Niko Matsakis-1/+1
2015-02-18 Manual merge of #22475 - alexcrichton:rollup, r=alexcrichtonHuon Wilson-7/+0
One windows bot failed spuriously.
2015-02-17Register new snapshotsAlex Crichton-7/+0
2015-02-17Auto merge of #21774 - ejjeong:enable-test-for-android, r=alexcrichtonbors-0/+1
- Now "make check-stage2-T-aarch64-linux-android-H-x86_64-unknown-linux-gnu" works (#21773) - Fix & enable debuginfo tests for android (#10381) - Fix & enable more tests for android (both for arm/aarch64) - Enable many already-pass tests on android (both for arm/aarch64)
2015-02-12Updated darwin typesValerii Hiora-11/+15
2015-02-11Even more test fixesAlex Crichton-1/+2
2015-02-11fixing the macos defines...i picked the wrong one during a merge earlier.Dave Huseby-107/+115
2015-02-11removing unusused timespec importDave Huseby-1/+0
2015-02-11oops, fixing incorrect _SC_ATEXIT_MAX valueDave Huseby-1/+1
2015-02-11fixing PR review commentsDave Huseby-408/+9
2015-02-11bitrig integrationDave Huseby-17/+421
2015-02-10Test fixes and rebase conflictsAlex Crichton-1/+1
2015-02-10Fix aarch64 test issues (same level to arm32)Eunji Jeong-0/+1
2015-02-09int/uint => isize/usize in liblibc/liballoc/libarenawe-3/+2
2015-02-07Feature-gate #![no_std]Keegan McAllister-0/+1
Fixes #21833. [breaking-change]
2015-02-07Don't use std:: paths in syntax extensions when compiling a #![no_std] crateKeegan McAllister-1/+2
Fixes #16803. Fixes #14342. Fixes half of #21827 -- slice syntax is still broken.
2015-02-03Switch missing_copy_implementations to default-allowSteven Fackler-5/+0
This was particularly helpful in the time just after OIBIT's implementation to make sure things that were supposed to be Copy continued to be, but it's now creates a lot of noise for types that intentionally don't want to be Copy.
2015-02-03Auto merge of #21613 - alfie:suffix-small, r=alexcrichtonbors-1/+1
2015-02-02More deprecating of i/u suffixesAlfie John-1/+1
2015-02-01openbsd: remove unused openbsd codeSébastien Marie-3/+0
This code is in a block (libc::consts::os) that openbsd don't include This one is for freebsd and dragonfly. There is another block for openbsd below. Remove the unneed declaration.
2015-02-01openbsd: break lines too longSébastien Marie-2/+4
2015-02-01openbsd supportSébastien Marie-8/+642
2015-01-30Test fixes and rebase conflictsAlex Crichton-1/+1
Also some tidying up of a bunch of crate attributes
2015-01-29Rollup merge of #21640 - retep998:rmdir, r=alexcrichtonManish Goregaokar-0/+1
`_wrmdir` is literally just a wrapper around `RemoveDirectoryW`, so let's just use `RemoveDirectoryW`. r? @alexcrichton
2015-01-25wrmdir -> RemoveDirectoryWPeter Atashian-0/+1
Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-01-25Merge remote-tracking branch 'rust-lang/master'Brian Anderson-14/+14
Conflicts: mk/tests.mk src/liballoc/arc.rs src/liballoc/boxed.rs src/liballoc/rc.rs src/libcollections/bit.rs src/libcollections/btree/map.rs src/libcollections/btree/set.rs src/libcollections/dlist.rs src/libcollections/ring_buf.rs src/libcollections/slice.rs src/libcollections/str.rs src/libcollections/string.rs src/libcollections/vec.rs src/libcollections/vec_map.rs src/libcore/any.rs src/libcore/array.rs src/libcore/borrow.rs src/libcore/error.rs src/libcore/fmt/mod.rs src/libcore/iter.rs src/libcore/marker.rs src/libcore/ops.rs src/libcore/result.rs src/libcore/slice.rs src/libcore/str/mod.rs src/libregex/lib.rs src/libregex/re.rs src/librustc/lint/builtin.rs src/libstd/collections/hash/map.rs src/libstd/collections/hash/set.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/mutex.rs src/libstd/sync/poison.rs src/libstd/sync/rwlock.rs src/libsyntax/feature_gate.rs src/libsyntax/test.rs
2015-01-23Deprecated attributes don't take 'feature' names and are paired with ↵Brian Anderson-0/+1
stable/unstable Conflicts: src/libcore/atomic.rs src/libcore/finally.rs src/test/auxiliary/inherited_stability.rs src/test/auxiliary/lint_stability.rs
2015-01-23Set unstable feature names appropriatelyBrian Anderson-3/+2
* `core` - for the core crate * `hash` - hashing * `io` - io * `path` - path * `alloc` - alloc crate * `rand` - rand crate * `collections` - collections crate * `std_misc` - other parts of std * `test` - test crate * `rustc_private` - everything else
2015-01-22Rollup merge of #21500 - richo:power-fixups, r=alexcrichtonSteve Klabnik-12/+12
When I wrote this code, my janky shim to verify the constants didn't work as intended. This fixes everything I've run into since merge, which is hopefully everything.
2015-01-22Put #[staged_api] behind the 'staged_api' gateBrian Anderson-0/+1