3108 Commits

Author SHA1 Message Date
Douman
0c2e7831ce Expose signal value of siginfo_t
Exposes value for most unix like platforms
2019-07-09 15:15:17 +02:00
bors
1375b1143c Auto merge of #1430 - gnzlbg:bump_v, r=gnzlbg
Bump patch version
2019-07-08 07:28:17 +00:00
gnzlbg
84c984ddb0 Bump patch version 2019-07-08 09:27:45 +02:00
bors
789c38144e Auto merge of #1423 - Susurrus:issue_665, r=gnzlbg
Remove AF_MAX, PF_MAX, NET_MAXID constants

These constants have already been deprecated for a few releases with
a deprecation notice, so they can finally be removed.

Closes rust-lang/libc#665
2019-07-06 16:47:40 +00:00
bors
2b351c2db2 Auto merge of #1429 - gnzlbg:appveyor_reduce, r=gnzlbg
Reduce appveyor churn

This should reduce the Appveyorn churn for other projects a bit more.

Please let me know if there is anything else that can be done. Maybe the infra team could discuss whether to document some general guidelines for rust-lang and rust-lang-nursery projects, and write them down somewhere. I would be willing to help.

cc @RalfJung @Mark-Simulacrum
2019-07-06 13:22:44 +00:00
gnzlbg
3f8cff745e Reduce appveyor churn 2019-07-06 15:21:16 +02:00
bors
299a73f687 Auto merge of #1419 - gnzlbg:ctest_fix, r=gnzlbg
Update ctest version

The latest ctest version enabled the ABI roundtrip test by default, in which we initialize all types in Rust by default to some random bit-pattern, pass them to C, verify, modify, pass back to Rust, and verify.

This catches issues in the call ABI / calling convention.

This PR will silence those here for now.
2019-07-05 22:55:16 +00:00
gnzlbg
9f9286331f Fix appveyor try 3 2019-07-05 18:55:42 +02:00
gnzlbg
fd7a1e9f83 Fix appveyor try 2 2019-07-05 18:44:30 +02:00
gnzlbg
b2dcd5c76a Fix x86_64 musl 2019-07-05 18:24:16 +02:00
gnzlbg
c3ddd564c9 Allow s390x to fail - segfault 2019-07-05 18:13:03 +02:00
gnzlbg
9d58c0c14f Allow PPC to fail - segfault 2019-07-05 18:13:03 +02:00
gnzlbg
7fa6534858 Fix FreeBSD and Appveyor 2019-07-05 18:13:03 +02:00
gnzlbg
ab6e4a3f18 Allow wasi to fail 2019-07-05 18:13:03 +02:00
gnzlbg
3fd4dd7ea3 Silence roundtrip errors 2019-07-05 18:13:03 +02:00
gnzlbg
b81a234913 Silence roundtrip in linux 2019-07-05 18:13:03 +02:00
Bryant Mairs
215f095601 Remove AF_MAX, PF_MAX, NET_MAXID constants
These constants have already been deprecated for a few releases with
a deprecation notice, so they can finally be removed.

Closes rust-lang/libc#665
2019-07-05 07:39:00 -07:00
gnzlbg
5e3866ad56 Update ctest version 2019-07-03 13:00:03 +02:00
bors
54ea12dff4 Auto merge of #1418 - fintelia:patch-2, r=gnzlbg
Fix link in README.md

Same as #1417, but actually against the right branch this time.
2019-06-28 19:58:46 +00:00
Jonathan Behrens
cc33108bb9
Fix link in README.md 2019-06-28 15:21:44 -04:00
bors
00fe094a9d Auto merge of #1407 - tmfink:wasi-schar, r=gnzlbg
wasi: add c_schar definition

This fixes an issue when building https://github.com/capstone-rust/capstone-rs/ for WASI.

Otherwise, I get:
~~~
error[E0412]: cannot find type `c_schar` in module `libc`
 --> /home/user/capstone-rs/target/wasm32-wasi/debug/build/capstone-sys-1019f1f8759b0d05/out/capstone.rs:4:27
  |
4 | pub type __int8_t = libc::c_schar;
  |                           ^^^^^^^ help: a type alias with a similar name exists: `c_char`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0412`.
error: Could not compile `capstone-sys`.
~~~

The file with the error is generated with bindgen:

a74126cd88/capstone-sys/pre_generated/capstone.rs (L3-L5)
2019-06-28 13:23:15 +00:00
bors
8773f33c95 Auto merge of #1411 - acfoltzer:ucontext-compat, r=gnzlbg
Remove new field from ucontext_t for compatibility with earlier glibc versions

Per discussion in #1410 with @gnzlbg, this is necessary to avoid struct size mismatches between Rust and C on systems with glibc < 2.28.
2019-06-27 18:46:59 +00:00
Adam C. Foltzer
f6e48fc77c
fix line length 2019-06-27 11:42:22 -07:00
Adam C. Foltzer
e94fffc309
replace deprecated string functions in style script 2019-06-27 10:57:07 -07:00
Adam C. Foltzer
339fe22653
add fixmes for the ucontext_t shadow stack field 2019-06-27 09:32:52 -07:00
bors
4f4e81a030 Auto merge of #1409 - jbaublitz:nl-const-rtm-pr, r=gnzlbg
Add RTM_* constants to linux/mod.rs for rtnetlink

There is one last set of constants I'm looking to get added to libc for rtnetlink support in my netlink library. I'm going to follow this up with a release PR once this PR is merged.
2019-06-27 14:13:30 +00:00
Adam C. Foltzer
886bb3f2f8
filter out the struct test rather than removing the header 2019-06-26 16:56:53 -07:00
Adam C. Foltzer
dba4138305
remove newer __ssp field from ucontext_t for earlier glib compat
Per discussion in #1410, this is necessary to avoid struct size mismatches between Rust and C on
systems with glibc < 2.28.
2019-06-26 15:52:56 -07:00
John Baublitz
7705d074f1 Move constants to gnu/mod.rs that are not musl-compatible 2019-06-26 16:13:45 -04:00
John Baublitz
d61b55d65f Add RTM_* constants to linux/mod.rs for rtnetlink 2019-06-26 15:23:56 -04:00
Travis Finkenauer
cd5235f6e2 wasi: add c_schar definition 2019-06-25 21:55:42 -04:00
bors
40c73a6eed Auto merge of #1404 - robertdfrench:solarish-doors, r=gnzlbg
Support calls to the SunOS Doors API

Doors are a lightweight IPC mechanism available in libc on Solaris & illumos. They are like unix domain sockets, but faster and more pleasant to work with.

* Brief introduction: ["Doors" in SolarisTM: Lightweight RPC using File Descriptors](http://www.kohala.com/start/papers.others/doors.html)
* Relevant manual pages: [DOOR_CALL(3C)](https://illumos.org/man/3C/door_call), [DOOR_CREATE(3C)](https://illumos.org/man/3C/door_create)
* Tutorial I wrote: ["Revolving Doors": A tutorial on the Illumos Doors API](https://github.com/robertdfrench/revolving-door)

Marking this as a draft until I have included the full api.
2019-06-25 17:17:15 +00:00
bors
99854f378a Auto merge of #1350 - dbrgn:ttyname_r, r=gnzlbg
Add ttyname_r

I hope this is correct. Parameter types taken from `man ttyname`.

```c
int ttyname_r(int fd, char *buf, size_t buflen);
```
2019-06-24 05:07:16 +00:00
Danilo Bargen
ccdc5ebc2d fixup! Add ttyname_r
Add cfg_attr
2019-06-23 22:58:06 +02:00
Robert D. French
ba459b72a4 Obey 80 char line width 2019-06-23 00:51:36 -04:00
Robert D. French
27f9da96de Support calls to the SunOS Doors API 2019-06-22 23:37:26 -04:00
bors
a73d6bc00d Auto merge of #1402 - sikmir:haiku-add-ioctls, r=gnzlbg
haiku: add missing ioctl identifiers to control the TTY

Ref. [termios.h](37761761a0/headers/posix/termios.h (L165-L189))
2019-06-20 17:12:40 +00:00
Nikolay Korotkiy
60254f1151
haiku: add missing ioctl identifiers to control the TTY 2019-06-20 19:37:20 +03:00
bors
5bbba03eb1 Auto merge of #1399 - josephlr:getrandom, r=gnzlbg
Add getrandom() bindings on Linux

Closes #659
2019-06-17 09:30:21 +00:00
Joe Richey
14b22c15d0 Fix style lints 2019-06-14 03:41:24 -07:00
Joe Richey
457c02d7b5 Add getrandom() on non-mips musl 2019-06-14 02:21:17 -07:00
bors
0b02c4060a Auto merge of #1398 - josephlr:fuchsia, r=gnzlbg
Remove Linux constants from Fushia

PR #849 just moved all of the Linux structures into `src/fuchsia`.
While this is good for the most part, we really don't want the `SYS_*`
constants exported on Fushia, as these are not Fuchsia's syscalls.

This also removes Linux-specific `GRND_*` constants.
2019-06-14 08:22:45 +00:00
Joe Richey
3a7da471b8 Older musl doesn't have getrandom() 2019-06-13 23:49:05 -07:00
Joe Richey
45083afd9c Android doesn't have getrandom() 2019-06-13 20:38:42 -07:00
Joe Richey
851e9a1ce1 Use *mut c_void for buffer pointer. 2019-06-13 18:09:17 -07:00
Joe Richey
8bc89810c2 Add getrandom() bindings on linux and android
Closes #659
2019-06-13 15:02:07 -07:00
Joe Richey
3b27cb3a13 Remove Linux constants from Fushia
PR #849 just moved all of the Linux structures into `src/fuchsia`.
While this is good for the most part, we really don't want the `SYS_*`
constants exported on Fushia, as these are not Fuchsia's syscalls.

This also removes Linux-specific `GRND_*` constants.
2019-06-13 14:59:27 -07:00
bors
e0ff1e68b9 Auto merge of #1387 - tormol:fionclex, r=gnzlbg
Add FIONCLEX and other FIO* constants for Linux, DragonFly and OpenBSD

[OpenBSD header](https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/sys/filio.h?annotate=1.5) | [DragonFly header](http://gitweb.dragonflybsd.org/dragonfly.git/blame/refs/heads/master:/sys/sys/filio.h) | [Linux search](https://github.com/torvalds/linux/search?q=FIONCLEX+FIOQSIZE&unscoped_q=FIONCLEX+FIOQSIZE&type=Code)
For Linux I've used [godbolt compiler explorer](https://godbolt.org/z/h-C7qM) to get final values where possible.

Wile this crate has FIOCLEX for Fuchsia, Emscripten and Redox, I've not added FIONCLEX for them because those targets appear to support neither.
I started adding FIOASYNC, FIOSETOWN and FIOGETOWN for all the Linux architectures, but gave up when I realized FIOASYNC is kind of deprecated and the other two useless without more symbols. If anybody is interested I have a [branch with how far I got](https://github.com/tormol/rust-libc/tree/sigio).
2019-06-11 18:05:33 +00:00
bors
11c762c535 Auto merge of #1394 - Susurrus:sigevent_extra_traits, r=gnzlbg
Switch to manual trait impls for sigevent

`sigevent` on most platforms have padding or unused fields. Rather
than display those in the `Debug` impl by deriving it, manually implement
all `extra_traits` instead ignoring those fields.

I do worry that my `PartialEq` implementations for this for some platforms (like Linux) is not correct due to ignoring bytes that shouldn't be ignored because these structs don't have a proper union set up.

cc @asomers
Part of nix-rust/nix#1035
2019-06-11 07:36:31 +00:00
Bryant Mairs
7c265919ec Switch to manual trait impls for sigevent
sigevent structs on most platforms have padding or unused fields. Rather
than display those in the Debug impl by deriving it, manually implement
all extra_traits instead ignoring those fields.
2019-06-09 19:28:32 -07:00