summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-08-31Use libc in poll.rsPhilipp Matthias Schaefer
2016-08-30Auto merge of #402 - fiveop:less_ffi_sched, r=@posborneHomu
Replace parts of ffi module by libc functions ind sched.rs Not exporting `CpuMask` anymore, should be the only API change of this PR. Since the type is not used in any other exported signature or type, I think it is fine to no longer export it. r? @kamalmarhubi @posborne
2016-08-29Replace parts of ffi module by libc functions in sched.rsPhilipp Matthias Schaefer
2016-08-28Updated CHANGELOG.md for #405 and #407.Philipp Matthias Schaefer
Closes #408.
2016-08-27Auto merge of #407 - untitaker:fullfsync-fcntl, r=fiveopHomu
Add FcntlArg::F_FULLFSYNC https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fsync.2.html
2016-08-26Add FcntlArg::F_FULLFSYNCMarkus Unterwaditzer
https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man2/fsync.2.html
2016-08-26Auto merge of #405 - murarth:clone-fdset, r=fiveopHomu
Implement `Clone` for `FdSet` on Mac/iOS
2016-08-25Implement `Clone` for `FdSet` on Mac/iOSMurarth
2016-08-16Auto merge of #401 - fiveop:fix_warnings, r=posborneHomu
Get rid of a few warnings during compilation of tests
2016-08-15Get rid of a few warnings during compilation of testsPhilipp Matthias Schaefer
2016-08-12Auto merge of #400 - asomers:master, r=posborneHomu
Update CHANGELOG for pull request 397
2016-08-11Auto merge of #397 - fiveop:asomers_master, r=@posborneHomu
Fix nix on FreeBSD (rebased on master)
2016-08-11Auto merge of #398 - posborne:fix-docker-builds, r=fiveopHomu
ci: fix docker container check Newer version of docker no longer have the /.dockerinit file present when the container is executing, so that is no longer an option. When executing in a container, we do know that we will be executing as pid 1 -- this is probably not ever the case on the host system. r? @fiveop
2016-08-10ci: fix docker container checkPaul Osborne
Newer version of docker no longer have the /.dockerinit file present when the container is executing, so that is no longer an option. When executing in a container, we do know that we will be executing as pid 1 -- this is probably not ever the case on the host system. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-08-10Fix nix on FreeBSD amd64Alan Somers
On Linux, the cmsg_len field of struct cmsghdr has type size_t, but it has size socklen_t on POSIX-compliant operating systems. So on POSIX-compliant 64-bit operating systems, struct cmsghdr has padding gaps that aren't present on Linux. Most of the issues fixed by this commit related to those gaps. src/sys/socket/ffi.rs Fix the type of the cmsg_data field so the struct layout will be correct. src/sys/socket/mod.rs In CmsgIterator.next, only return a single file descriptor. sendmsg(2) can only stuff a single file descriptor into each cmsg. In cmsg_align, fix the rounding calculation, and eliminate a division instruction. Add a missing cmsg_align call in ControlMessage.len In ControlMessage.encode_into, add any necessary padding bytes between the cmsghdr and the data. In sendmsg, fix some len<->capacity confusion.
2016-08-10Fix the sockopt_impl matcher rule order.Alan Somers
Rules for generic types were located above rules for specific types, so the rules for specific types never got matched. This caused the sys::socket::sockopt::test::can_get_listen_on_tcp_socket test to fail on FreeBSD. The solution is to put all of the generic rules at the bottom.
2016-08-10Fix the sethostname binding on FreeBSD and DragonflyBSDAlan Somers
2016-08-09Update CHANGELOG for pull request 397Alan Somers
2016-08-06Auto merge of #395 - fiveop:no_longer_1.1, r=posborneHomu
No longer support Rust 1.1 Since tempdir is broken on Rust 1.1 I propose to push the minimum supported Rust version to 1.2.
2016-08-05No longer support Rust 1.1Philipp Matthias Schaefer
2016-08-04Auto merge of #391 - fiveop:changelog, r=posborneHomu
Introduce CHANGELOG.md - Added initial CHANGELOG.md with Changes from Version 0.6.0 and the upcoming changes for version 0.7.0. - Added RELEASE_PROCEDURE.md detailing what changes should be made to CHANGELOG.md during a release. - Added sections about CHANGELOG.md in CONVENTIONS.md and CONTRIBUTIONS.md.
2016-07-22Introduce CHANGELOG.mdPhilipp Matthias Schaefer
- Added initial CHANGELOG.md with Changes from Version 0.6.0 and the upcoming changes for version 0.7.0. - Added RELEASE_PROCEDURE.md detailing what changes should be made to CHANGELOG.md during a release. - Added sections about CHANGELOG.md in CONVENTIONS.md and CONTRIBUTIONS.md.
2016-07-19Auto merge of #389 - tbu-:pr_fix_netbsd, r=fiveopHomu
Fix NetBSD build
2016-07-18Fix NetBSD buildTobias Bucher
2016-07-16Auto merge of #386 - bugaevc:reboot, r=fiveopHomu
Add reboot() support on Linux This adds support for calling [reboot(2)](http://linux.die.net/man/2/reboot) on Linux (useful for implementing PID 1!). * **Testing**: I can't imagine how this could be tested other than manually, which is what I did to ensure it works. * **libc**: for some reason libc includes neither `reboot()` function, nor `RB_*` constants, so I had to hack-define them here. Should I open a bug/PR against the libc crate? * **API**: I went with `reboot()` function for restarting, powering off, halting, etc. and an additional `set_cad_enabled()` function for enabling/disabling Ctrl-Alt-Delete, which still corresponds to `reboot()` C call, but has different semantics and return type. (But I'm open to suggestions here -- maybe it would be better to separate each action into its own function, i.e. `restart()`, `poweroff()`, `halt()`?) * **Documentation**: I see most of the things in nix are undocumented, so I didn't document anything except for the `set_cad_enabled()` function, which obviously uses a non-standard name. * **Portability**: I implemented the Linux version as I'm not familiar with anything else, but there surely are others (ex. [BSD](http://www.freebsd.org/cgi/man.cgi?reboot(2))). If I didn't mess up anything, the new code is only compiled on Linux/Android, so it should be straightforward to implement the other versions too.
2016-07-14Name enum variants after the libc constantsSergey Bugaev
2016-07-14Revert "Manually match on RebootMode::*"Sergey Bugaev
This reverts commit 012c6623c9c50aca91b81e6d30800613f515f898.
2016-07-14Add some documentationSergey Bugaev
2016-07-14Switch Clone and CopySergey Bugaev
2016-07-13Manually match on RebootMode::*Sergey Bugaev
2016-07-13Use libc's declarationsSergey Bugaev
2016-07-13Stop targeting AndroidSergey Bugaev
2016-07-13Ignore the overflow for constantsSergey Bugaev
Force using the constants even on x86 where they do not fit into isize (c_int)
2016-07-13Add some basic docs for reboot::set_cad_enabled()Sergey Bugaev
2016-07-13Add the initial implementation of reboot()Sergey Bugaev
2016-07-13Auto merge of #385 - posborne:gh-pages-docs, r=fiveopHomu
Publish docs to gh-pages, add coveralls, update README See the commit messages for some additional details. This started out with just an update to publish the docs to gh-pages but snowballed into a few other changes along the way.
2016-07-13Auto merge of #387 - bugaevc:track-master, r=posborneHomu
Use git master as libc version As mentioned by @fiveop in #363, > We should use the Github version of libc for development and a fixed version for releases. So this changes the required libc version to GitHub's master. The dependency is supposed to be manually changed to a fixed version when doing a release, out of the GitHub repository (i.e. nix's master always tracks libc's master).
2016-07-13Use git master as libc versionSergey Bugaev
2016-07-12ci: only attempt travis-cargo under linuxPaul Osborne
Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-07-12docs: update readme to be a bit more usefulPaul Osborne
This started out as a small change to update the readme to include an updated pointer to the documentation on gh-pages and ended with a bit of an overhaul in order to provide better information for people just checking out nix for the first time. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-07-10ci: push docs to gh-pages and code cov to coverallsPaul Osborne
This moves things around a fair bit in the .travis.yml to be more logically ordered and adds support for publishing docs (on master) to gh-pages. Code coverage is also calculated and published to coveralls.io. Travis is able to write to gh-pages on the github repository via the GH_TOKEN environment variable stored in the travis settings (marked as private). This token is generated from the github user 'rust-nix-bot' in order to avoid given access to other repos associated with an actual user's account (this practice is recommended by Github). Other changes worth noting: - We now test fewer intermediate versions of rust - The existing logic to publish to Carl's S3 bucket have been removed. Signed-off-by: Paul Osborne <osbpau@gmail.com>
2016-07-04Auto merge of #383 - kamalmarhubi:eventfd-revamp, r=posborneHomu
eventfd: Follow nix conventions This commit revamps to eventfd to follow nix conventions: - drop in-crate FFI definitions - rename EventFdFlag to EfdFlags Additionally, it changes the initval argument to be a libc::c_uint, matching the actual type.
2016-07-03eventfd: Follow nix conventionsKamal Marhubi
This commit revamps to eventfd to follow nix conventions: - drop in-crate FFI definitions - rename EventFdFlag to EfdFlags Additionally, it changes the initval argument to be a libc::c_uint, matching the actual type.
2016-07-01Auto merge of #379 - nikklassen:wait-flags, r=fiveopHomu
Add missing wait flag WUNTRACED for non-Linux systems My understanding is that this flag is required by POSIX, so all systems should allow for it
2016-07-01Auto merge of #381 - fiveop:fix_musl, r=utkarshkukretiHomu
musl target needs std::mem now Closes nix-rust/nix#325.
2016-06-29musl target needs std::mem nowPhilipp Matthias Schaefer
2016-06-29Replace wait constants with libc constantsNik Klassen
2016-06-29Use new libc versionNik Klassen
2016-06-28Auto merge of #370 - fiveop:context, r=posborneHomu
Provide accessors to sigmask of UContext.
2016-06-28Auto merge of #362 - fiveop:signal_enum, r=posborneHomu
Signal enum This is work in progress. I post this pull request as a request for discussion. I mark the lines I have doubts or ideas about. Ignore the first commit. It is the same as PR #361, which I wanted to base this change off.