Commit Graph

1893 Commits

Author SHA1 Message Date
Marco A L Barbosa
0ee3935ed3 Add x86_64-unknown-linux-gnux32 docker image 2017-10-27 11:06:14 -02:00
Marco A L Barbosa
c9aba5f9ad Use ctest from git to allow testing linux x32 2017-10-27 11:01:20 -02:00
Marco A L Barbosa
9a0d37f517 Add sparc64-unknown-linux-gnu to CI (with disabled tests) 2017-10-27 09:09:45 -02:00
Marco A L Barbosa
56b3403fa5 Add mips64el to CI 2017-10-27 08:21:40 -02:00
Marco A L Barbosa
19530c0d97 More fixes for x86_64-unknown-linux-gnux32 2017-10-27 07:16:08 -02:00
Marco A L Barbosa
31309536e9 Add powerpc64le to CI 2017-10-24 19:04:02 -02:00
bors
42b24bf704 Auto merge of #787 - vojtechkral:master, r=alexcrichton
Fix kqueue filter consts type on NetBSD [WAS: Provide EV_SET]

Using BSD kqueue's `kevent` structure is tedious, because some BSD variants define the structure slightly differently. This forces user's code to differentiate between BSD variants and initialize `kevent` accordingly, which is annoying and error-prone.

For an example, refer to [MIO](https://github.com/carllerche/mio/blob/master/src/sys/unix/kqueue.rs#L38).

This is an attempt to fix it - provide a ctor function with the same signature across BSD variants.

Is an `impl` piece for a C structure allowed in libc?

**edit:** I noticed the `kevent` function has a similar problem, maybe I should include a fix for that too...
**edit:** ^ Done
2017-10-24 13:35:10 +00:00
Vojtech Kral
a0e683ef94 Fix kqueue filter consts type on NetBSD 2017-10-24 00:08:22 +02:00
bors
0a528191c8 Auto merge of #815 - ndusart:sys, r=alexcrichton
fix ABI breakage in syscall constants

Fix other platforms impacted by 9029cfb9eb
2017-10-20 14:52:36 +00:00
Nicolas Dusart
b7b316bae8 fix ABI breakage in syscall constants 2017-10-20 10:37:57 +02:00
bors
7e33065ce4 Auto merge of #812 - malbarbo:x32, r=alexcrichton
Initial fixes for linux x32

Tested with a local build of rustc. The main test can be compiled but fails to execute (receives SIGTRAP, which I think in this case indicates memory violation, I will open an issue in the rustc repo).

This PR is important because it fixes the definition of `c_long` and `c_ulong`. Without these fixes, rustc crash with the error:

```
Cannot emit physreg copy instruction
UNREACHABLE executed at /checkout/src/llvm/lib/Target/X86/X86InstrInfo.cpp:5778!
```

Related https://github.com/rust-lang/rust/issues/37976
2017-10-19 16:40:53 +00:00
bors
b06739dda9 Auto merge of #813 - ndusart:syscall-android, r=alexcrichton
SYS_* constants are of type long in Android

The SYS_* constants should be `c_long` as `syscall` expect a `c_long` as first argument and in Android headers, there is no sign that these constants should be `unsigned long`.

So the compilation targeting ARM Android fails for dependent crates using `syscall`.
2017-10-19 16:21:29 +00:00
bors
07088d2a0e Auto merge of #810 - oherrala:pthread_cancel, r=alexcrichton
Introduce pthread_cancel() for terminating threads

pthread_cancel() is safer way to terminate thread than pthread_kill().

This function can be found from ISO/IEC 9945-1:1996 (“POSIX.1”) and first introduced into Single Unix Specification version 2 on 1997.
2017-10-19 15:06:41 +00:00
bors
2172bb4bab Auto merge of #802 - Mic92:setfsuid, r=alexcrichton
add setfsgid/setfsuid on Linux
2017-10-19 14:37:21 +00:00
bors
9a9f71e73e Auto merge of #711 - Susurrus:termios2, r=alexcrichton
Add BOTHER & termios2 to Android & Linux

This should be the same for both the struct and the constant across all Linux/Android platforms, but we'll see!
2017-10-19 14:17:57 +00:00
Joerg Thalheim
3406fe94fa provide setfsgid/setfsuid also on android 2017-10-19 11:00:43 +01:00
Nicolas Dusart
4b240a6b86 SYS_* constants are of type long in Android 2017-10-19 11:11:21 +02:00
Ossi Herrala
f024fe7dd3 Trying to fix for i686-apple
Error was "bad pthread_cancel function pointer: rust: 8362822 (0x7f9b46) != c 8358779 (0x7f8b7b)"
2017-10-19 11:00:37 +03:00
Bryant Mairs
6d55c2496d Add termios2 for Android & Linux
Note that termios2 doesn't exist on powerpc(64), termios
is used instead.
2017-10-18 21:14:43 -07:00
Bryant Mairs
12cfa1ef46 Add BOTHER to Android & Linux 2017-10-18 20:57:34 -07:00
Marco A L Barbosa
a5bd4b5668 Fix style 2017-10-18 21:20:18 -02:00
Marco A L Barbosa
1ff3817887 Move down c_long and c_ulong of linux/other/b64 to accommodate x32 2017-10-18 21:08:51 -02:00
Marco A L Barbosa
1994be3183 Linux x32 does not have some SYS_ constants 2017-10-18 21:08:51 -02:00
Marco A L Barbosa
343b7c15be Linux x32 does not support sysctl 2017-10-18 21:08:51 -02:00
Marco A L Barbosa
c3408c10e3 Fix utmpx.ut_session for linux x32 2017-10-18 21:07:36 -02:00
Marco A L Barbosa
bbc2cfa096 Fix timespec, stat, stat64 for linux x32 2017-10-18 21:07:36 -02:00
Marco A L Barbosa
477425435a Fix mq_attr for linux x32 2017-10-18 21:07:36 -02:00
Marco A L Barbosa
968bce4ed4 Fix c_long, c_ulong and sysinfo for linux x32 2017-10-18 21:07:36 -02:00
bors
2ca5bc5275 Auto merge of #811 - alexcrichton:syscalls, r=alexcrichton
Add more Linux-based syscall tables

* Add syscall tables to most remaining arches in `src/unix/notbsd`
* Add aarch64/arm musl to CI
* Update dependencies
2017-10-18 22:25:57 +00:00
Alex Crichton
9029cfb9eb Add more Linux-based syscall tables
* Add syscall tables to most remaining arches in `src/unix/notbsd`
* Add aarch64/arm musl to CI
* Update dependencies
2017-10-18 15:17:00 -07:00
Ossi Herrala
fcc8237add Introduce pthread_cancel() for terminating threads
pthread_cancel() is safer way to terminate thread than pthread_kill().

This function can be found from ISO/IEC 9945-1:1996 (“POSIX.1”) and
first introduced into Single Unix Specification version 2 on 1997.
2017-10-18 15:53:10 +03:00
bors
84da91cebe Auto merge of #809 - djg:freebsd_sol_local, r=alexcrichton
Local peer credential support for FreeBSD.

FreeBSD uses SOL_SOCKET/LOCAL_PEERCRED instead of SOL_SOCKET/SO_PEERCRED parameters to getsocktopt to retrieve the credentials of a socket's peer.

(Documented in man 4 unix)
2017-10-18 00:24:02 +00:00
Dan Glastonbury
ebb59a27eb freebsd: Add LOCAL_* for local domain sockets. 2017-10-18 09:51:10 +10:00
bors
5355286c58 Auto merge of #808 - rgdoliveira:ppc64-musl, r=alexcrichton
Add missing powerpc64 in musl/mod.rs

powerpc64 was missing in musl/mod.rs and making build fail
as it was not able to find types, like c_char.
2017-10-17 20:34:24 +00:00
Roberto Oliveira
65fc01a06f Add missing powerpc64 in musl/mod.rs
powerpc64 was missing in musl/mod.rs and making build fail
as it was not able to find types, like c_char.
2017-10-17 16:02:25 -02:00
bors
f001b8a43c Auto merge of #807 - djg:macos_sol_local, r=alexcrichton
Local peer credential support for Darwin.

Darwin uses SOL_LOCAL/LOCAL_PEERCRED instead of SOL_SOCKET/SO_PEERCRED parameters to getsocktopt to retrieve the credentials of a socket's peer.

(Documented in man 4 unix)
2017-10-17 14:16:51 +00:00
bors
b1ec886ac8 Auto merge of #806 - Mic92:renameat2, r=alexcrichton
define SYS_renameat2 + flags on linux

Motivation: there is no glibc wrapper for this syscall
2017-10-16 19:08:32 +00:00
Joerg Thalheim
8c24117c63 define SYS_renameat2 + flags on linux
Motivation: there is no glibc wrapper for this syscall
2017-10-16 19:20:35 +01:00
Dan Glastonbury
49c97ba49c apple: Add SOL_LOCAL and LOCAL_* for local domain sockets. 2017-10-16 14:47:58 +10:00
bors
b09d655ca5 Auto merge of #805 - andrewtj:atj-getprotobynumber, r=alexcrichton
Add getprotobynumber
2017-10-14 15:40:51 +00:00
bors
49ffdf6d65 Auto merge of #804 - treiff:update-appveyor-badge, r=alexcrichton
Add `project_name` attribute to appveyor badge.

There was a recent [issue](https://github.com/rust-lang/crates.io/issues/587) in crates.io where appveyor is looking for a dash separated URL for the link to appveyors site:
```
https://ci.appveyor.com/project/rust-lang-libs/libc
```
 and the actual repo name for the image badge url:
```
https://ci.appveyor.com/api/projects/status/github/rust-lang/libc?svg=true
```
We recently added the ability to specify a `project_name` that fixes this issue.  You'll notice that currently on https://crates.io/crates/libc the appveyor badge on the right sidebar show `build unknown`, this PR will address that issue.

Please let me know if you have any questions.
2017-10-14 14:46:44 +00:00
Andrew Tunnell-Jones
611066a535 Add getprotobynumber 2017-10-13 23:06:02 +00:00
Trevor Reiff
95fe3cca5b Add project_name attribute to appveyor badge. 2017-10-13 15:38:43 -04:00
bors
220fa2800e Auto merge of #801 - azdlowry:master, r=alexcrichton
Add `ucred` to musl
2017-10-13 01:41:12 +00:00
Andy Lowry
190135c862 Remove excess whitespace 2017-10-12 16:45:17 +01:00
Andy Lowry
df25142e39 Add ucred to musl 2017-10-12 16:31:03 +01:00
bors
30a742514c Auto merge of #798 - vojtechkral:glibc2.26, r=alexcrichton
Fix glibc 2.26 incompatibilities #788

Hopefully the `xlocale.h` → `locale.h` change won't break something else somewhere...
2017-10-12 14:25:26 +00:00
bors
e8bc1cf72e Auto merge of #800 - alexcrichton:android-ucred, r=alexcrichton
Add `ucred` on Android
2017-10-12 14:06:48 +00:00
Alex Crichton
2bdbddcaae Add ucred on Android 2017-10-11 09:22:46 -07:00
Vojtech Kral
4ed612c124 Fix glibc 2.26 incompatibilities #788 2017-10-09 20:38:56 +02:00