[go: up one dir, main page]

errno 0.1.3

Cross-platform interface to the `errno` variable.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Cross-platform interface to the `errno` variable.

#[cfg(unix)] extern crate libc;
#[cfg(windows)] extern crate winapi;
#[cfg(windows)] extern crate kernel32;

#[cfg(unix)] mod unix;
#[cfg(unix)] pub use unix::{Errno, errno, set_errno};

#[cfg(windows)] mod windows;
#[cfg(windows)] pub use windows::{Errno, errno, set_errno};

#[test]
fn it_works() {
    let x = errno();
    set_errno(x);
    let _ = x.to_string();
}