mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
18 lines
236 B
C
18 lines
236 B
C
module std::core::os::linux;
|
|
|
|
$if (env::OS_TYPE == OsType.LINUX):
|
|
|
|
extern fn int* __errno_location();
|
|
|
|
fn int errno() @inline
|
|
{
|
|
return *__errno_location();
|
|
}
|
|
|
|
fn void errno_set(int err)
|
|
{
|
|
*(__errno_location()) = err;
|
|
}
|
|
|
|
$endif;
|