type c-char* = i8 type c-uchar* = u8 type c-short* = i16 type c-ushort* = u16 type c-int* = i32 type c-uint* = u32 type c-long* = i64 type c-ulong* = u64 type c-longlong* = i64 type c-ulonglong* = u64 type c-size* = uint type c-ssize* = int type mode* = u32 fn extern "c" close*(fd: c-int) c-int fn extern "c" open*(pathname: ptr[c-char], flags: c-int, mode: mode) c-int fn extern "c" printf*(format: ptr[c-uchar], ..) c-int fn extern "c" read*(fd: c-int, buf: ptr[c-uchar], count: c-size) c-ssize fn extern "c" unlink*(pathname: ptr[c-char]) c-int fn extern "c" write*(fd: c-int, buf: ptr[c-uchar], count: c-size) c-ssize fn extern "c" __errno_location*() ptr[c-int] const O_RDONLY*: c-int = 0 const O_WRONLY*: c-int = 1 const O_RDWR*: c-int = 2 const O_DIRECT*: c-int = 0x4000 const O_DIRECTORY*: c-int = 0x10000 const O_NOFOLLOW*: c-int = 0x20000 const O_APPEND*: c-int = 1024 const O_CREAT*: c-int = 64 const O_EXCL*: c-int = 128 const O_NOCTTY*: c-int = 256 const O_NONBLOCK*: c-int = 2048 const O_SYNC*: c-int = 1052672 const O_RSYNC*: c-int = 1052672 const O_DSYNC*: c-int = 4096 const O_FSYNC*: c-int = 0x101000 const O_NOATIME*: c-int = 0o1000000 const O_PATH*: c-int = 0o10000000 const O_TMPFILE*: c-int = 0o20000000 | O_DIRECTORY const O_TRUNC*: c-int = 512