mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Errno updates with errno for linux/win/macos. Updated $$ syntax to also match compiler constants.
11 lines
205 B
C
11 lines
205 B
C
module std::os::windows;
|
|
import std::env;
|
|
|
|
$if (env::OS_TYPE == OsType.WIN32):
|
|
extern fn int getLastError() @stdcall @extname("GetLastError");
|
|
fn int errno() @inline
|
|
{
|
|
return getLastError();
|
|
}
|
|
$endif;
|