summaryrefslogtreecommitdiff
path: root/src/errno.rs
AgeCommit message (Collapse)Author
2020-06-27Make Errno::clear safeAlan Somers
All it does is assign a value to a thread-local int. There's nothing unsafe about that.
2020-05-31Convert the crate to edition 2018Alan Somers
2020-05-17Add Redox support for most of the modulesXavier L'Heureux
Some things are not implemented yet in redox, so a lot of annotations were added to remove functions when compiling for redox. Those functions will hopefully be added in time, but for now it's better to have partial support than none. Blocked by https://github.com/rust-lang/libc/pull/1438
2019-12-29remove deprecated Error::descriptionRadyk Andrii
2019-08-29Clippy cleanupAlan Somers
2019-03-29add errno constants for OpenBSD 6.2 and format long linesJenn Wheeler
2019-03-28Add ENOTSUP to Linux and AndroidJulio Merino
While ENOTSUP is defined as equal to EOPNOTSUPP on these platforms, exposing the ENOTSUP symbol (as libc does) allows for writing portable code that may want to reference this error code.
2019-01-13Implement nix wrapper for libc::signalRobert Gardner
Closes #476
2018-12-03DragonflyBSD: Remove unused Errno'sLevente Kurusa
EUNUSED* were removed from <sys/errno.h> in DragonflyBSD, so there is no need for them to be in nix either. This also fixes the build on DragonflyBSD. Signed-off-by: Levente Kurusa <lkurusa@acm.org>
2018-01-10Expose mqueue functions for all supported OSesAlan Somers
2017-12-20Merge redundant match armsBryant Mairs
2017-12-19Merge #799bors[bot]
799: Fix nix on Dragonfly r=Susurrus a=mneumann This commit replaces pull request https://github.com/nix-rust/nix/pull/684. It fixes building `nix` on DragonFly. All tests pass. This requires most recent libc to build: https://github.com/rust-lang/libc/pull/851.
2017-12-19Fix support for DragonFlyMichael Neumann
* 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).
2017-12-05Derive Eq for ErrnoBryant Mairs
2017-12-05Remove redundant constant testsBryant Mairs
Now that these constants are verified within libc, these tests are no longer necessary.
2017-12-05Switch to libc definitons of errno constantsBryant Mairs
2017-12-04Stop reexporting `Errno` and its variantsJonas Schievink
cc #664 (unsure if this is everything needed)
2017-11-16Use libc function declarations for errno gettersBryant Mairs
2017-11-16Remove bitrig #[cfgsBryant Mairs
Bitrig is in the process of re-merging with OpenBSD as is no longer actively developed. Additionally it was never tested, and probably was quite broken, for nix. So let's remove all references and not even pretend to support it.
2017-07-04Allow nix to compile on android targetsroblabla
2017-04-09Re-enabled errorno test for not_android.Zac Berkowitz
2017-04-09Fixed constants for MIPSZac Berkowitz
2016-01-28Move errno::Result back to crate rootarcnmx
2016-01-28Errno::result()arcnmx
2015-11-20netbsd supportJeremy Fitzhardinge
2015-09-09Add/Fix support for DragonFly BSDMichael Neumann
2015-09-03Make tests compile on FreeBSDGeoffrey Thomas
Add <sys/types.h>, which GNU is generally lenient about requiring, and drop the spurious errno "ETYPE" which is nowhere to be seen in the source tree (or in Apple's <errno.h>, either).
2015-07-06Consts are not on all kernelsTilde Engineering
2015-07-03Add support for ptraceJoseph Kain
Closes #138
2015-05-29Basic OpenBSD support.Laurence Tratt
Some of the tests are currently unrunnable, but the basic library is at least buildable.
2015-05-21Test sockopt const valuesCarl Lerche
2015-05-11Get the library to build on freebsdAndrew J. Stone
`cargo build` works.
2015-04-24FromPrimitive is no moreFlorian Hartwig
2015-04-06Get compiling on Rust 1.0 betaCarl Lerche
Initially support this by assuming the lowest common denominator. The long term solution is to improve the build system to allow pulling in more specific features that are available on the target system.
2015-03-16Fix deprecation warningsCarl Lerche
2015-03-13Amend some files to make it compile on arm-linux-androideabi.kennytm
2015-02-19Test errno definesCarl Lerche
2015-02-19Fix type mismatch: errno now i32Roma Sokolov
2015-02-10Add `NixPath`, `NixError`, and `NixResult`.Utkarsh Kukreti
2015-01-27Fix warnings for `rustc 1.0.0-dev (e365e4c05 2015-01-27 08:40:39)`.Utkarsh Kukreti
2015-01-13changed uint and int to usize and isize respectivelyRick Richardson
2015-01-07ToCStr removal falloutValerii Hiora
2015-01-03Update to rust masterValerii Hiora
- cstr fallout - deriving -> derive - lib stabilization warnings removal
2014-12-12Fallout of Copy opt-in for non-LinuxValerii Hiora
Based on #22.
2014-12-10Fallout of Copy becoming opt-in.Victor Berger
2014-11-19Fix for LinuxRoma Sokolov
2014-11-19Use namespaced enum variants.Roma Sokolov
As per this pull request https://github.com/rust-lang/rust/pull/18973, enum variants require fully qualified path to access them. This commit introduces boring changes to make nix-rust compiles againts new rust.
2014-11-11std::os::errno returns uint nowRoma Sokolov
2014-10-10Update static->constTilde Engineering
2014-10-02Track Rust masterCarl Lerche