docs

v0.1.0 문서를 보고 있습니다. 이 버전은 더 이상 지원하지 않습니다. 최신 릴리스: v0.1.3 →

bare::ffi::errno

API 참조는 영어로만 있습니다. 표준 라이브러리 소스의 영어 문서 주석에서 만듭니다.

the C library's errno and Windows' GetLastError as the last #[errno] call left them.

The thread may run runtime code between a C call's return and the next line (it may wait out a collection there), and that code may change errno. #[errno] on the declaration (or its extern block) saves both first; these read the saved values, so they are right whenever they run.

Functions

errnoSource

pub fn errno() -> c_int

errno as the last #[errno] call on this thread left it.

set_errnoSource

pub fn set_errno(v: c_int)

Set errno, both the saved value and the C library's (for C functions that only report errors through it, such as strtol: set 0 first).

last_errorSource

pub fn last_error() -> u32

Windows' GetLastError as the last #[errno] call on this thread left it; 0 elsewhere.

set_last_errorSource

pub fn set_last_error(v: u32)

Set the saved GetLastError value and, on Windows, the thread's own (SetLastError).