Commit Graph

172 Commits

Author SHA1 Message Date
Alex Crichton
bd66f57e46 libc: Don't use unstable apis
Right now the `std::isize::BYTES` typedef is `#[unstable]`, but liblibc is using
this, preventing it from compiling on stable Rust.
2015-03-28 10:49:45 -07:00
Alex Crichton
36ef29abf7 Register new snapshots 2015-03-26 09:57:05 -07:00
Alex Crichton
3021d4c564 Test fixes and rebase conflicts, round 2 2015-03-24 18:37:16 -07:00
Alex Crichton
5c74ed912b rollup merge of #23659: GBGamer/master
For other permissions beside USR permissions, we need these constants.

fixes #23658
2015-03-24 14:50:47 -07:00
Nicholas Mazzuca
a9b31969dc Add the other S_I(RWX)(GRP/OTH) for posix creat 2015-03-24 03:25:48 -07:00
Alex Crichton
c608084ff5 rollup merge of #23598: brson/gate
Conflicts:
	src/compiletest/compiletest.rs
	src/libcollections/lib.rs
	src/librustc_back/lib.rs
	src/libserialize/lib.rs
	src/libstd/lib.rs
	src/libtest/lib.rs
	src/test/run-make/rustdoc-default-impl/foo.rs
	src/test/run-pass/env-home-dir.rs
2015-03-23 15:13:15 -07:00
Brian Anderson
e9019101a8 Add #![feature] attributes to doctests 2015-03-23 14:40:26 -07:00
Valerii Hiora
6f09dfc23a Socket options constants for *BSD/Linux/Windows 2015-03-19 16:58:08 +02:00
Drew Crawford
a848ce4d38 Adding sys/socket.h constants for iOS/Mac, particularly for SO_SOCKET options.
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-19 16:04:01 +02:00
Manish Goregaokar
48df3fb678 Rollup merge of #23457 - nagisa:get-set-resources, r=alexcrichton
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-19 08:24:35 +05:30
Simonas Kazlauskas
2d701e6b19 Add {get,set}rlimit and getrusage to libc 2015-03-18 13:10:29 +02:00
Alex Crichton
71982c2124 libc: Fix definition of sockaddr_storage on 32-bit linux
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-17 10:33:13 -07:00
Nicholas
cbd37d8980 [BREAKING] Rename two instances of MAP_NONRESERVE
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-15 23:03:18 -07:00
Manish Goregaokar
2fcdd824ef Rollup merge of #23056 - awlnx:master, r=nrc 2015-03-06 22:22:33 +05:30
Manish Goregaokar
c39833ed2d Rollup merge of #23070 - krdln:fix-stat-arm, r=alexcrichton
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-06 09:00:34 +05:30
Manish Goregaokar
e80fc10af1 Rollup merge of #22862 - vhbit:broken-open, r=alexcrichton
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-06 08:58:02 +05:30
awlnx
951ef9d1f1 fix for new attributes failing. issue #22964 2015-03-05 11:53:51 -05:00
Valerii Hiora
3f4181a6e5 iOS: open file on aarch64 breaks permissions
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-05 12:41:59 +02:00
Manish Goregaokar
145b83e633 Rollup merge of #22994 - eddyb:unsuffix-ints-good, r=alexcrichton
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-05 12:38:33 +05:30
Eduard Burtescu
e64670888a Remove integer suffixes where the types in compiled code are identical. 2015-03-05 12:38:33 +05:30
Michał Krasnoborski
29938fff38 Fix struct stat on arm linux 2015-03-04 22:24:38 +01:00
Alex Crichton
9893b44ad9 libc: Move features behind a cfg_attr gate
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-03 13:05:55 -08:00
Sébastien Marie
a71da374df unbreak dragonfly build after nacl integration
this is the same problem as openbsd (#22792).

without the patch, liblibc don't build.
2015-03-01 16:08:24 +01:00
Sébastien Marie
91e00f3bfa unbreak openbsd after nacl intergration 2015-02-25 05:07:40 +01:00
Richard Diamond
949d1fffca Add cfgs to liblibc for NaCl targets. 2015-02-21 16:52:58 -06:00
bors
2b01a37ec3 Auto merge of #21959 - dhuseby:bitrig-support, r=brson
This patch adds the necessary pieces to support rust on Bitrig https://bitrig.org
2015-02-21 09:20:48 +00:00
Niko Matsakis
2b5720a15f Remove i, is, u, or us suffixes that are not necessary. 2015-02-18 09:09:12 -05:00
Huon Wilson
dfc5c0f1e8 Manual merge of #22475 - alexcrichton:rollup, r=alexcrichton
One windows bot failed spuriously.
2015-02-18 23:50:21 +11:00
Alex Crichton
47f91a9484 Register new snapshots 2015-02-17 22:04:31 -08:00
bors
6c065fc8cb Auto merge of #21774 - ejjeong:enable-test-for-android, r=alexcrichton
- 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-17 19:35:12 +00:00
Valerii Hiora
f89622f84d Updated darwin types 2015-02-12 18:05:51 +02:00
Alex Crichton
fb1f4d11ec Even more test fixes 2015-02-11 16:38:02 -08:00
Dave Huseby
551304015b fixing the macos defines...i picked the wrong one during a merge earlier. 2015-02-11 14:49:15 -08:00
Dave Huseby
4aa499a231 removing unusused timespec import 2015-02-11 14:49:14 -08:00
Dave Huseby
cea7aead33 oops, fixing incorrect _SC_ATEXIT_MAX value 2015-02-11 14:49:12 -08:00
Dave Huseby
47ad1cdf56 fixing PR review comments 2015-02-11 14:49:11 -08:00
Dave Huseby
cd8f31759f bitrig integration 2015-02-11 14:49:06 -08:00
Alex Crichton
3e10785e21 Test fixes and rebase conflicts 2015-02-10 11:51:38 -08:00
Eunji Jeong
d1e9a76326 Fix aarch64 test issues (same level to arm32) 2015-02-10 15:48:07 +09:00
we
6a2bad3257 int/uint => isize/usize in liblibc/liballoc/libarena 2015-02-09 10:00:46 +03:00
Keegan McAllister
d788588dce Feature-gate #![no_std]
Fixes #21833.

[breaking-change]
2015-02-07 10:49:58 -08:00
Keegan McAllister
67350bc868 Don't use std:: paths in syntax extensions when compiling a #![no_std] crate
Fixes #16803.
Fixes #14342.
Fixes half of #21827 -- slice syntax is still broken.
2015-02-07 10:49:57 -08:00
Steven Fackler
85a85c2070 Switch missing_copy_implementations to default-allow
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-03 23:31:07 -08:00
bors
336c8d2e9c Auto merge of #21613 - alfie:suffix-small, r=alexcrichton 2015-02-03 07:59:04 +00:00
Alfie John
8f4844d58b More deprecating of i/u suffixes 2015-02-02 23:37:01 +00:00
Sébastien Marie
3430578460 openbsd: remove unused openbsd code
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-01 14:41:41 +01:00
Sébastien Marie
3096784a3b openbsd: break lines too long 2015-02-01 14:41:39 +01:00
Sébastien Marie
fcb30a0b67 openbsd support 2015-02-01 14:41:38 +01:00
Alex Crichton
3a2530d611 Test fixes and rebase conflicts
Also some tidying up of a bunch of crate attributes
2015-01-30 14:53:34 -08:00
Manish Goregaokar
0d1a4ac269 Rollup merge of #21640 - retep998:rmdir, r=alexcrichton
`_wrmdir` is literally just a wrapper around `RemoveDirectoryW`, so let's just use `RemoveDirectoryW`.
r? @alexcrichton
2015-01-29 03:04:10 +05:30