Skip to content

Commit 3ccb313

Browse files
committed
Merge github.com:nix-rust/nix into evfilt
2 parents be9c1ff + bf00bf2 commit 3ccb313

18 files changed

+608
-413
lines changed

CHANGELOG.md

+69-5
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,42 @@ This project adheres to [Semantic Versioning](http://semver.org/).
99
- Added complete definitions for all kqueue-related constants on all supported
1010
OSes
1111
([#415](https://github.com/nix-rust/nix/pull/415))
12+
- Added function `epoll_create1` and bitflags `EpollCreateFlags` in
13+
`::nix::sys::epoll` in order to support `::libc::epoll_create1`.
14+
([#410](https://github.com/nix-rust/nix/pull/410))
15+
16+
### Changed
17+
- Changed `KEvent` to an opaque structure that may only be modified by its
18+
constructor and the `ev_set` method.
19+
([#415](https://github.com/nix-rust/nix/pull/415))
20+
- `pipe2` now calls `libc::pipe2` where available. Previously it was emulated
21+
using `pipe`, which meant that setting `O_CLOEXEC` was not atomic.
22+
([#427](https://github.com/nix-rust/nix/pull/427))
23+
- Renamed `EpollEventKind` to `EpollFlags` in `::nix::sys::epoll` in order for
24+
it to conform with our conventions.
25+
([#410](https://github.com/nix-rust/nix/pull/410))
26+
- `EpollEvent` in `::nix::sys::epoll` is now an opaque proxy for
27+
`::libc::epoll_event`. The formerly public field `events` is now be read-only
28+
accessible with the new method `events()` of `EpollEvent`. Instances of
29+
`EpollEvent` can be constructed using the new method `new()` of EpollEvent.
30+
([#410](https://github.com/nix-rust/nix/pull/410))
31+
32+
### Fixed
33+
- Fixed using kqueue with `EVFILT_USER` on FreeBSD
34+
([#415](https://github.com/nix-rust/nix/pull/415))
35+
- Fixed the build on FreeBSD, and fixed the getsockopt, sendmsg, and recvmsg
36+
functions on that same OS.
37+
([#397](https://github.com/nix-rust/nix/pull/397))
38+
- Fixed an off-by-one bug in `UnixAddr::new_abstract` in `::nix::sys::socket`.
39+
([#429](https://github.com/nix-rust/nix/pull/429))
40+
41+
## [0.7.0] 2016-09-09
42+
43+
### Added
1244
- Added `lseek` and `lseek64` in `::nix::unistd`
1345
([#377](https://github.com/nix-rust/nix/pull/377))
46+
- Added `mkdir` and `getcwd` in `::nix::unistd`
47+
([#416](https://github.com/nix-rust/nix/pull/416))
1448
- Added accessors `sigmask_mut` and `sigmask` to `UContext` in
1549
`::nix::ucontext`.
1650
([#370](https://github.com/nix-rust/nix/pull/370))
@@ -20,24 +54,54 @@ This project adheres to [Semantic Versioning](http://semver.org/).
2054
- Added new module `::nix::sys::reboot` with enumeration `RebootMode` and
2155
functions `reboot` and `set_cad_enabled`. Currently for _linux_ only.
2256
([#386](https://github.com/nix-rust/nix/pull/386))
57+
- `FdSet` in `::nix::sys::select` now also implements `Clone`.
58+
([#405](https://github.com/nix-rust/nix/pull/405))
59+
- Added `F_FULLFSYNC` to `FcntlArg` in `::nix::fcntl` for _apple_ targets.
60+
([#407](https://github.com/nix-rust/nix/pull/407))
61+
- Added `CpuSet::unset` in `::nix::sched`.
62+
([#402](https://github.com/nix-rust/nix/pull/402))
63+
- Added constructor method `new()` to `PollFd` in `::nix::poll`, in order to
64+
allow creation of objects, after removing public access to members.
65+
([#399](https://github.com/nix-rust/nix/pull/399))
66+
- Added method `revents()` to `PollFd` in `::nix::poll`, in order to provide
67+
read access to formerly public member `revents`.
68+
([#399](https://github.com/nix-rust/nix/pull/399))
69+
- Added `MSG_CMSG_CLOEXEC` to `MsgFlags` in `::nix::sys::socket` for _linux_ only.
70+
([#422](https://github.com/nix-rust/nix/pull/422))
2371

2472
### Changed
25-
- Changed `KEvent` to an opaque structure that may only be modified by its
26-
constructor and the `ev_set` method.
27-
([#415](https://github.com/nix-rust/nix/pull/415))
2873
- Replaced the reexported integer constants for signals by the enumeration
2974
`Signal` in `::nix::sys::signal`.
3075
([#362](https://github.com/nix-rust/nix/pull/362))
3176
- Renamed `EventFdFlag` to `EfdFlags` in `::nix::sys::eventfd`.
3277
([#383](https://github.com/nix-rust/nix/pull/383))
78+
- Changed the result types of `CpuSet::is_set` and `CpuSet::set` in
79+
`::nix::sched` to `Result<bool>` and `Result<()>`, respectively. They now
80+
return `EINVAL`, if an invalid argument for the `field` parameter is passed.
81+
([#402](https://github.com/nix-rust/nix/pull/402))
82+
- `MqAttr` in `::nix::mqueue` is now an opaque proxy for `::libc::mq_attr`,
83+
which has the same structure as the old `MqAttr`. The field `mq_flags` of
84+
`::libc::mq_attr` is readable using the new method `flags()` of `MqAttr`.
85+
`MqAttr` also no longer implements `Debug`.
86+
([#392](https://github.com/nix-rust/nix/pull/392))
87+
- The parameter `msq_prio` of `mq_receive` with type `u32` in `::nix::mqueue`
88+
was replaced by a parameter named `msg_prio` with type `&mut u32`, so that
89+
the message priority can be obtained by the caller.
90+
([#392](https://github.com/nix-rust/nix/pull/392))
91+
- The type alias `MQd` in `::nix::queue` was replaced by the type alias
92+
`libc::mqd_t`, both of which are aliases for the same type.
93+
([#392](https://github.com/nix-rust/nix/pull/392))
3394

3495
### Removed
3596
- Type alias `SigNum` from `::nix::sys::signal`.
3697
([#362](https://github.com/nix-rust/nix/pull/362))
98+
- Type alias `CpuMask` from `::nix::shed`.
99+
([#402](https://github.com/nix-rust/nix/pull/402))
100+
- Removed public fields from `PollFd` in `::nix::poll`. (See also added method
101+
`revents()`.
102+
([#399](https://github.com/nix-rust/nix/pull/399))
37103

38104
### Fixed
39-
- Fixed using kqueue with `EVFILT_USER` on FreeBSD
40-
([#415](https://github.com/nix-rust/nix/pull/415))
41105
- Fixed the build problem for NetBSD (Note, that we currently do not support
42106
it, so it might already be broken again).
43107
([#389](https://github.com/nix-rust/nix/pull/389))

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
name = "nix"
44
description = "Rust friendly bindings to *nix APIs"
5-
version = "0.6.1-pre"
5+
version = "0.7.1-pre"
66
authors = ["Carl Lerche <me@carllerche.com>"]
77
homepage = "https://github.com/nix-rust/nix"
88
repository = "https://github.com/nix-rust/nix"

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ To use `nix`, first add this to your `Cargo.toml`:
3434

3535
```toml
3636
[dependencies]
37-
nix = "0.6.0"
37+
nix = "0.7.0"
3838
```
3939

4040
Then, add this to your crate root:

RELEASE_PROCEDURE.md

+26-3
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,39 @@ library.
33

44
# Before Release
55

6-
The release is prepared by a commit with the following changes.
6+
Based on changes since the last release, pick a new version number
7+
following semver conventions. For nix, a change that drops support for
8+
some Rust versions counts as a breaking change, and requires a major bump.
79

8-
- In CHANGELOG.md, rename the Unreleased section to the new version followed by
9-
the date of the release.
10+
The release is prepared as follows:
11+
12+
- Ask for a new libc version if, necessary. It usually is.
13+
- Make a commit with a message like "Release v0.8.3" with the following
14+
changes:
15+
- In `CHANGELOG.md`, rename the Unreleased section to the new version
16+
followed by the date of the release.
17+
- In `Cargo.toml`, update the version to the new version.
18+
- In `Cargo.toml`, change the libc dependency to the latest version.
19+
- In `README.md`, update the version in the Usage section to the new
20+
version.
21+
- Make a pull request.
22+
- Once the PR is merged, tag the merge commit, e.g. `git tag v0.8.3
23+
$MERGE_COMMIT_SHA1`.
24+
- Push the tag, e.g. `git push origin v0.8.3`.
1025

1126
# Create Release
1227

28+
- Checkout the tag.
29+
- Publish to crates.io with `cargo publish`.
30+
1331
# After Release
1432

1533
After the release a commit with the following changes is added to the master
1634
branch.
1735

1836
- Add a new Unreleased section header to CHANGELOG.md.
37+
- In `Cargo.toml`, update the version to the next `-dev` version, e.g.
38+
`v0.8.4-dev`.
39+
- In `Cargo.tml`, revert the libc dependency to its git master branch.
40+
- Commit with a message like "Bump to v0.8.4-dev"
41+
- Make a pull request.

src/fcntl.rs

+4
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ pub enum FcntlArg<'a> {
4646
F_ADD_SEALS(SealFlag),
4747
#[cfg(target_os = "linux")]
4848
F_GET_SEALS,
49+
#[cfg(any(target_os = "macos", target_os = "ios"))]
50+
F_FULLFSYNC,
4951

5052
// TODO: Rest of flags
5153
}
@@ -69,6 +71,8 @@ pub fn fcntl(fd: RawFd, arg: FcntlArg) -> Result<c_int> {
6971
F_ADD_SEALS(flag) => libc::fcntl(fd, ffi::F_ADD_SEALS, flag.bits()),
7072
#[cfg(target_os = "linux")]
7173
F_GET_SEALS => libc::fcntl(fd, ffi::F_GET_SEALS),
74+
#[cfg(any(target_os = "macos", target_os = "ios"))]
75+
F_FULLFSYNC => libc::fcntl(fd, libc::F_FULLFSYNC),
7276
#[cfg(any(target_os = "linux", target_os = "android"))]
7377
_ => unimplemented!()
7478
}

src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub mod fcntl;
4040
#[cfg(any(target_os = "linux", target_os = "android"))]
4141
pub mod mount;
4242

43-
#[cfg(any(target_os = "linux"))]
43+
#[cfg(target_os = "linux")]
4444
pub mod mqueue;
4545

4646
#[cfg(any(target_os = "linux", target_os = "macos"))]

0 commit comments

Comments
 (0)