Age | Commit message (Collapse) | Author |
|
|
|
* Prefer methods instead of functions.
* Create a newtype for a kqueue.
* Document everything.
* Deprecate EVFILT_SENDFILE, because it was never fully implemented
upstream.
* Add support to the libc_enum! macro to be able to deprecate variants.
|
|
|
|
Signed-off-by: Alex Saveau <saveau.alexandre@gmail.com>
|
|
FreeBSD 12 changes struct kevent. For now, libc always binds to the
11-compat ABI. But that will change some day. Adjust Nix's code to
build with either struct definition.
|
|
It is not stable across OpenBSD versions and is reserved by the system
on FreeBSD and NetBSD.
|
|
This saves code in several separate places that need to do this
separately. At the same time, remove a few uses of mem::transmute that
were implementing TryFrom or similar functionality.
Issue #373
|
|
Since libc may add new variants at any time, Nix's consumers should not
use exhaustive match patterns.
Fixes #1182
|
|
* `unistd::daemon` on Apple
* `unistd::pipe2` on Apple
* `sys::event::FilterFlag::NOTE_EXIT_REPARENTED` on Apple
* `sys::event::FilterFlag::NOTE_REAP` on Apple
* `sys::ptrace::ptrace` on Android and Linux
All have been deprecated for more than two releases and one year.
|
|
|
|
successfully. This type was deprecated in libc 0.2.55.
|
|
|
|
`assert_eq!` gives more debug info when the test fails by default than
`assert!`. This should help make debugging easier.
|
|
|
|
Derive Clone, Copy, Eq, Hash, and PartialEq for all types. Not all
traits are supported by all types, which is why many are missing
some.
|
|
Several symbols are now marked as deprecated on OSX. Fix the build by
marking these symbols' Nix wrappers as deprecated, too.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
Some enums which use different names for values than libc still set the
discriminators manually.
closes #254
|
|
The datatype for kevent.filter is u32 on NetBSD and
i16 on all other supported platforms. This was recently
fixed in upstream libc, breaking this API, so this
fixes it.
This change also modernizes the code a bit to unify the
EventFilter datatype across platforms and switch to the
libc_enum! macro.
|
|
|
|
There appears to be some interaction with test_pathconf_limited and
another one when they are run in parallel, causing it to return ENOENT
so the path has been changed from . to /.
|
|
|
|
These were exported for some weird reason and then left in
for documentation. Also some parts of certain modules used
them and others used the libc:: prefix. This was removed to
improve the docs and also code consistency
|
|
|
|
Prefer libc_bitflags! over bitflags!. Prefer libc::CONSTANTS over
writing the constant manually.
|
|
|
|
|
|
This matches NetBSD's C definitions. Other operating systems define
it as void*, despite not really being a pointer, but none actually
define it as uintptr_t. Better to be right on NetBSD and wrong
everywhere else than wrong everywhere. Plus, it's what mio expects.
|
|
|
|
|
|
Don't use it for FilterFlag, because it triggers recursion limit reached error
|
|
|
|
|
|
The final version of libc's PR #379 removed a few definitions, and fixed
OpenBSD's definition of fn kevent.
|
|
Change 11aa1f34243d5bbb7d6327a6607bd9d2530f3954 to libc added kqueue-related
definitions. They are more accurate and more complete than nix's own
definitions. Use them where possible.
Also, rationalize Nix's definitions so its public API will be as similar as
possible across all OSes.
|
|
|
|
|
|
|
|
|
|
This allows to specify no timeout and allows to specify any timespec
timeout.
|
|
|
|
|
|
|
|
|
|
|