Age | Commit message (Collapse) | Author |
|
Reads a little bit easier
|
|
|
|
Looks like a copy/paste error might have caused this
|
|
|
|
Makes it more clear what's being cloned
|
|
|
|
|
|
|
|
|
|
|
|
It's unclear why these were static in the first place.
|
|
As of Rust 1.17 'static lifetimes are implied when
declaring consts.
|
|
|
|
|
|
A little easier to read
|
|
Several tests make the assumption that all data is written, which
is not guaranteed with write(), so use write_all() instead.
|
|
648: Fix `struct msghdr` types on non-Linux platforms. r=Susurrus a=kinetiknz
Type `struct msghdr` and `struct cmsghdr` types defined in `sys/socket/ffi.rs` match the Linux headers, but differ from the standard header (and other OSes): http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_socket.h.html
This PR fixes a memory corruption/unsafety issue on non-Linux machines when using `recvmsg` with certain parameters.
While fixing this, I wondered what the reason was for nix not using libc's definition of these structures.
Closes #748.
|
|
|
|
799: Fix nix on Dragonfly r=Susurrus a=mneumann
This commit replaces pull request https://github.com/nix-rust/nix/pull/684. It fixes building `nix` on DragonFly. All tests pass. This requires most recent libc to build: https://github.com/rust-lang/libc/pull/851.
|
|
* DragonFly does not have a O_DSYNC flag
* Fix type_of_cmsg_data on DragonFly
* No fexecve() on DragonFly
* Do not run aio test cases on DragonFly
* Keep target lists in alphabetical order
* Unscrable #[cfg] directives and use cfg_if! macro instead
* Fix errno on DragonFly
Below follows an explanation why we have to use a C extension
to get errno working on DragonFly:
DragonFly uses a thread-local errno variable, but #[thread_local] is
feature-gated and not available in stable Rust as of this writing (Rust
1.21.0). We have to use a C extension (src/errno_dragonfly.c) to access
it.
Tracking issue for `thread_local` stabilization:
https://github.com/rust-lang/rust/issues/29594
Once this becomes stable, we can remove build.rs, src/errno_dragonfly.c,
remove the build-dependency from Cargo.toml, and use:
extern {
#[thread_local]
static errno: c_int;
}
Now all targets will use the build.rs script, but only on DragonFly this
will do something. Also, there are no additional dependencies for
targets other than DragonFly (no gcc dep).
|
|
814: Misc cleanup r=Susurrus a=Susurrus
Add more traits to the various datatypes in `nix`. Also try to utilize more `libc` types where appropriate.
This is still WIP because:
* Looking for feedback on ba2d85bc. Does it make sense for bitflags structs to have `Ord` & `PartialOrd` derived for them?
* Need to implement a newtype wrapper around `libc::linger` with both a `new()` constructor and getters. Additionally this needs manual implementations of `Eq`, `PartialEq`, `Debug` (I've been skipping manually implementing `Hash` for now.
* In 2b3fb11a46 I need to implement newtype wrappers around `ip_mreq` and `ipv6_mreq` that have `new()` constructors and field getters. Additionally they need manual implementations of `Eq`, `PartialEq`, `Debug` (I've been skipping manually implementing `Hash` for now. This commit also needs a CHANGELOG entry.
* ed79cfbc needs a CHANGELOG entry because its variants names have changed with the switch to using `libc_bitflags!`.
|
|
This hasn't been available for a while now. And was not updated
for even longer before that. Let's not mislead our users any
longer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
806: Cleanup all doc warnings r=asomers a=Susurrus
With the impending switch to Pulldown as the default doc generator, warnings
have been enabled for incompatible syntax. This fixes all of said warnings.
|
|
With the impending switch to Pulldown as the default doc generator, warnings
have been enabled for incompatible syntax. This fixes all of said warnings.
|
|
The switch to Pulldown for the Markdown parser for Rustdoc has revealed
that there were a large number of doctests that weren't being run. These
tests failed to compile before, but will also fail to run because they
attach to arbitrary user and group IDs, which likely don't exist on the
system. These are therefore marked as `no_run`.
|
|
741: Expose `decode` on `WaitStatus` and make it return a `Result` r=Susurrus a=rocallahan
Closes #740.
|
|
815: Reduce ios builds r=Susurrus a=Susurrus
Closes #669
|
|
|
|
Specifying multiple targets can be done by setting the
environment variable to a semi-colon delimited list of
targets.
|
|
807: Switch to libc definitons of errno constants r=Susurrus a=Susurrus
Still need to do OpenBSD and NetBSD. Primary goal with this first pass is to see what doesn't exist properly in `libc`.
Closes #487.
|
|
777: Use the real pipe2(2) on most targets r=asomers a=asomers
FreeBSD added pipe2(2) in version 10.0.
|
|
All supported non-Apple platforms now use the native syscall. Only ios
and macos lack it. Deprecate pipe2 on those platforms, because it's
impossible to guarantee atomicity with a userland implementation. It
was added in:
* DragonflyBSD 4.2
* FreeBSD 10.0
* NetBSD 6.0
* OpenBSD 5.7
|
|
|
|
Now that these constants are verified within libc,
these tests are no longer necessary.
|
|
This was doing testing for errno constants and a few other
types that is no longer necessary now that these types are
all tested within the libc project itself.
|
|
|
|
696: Stop reexporting `Errno` variants r=Susurrus a=jonas-schievink
Closes #664 (unsure if this is everything needed)
|
|
|
|
cc #664 (unsure if this is everything needed)
|
|
667: Add support for getifaddrs. r=asomers a=mwanner
Here's a first attempt at a rustian interface for `getifaddrs`, please review.
Changes for the changelog:
- Added `nix::ifaddrs::{getifaddrs, InterfaceAddressIterator,
InterfaceAddress and InterfaceFlags}`
Closes #650.
Closes #764.
|
|
|
|
801: Upgrade to Bitflags 1.0 r=asomers a=Susurrus
The libc_bitflags! macro was replaced with a non-recursive one supporting
only public structs. I could not figure out how to make the old macro work
with the upgrade, so I reworked part of the bitflags! macro directly to suit
our needs, much as the original recursive macro was made. There are no uses
of this macro for non-public structs, so this is not a problem for internal code.
Closes #766.
|
|
The libc_bitflags! macro was replaced with a non-recursive one supporting
only public structs. I could not figure out how to make the old macro work
with the upgrade, so I reworked part of the bitflags! macro directly to suit
our needs, much as the original recursive macro was made. There are no uses
of this macro for non-public structs, so this is not a problem for internal code.
|