summaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2016-09-05implemented mkdir, extended getcwd test to include long path namesPhilipp Keller
2016-09-02implemented getcwd (returning Result<PathBuf>, reconciling all calls to ↵Philipp Keller
expect into proper try handling), needs testing still
2016-08-29Replace parts of ffi module by libc functions in sched.rsPhilipp Matthias Schaefer
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-25Implement `Clone` for `FdSet` on Mac/iOSMurarth
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-07-18Fix NetBSD buildTobias Bucher
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-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-06-29musl target needs std::mem nowPhilipp Matthias Schaefer
2016-06-29Replace wait constants with libc constantsNik 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.
2016-06-26Convert signal constants to enumeration.Philipp Matthias Schaefer
2016-06-20Auto merge of #377 - aoprisan:master, r=posborneHomu
Added lseek and seek64 I have added lseek and seek64 to unistd, the last one targeting Linux/Android only. I wasn't sure where to place the Whence enum, or if it's a nice of doing, I am quite fresh to Rust.
2016-06-13Added lseek to unistdAndrei Oprisan
llseek and lseek64 impl Whence fixed formatting awful typo when refactoring no llseek wrong test name using off64_t got rid of offset Added SeekHole/Data; formatted test; SeekCur/Set/End use libc constants
2016-06-11Provide accessors to sigmask of UContext.Philipp Matthias Schaefer
2016-06-10Add missing wait flag WUNTRACED for non-Linux systemsNik Klassen
2016-06-06Only deny warnings in testKamal Marhubi
This prevents us breaking builds under newer Rust versions with additional warnings.
2016-05-18Exclude UContext::get(),set() on musl, not available from libc.Justin Latimer
2016-05-07Auto merge of #361 - fiveop:missing_signals, r=@kamalmarhubiHomu
Add missing signals. In preparation of turning them into an enumeration.
2016-05-06Add missing signals.Philipp Matthias Schaefer
2016-05-06Use Wrapping for intended underflow of unsigned integer value.Philipp Matthias Schaefer
2016-05-03Auto merge of #367 - justinlatimer:so-original-dst, r=kamalmarhubiHomu
Add SO_ORIGINAL_DST In Linux, the SO_ORIGINAL_DST socket option can be used to get the original destination, which can be needed if the connection is translated by a NAT, i.e. iptables. In C, this information can be obtained by ``getsockopt(fd, SOL_IP, SO_ORIGINAL_DST, &remote, &remote_len)`` and returns a ``sockaddr_in`` struct. I've added a binding for this option. Thanks!
2016-05-02Add SO_ORIGINAL_DSTJustin Latimer
2016-05-01Support sockaddr_nl in sockaddr_storage_to_addr().James Peach
Add support for converting AF_NETLINK sockaddr_nl addresses to Sockaddr::Netlink(). This lets socket::recvmsg() work on netlink sockets.
2016-04-24Auto merge of #357 - arcnmx:exec-void, r=@posborneHomu
Use Void in exec return type Indicates that these methods cannot return successfully. This does introduce a new dependency; an empty enum could be used instead but then you would lose the convenience `unreachable` methods exposed by the `void` crate, and standardizing on one type, etc...
2016-04-24Auto merge of #354 - brianp:fcntl-libc, r=kamalmarhubiHomu
fcntl: Use bindings from libc instead of our own **Un-finished** and looking for help. As #264 was tagged "mentor, good first bug" Ref #264 I couldn't find `F_GET_SEALS`, or `F_ADD_SEALS` in libc. Is this a case where I should be making a PR over there? I'm not sure where exactly to address it in libc.
2016-04-22Add SigSet::extend and SigSet::clear.Philipp Matthias Schaefer
2016-04-21Allow to specify signal when calling clone.Philipp Matthias Schaefer
2016-04-20fcntl: Use bindings from libc instead of our ownBrian Pearce
2016-04-20Last few constantsarcnmx
2016-04-19Use constants from libcarcnmx
2016-04-18Add some missing SFlagsarcnmx
2016-04-18Use Void in exec return typearcnmx
2016-04-18Auto merge of #353 - fiveop:nightly_warning, r=kamalmarhubiHomu
Cast function item to function pointer in order to appease compiler. This is necessary because of compiler changes. For further information look at rust-lang/rust#19925. This solves #346. I know that there are other problems with the affected function. We are thinking about how to best pass the arguments to the function and we don't want to define the ffi's ourselves. However, I would like to get the warning out of our tree as soon as possible. We do not need to wait for our polish.
2016-04-16mount: Use bindings from libc instead of our ownBrian Pearce