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