Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
renameat is (somewhat oddly, imho) in stdio.h. I put it in
nix::fcntl because there's no nix::stdio and all its friends
(including the AT_* constants) are in nix::fcntl.
|
|
This adds the unlinkat function, which is part of POSIX:
http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlinkat.html
and widely implmented on Unix-family platforms.
Implement unlinkat - Update comments to unlink at and breakup tests
Changes made based on comments from pull request #1058
Implement unlinkat - Update should_panic for more precise check
Updae should_panic attribute for more precise check. Also remove
some dead code and note the pull request ID.
Implement unlinkat - Update error handling to use unwrap_err
The previous patch failed testing on two targets that returned EPERM
as the Sys error instead of EISDIR. This patch changes from using the
should_panic attribute to using the unwrap_err and matching against
the result.
Implement Unlinkat - Passing tests should not print anything. Fix.
Implement unlinkat - Update location of commit comment in the CHANGELOG
Implement unlinkat - Remove newline
|
|
|
|
|
|
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.
|
|
Just a minor typo in the docs of `O_RDWR`. It read:
```
/// Allow both reading and writing.
///
/// This should not be combined with `O_WRONLY` or `O_RDWR`.
O_RDWR;
```
but I believe it should read
```
/// Allow both reading and writing.
///
/// This should not be combined with `O_WRONLY` or `O_RDONLY`.
O_RDWR;
```
instead :-)
|
|
try! is not available in Rust 2018
|
|
|
|
|
|
|
|
|
|
|
|
* 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).
|
|
cc #664 (unsure if this is everything needed)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
622: Separate OpenBSD and FreeBSD in fcntl.rs r=asomers
Those two OSes cannot be together since the following FreeBSD flags aren't available on OpenBSD.
- `O_DIRECT`
- `O_EXEC`
- `O_TTY_INIT`
|
|
|
|
|
|
|
|
|
|
This allows importing them directly from `nix::fcntl` which is more
ergonomic than needing to use them via `FcntlArg`.
|
|
|
|
Prefer libc_bitflags! over bitflags!. Prefer libc::CONSTANTS over
writing the constant manually.
|
|
|
|
https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fsync.2.html
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Derive some more traits on flock to make life easier
Change fcntl to return Result<c_int> so we can get results of F_GET*
ops. Change pipe2_setflags to match.
|