- Feb 03, 2017
-
-
Alex Crichton authored
-
- Feb 02, 2017
-
-
bors authored
Add IPPROTO_ICMP and IPPROTO_ICMPV6 system constants This adds the protocol value for `ICMP` in both IPv4 and IPv6 variants. ICMP protocol constant for IPv4 defined as `1` per [RFC 792](https://tools.ietf.org/html/rfc792) ICMP protocol constant for IPv6 defined as `58` per [RFC 2463](https://tools.ietf.org/html/rfc2463#section-1) #### Reference [bsd/apple: netinet/in.h](https://opensource.apple.com/source/xnu/xnu-1699.24.8/bsd/netinet/in.h) [bsd/freebsdlike/freebsd: netinet/in.h](https://github.com/freebsd/freebsd/blob/master/sys/netinet/in.h#L42) [bsd/freebsdlike/dragonfly: netinet/in.h](https://github.com/DragonFlyBSD/DragonFlyBSD/blob/1f249c981c4e89e7cde1836a75b61cac36dc7ac5/sys/netinet/in.h#L64) [bsd/netbsdlike: netinet/in.h](https://github.com/IIJ-NetBSD/netbsd-src/blob/af5d253140491f2d1816c59ecb8a4d8a8d927688/sys/netinet/in.h#L77) [unix/haiku: netinet/in.h](https://github.com/haiku/haiku/blob/b65adbdfbc322bb7d86d74049389c688e9962f15/headers/posix/netinet/in.h#L54) [unix/notbsd/linux: in.h](https://github.com/torvalds/linux/blob/8fa3b6f9392bf6d90cb7b908e07bd90166639f0a/include/uapi/linux/in.h#L31) - [unix/notbsd/linux: in6.h](https://github.com/torvalds/linux/blob/8fa3b6f9392bf6d90cb7b908e07bd90166639f0a/include/uapi/linux/in6.h#L134)
-
Tyler Julian authored
-
- Feb 01, 2017
-
-
bors authored
Adding missing WIFCONTINUED function on FreeBSD systems This adds the WIFCONTINUED function to any FreeBSD-like system. Addresses #505
-
Radu Popescu authored
-
- Jan 30, 2017
-
-
bors authored
Add O_TMPFILE constant
-
- Jan 29, 2017
-
-
Mathias Svensson authored
-
- Jan 25, 2017
-
-
bors authored
add pipe2 to non-OSX BSD's https://github.com/rust-lang/libc/issues/500
-
- Jan 18, 2017
-
-
bors authored
Run ios tests This WIP PR runs the tests on the iOS simulator. I've tested it locally using macOS Sierra and XCode 8.2.1. I get this output: RUNNING ALL TESTS PASSED 6756 tests The python script probably needs to be customized for the specific failure output from this test runner (update: newest commit should have this).
-
Alex Crichton authored
-
Kevin Brothaler authored
-
Kevin Brothaler authored
It’s not clear if these values are used or needed by the simulator. The doc only seems to mention arm values for the actual device: https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW3
-
Kevin Brothaler authored
-
- Jan 17, 2017
-
-
Kevin Brothaler authored
-
Kevin Brothaler authored
-
Kevin Brothaler authored
Pass the tests only if we find an expected positive output (rather than checking for negative output to fail the tests).
-
Kevin Brothaler authored
-
Kevin Brothaler authored
-
bors authored
Bump to 0.2.20
-
Alex Crichton authored
-
bors authored
Added some DragonFly-only ttycom.h constants. I overlooked some DragonFly-only constants in the last PR.
-
bors authored
unix: add fchdir(2) Add missing [fchdir(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html) function - chdir to an open file descriptor. Fixes https://github.com/rust-lang/libc/issues/495
-
bors authored
Fix for removed OS X constants. https://developer.apple.com/library/content/releasenotes/General/APIDiffsMacOS10_12/Swift/Darwin.html Fixes https://github.com/rust-lang/libc/issues/480
-
- Jan 16, 2017
-
- Jan 15, 2017
-
-
Luca Bruno authored
-
- Jan 14, 2017
-
-
Johannes Lundberg authored
-
johalun authored
-
bors authored
Added defines from ttycom.h for dragonfly and freebsd. I wasn't sure about the convention but looking at other files it seems that whatever is over 0x80000000 is c_ulong so I went with that.
-
- Jan 13, 2017
-
-
johalun authored
-
- Jan 10, 2017
-
-
bors authored
Add waitid and related constants and types. [`waitid`](http://pubs.opengroup.org/onlinepubs/9699919799/functions/waitid.html) is a variation on `waitpid` with a marginally more convenient way of reporting the status, and a couple of handy additional features, such as the ability to peek at an exit status without consuming it. It's in POSIX.1-2008 and should be available on all supported Unixes. Along with it come the type `idtype_t` and the constants `WEXITED`, `WSTOPPED`, `WCONTINUED`, and `WNOWAIT`. The constants were already defined for unix/notbsd platforms. The patch is currently incomplete: I'm pushing it to get CI to test platforms I don't have. Todo list is * [x] Add a definition of `siginfo_t` to all platforms that don't have it. * [x] Verify that the new constants are consistent for all \*BSD platforms. * [x] Verify that `idtype_t` is consistent across the board. * [x] Add `link_name` annotations for `waitid` if/as necessary.
-
Zack Weinberg authored
-
Zack Weinberg authored
-
bors authored
Add MSG_PEEK socket flag #### MSG_PEEK This PR exposes a cross-platform `MSG_PEEK` flag that a user may pass into the `flags` parameter for `recv()`, `recvfrom()`, or `recvmsg()` calls. ``` MSG_PEEK This flag causes the receive operation to return data from the beginning of the receive queue without removing that data from the queue. Thus, a subsequent receive call will return the same data. ``` In short, users may call `recv()` to "peek" at new data (or a message) without consuming it. Recall that in the normal case, calls to `recv()` consume the data from the socket's receive queue, making it unavailable to future calls. #### Motivation This change enables `libc` users, such as the rust standard library, to potentially add peeking functionality to TCP and UDP implementations, like `TcpStream` and `UdpSocket`, without being concerned about the highly platform-dependent nature of the flags. (In this case, the flag's value `0x2` is very consistent, but that is not the case for many of the `MSG_*` flags. It makes sense to keep these differences confined to `libc`) #### Reference [bsd/apple: socket.h](https://opensource.apple.com/source/xnu/xnu-2050.7.9/bsd/sys/socket.h) [bsd/freebsdlike/freebsd: socket.h](https://github.com/freebsd/freebsd/blob/master/sys/sys/socket.h#L418) [bsd/freebsdlike/dragonfly: socket.h](https://github.com/DragonFlyBSD/DragonFlyBSD/blob/1f249c981c4e89e7cde1836a75b61cac36dc7ac5/sys/sys/socket.h#L367) [bsd/netbsdlike: socket.h](https://github.com/IIJ-NetBSD/netbsd-src/blob/af5d253140491f2d1816c59ecb8a4d8a8d927688/sys/sys/socket.h#L517) [unix/haiku: socket.h](https://github.com/haiku/haiku/blob/b65adbdfbc322bb7d86d74049389c688e9962f15/headers/posix/sys/socket.h#L114) [unix/notbsd/linux: socket.h](https://github.com/torvalds/linux/blob/5924bbecd0267d87c24110cbe2041b5075173a25/include/linux/socket.h#L264) [unix/notbsd/android: socket.h](https://android.googlesource.com/platform/development/+/73a5a3baaa5089f1ab2049e5934fa5d8a3f3e76a/ndk/platforms/android-20/include/sys/socket.h#229)
-
Tyler Julian authored
-
- Jan 08, 2017
-
-
Zack Weinberg authored
-
Zack Weinberg authored
It turns out that *only* FreeBSD and NetBSD proper have waitid, and that Solaris' additional W* constants are totally different from everyone else's, which tips me over from 'find some way to shoehorn this into the top-level unix/mod.rs' to 'put it in the submodules, live with the code duplication'.
-
- Jan 07, 2017
-
-
bors authored
Remove kind='static' from Redox linkage Our cross compiler links binaries statically, and the rustc target has dynamic linking disabled - adding kind = "static" is not necessary.
-
- Jan 06, 2017
-
-
Zack Weinberg authored
* OpenBSD doesn't have idtype_t or the P_* constants either * FreeBSD has different values for the P_* constants * Android gives idtype_t a different signedness * Disable waitid on NetBSD as it causes a link failure - I think this may be a problem with the test environment
-
bors authored
Add getpeereid function This is a wrapper around getsockopt() for getting the uid/gid of a remote Unix domain socket peer. It was added in FreeBSD 4.6 and present in all modern BSDs I checked (including Mac OS X).
-