api { package err : api { eqtype System_Error; to_unt : System_Error -> Unt; from_unt : Unt -> System_Error; error_msg : System_Error -> String; error_name : System_Error -> String; syserror : String -> Null_Or(System_Error ); toobig : System_Error; acces : System_Error; again : System_Error; badf : System_Error; badmsg : System_Error; busy : System_Error; canceled : System_Error; child : System_Error; deadlk : System_Error; dom : System_Error; exist : System_Error; fault : System_Error; fbig : System_Error; inprogress : System_Error; intr : System_Error; inval : System_Error; io : System_Error; isdir : System_Error; loop : System_Error; mfile : System_Error; mlink : System_Error; msgsize : System_Error; name_too_long : System_Error; nfile : System_Error; nodev : System_Error; noent : System_Error; noexec : System_Error; nolck : System_Error; nomem : System_Error; nospc : System_Error; nosys : System_Error; notdir : System_Error; notempty : System_Error; notsup : System_Error; notty : System_Error; nxio : System_Error; perm : System_Error; pipe : System_Error; range : System_Error; rofs : System_Error; spipe : System_Error; srch : System_Error; xdev : System_Error;};; package tty : api { eqtype Process_Id; eqtype File_Descriptor; package i : api { eqtype Flags; to_unt : Flags -> Unt; from_unt : Unt -> Flags; all : Flags; flags : List(Flags ) -> Flags; intersect : List(Flags ) -> Flags; clear : (Flags , Flags) -> Flags; all_set : (Flags , Flags) -> Bool; any_set : (Flags , Flags) -> Bool; brkint : Flags; icrnl : Flags; ignbrk : Flags; igncr : Flags; ignpar : Flags; inlcr : Flags; inpck : Flags; istrip : Flags; ixoff : Flags; ixon : Flags; parmrk : Flags;};; package o : api { eqtype Flags; to_unt : Flags -> Unt; from_unt : Unt -> Flags; all : Flags; flags : List(Flags ) -> Flags; intersect : List(Flags ) -> Flags; clear : (Flags , Flags) -> Flags; all_set : (Flags , Flags) -> Bool; any_set : (Flags , Flags) -> Bool; opost : Flags;};; package c : api { eqtype Flags; to_unt : Flags -> Unt; from_unt : Unt -> Flags; all : Flags; flags : List(Flags ) -> Flags; intersect : List(Flags ) -> Flags; clear : (Flags , Flags) -> Flags; all_set : (Flags , Flags) -> Bool; any_set : (Flags , Flags) -> Bool; clocal : Flags; cread : Flags; csize : Flags; cs5 : Flags; cs6 : Flags; cs7 : Flags; cs8 : Flags; cstopb : Flags; hupcl : Flags; parenb : Flags; parodd : Flags;};; package l : api { eqtype Flags; to_unt : Flags -> Unt; from_unt : Unt -> Flags; all : Flags; flags : List(Flags ) -> Flags; intersect : List(Flags ) -> Flags; clear : (Flags , Flags) -> Flags; all_set : (Flags , Flags) -> Bool; any_set : (Flags , Flags) -> Bool; echo : Flags; echoe : Flags; echok : Flags; echonl : Flags; icanon : Flags; iexten : Flags; isig : Flags; noflsh : Flags; tostop : Flags;};; package v : api { eof : Int; eol : Int; erase : Int; intr : Int; kill : Int; min : Int; quit : Int; susp : Int; time : Int; start : Int; stop : Int; nccs : Int; Cc; cc : List(((Int , Char)) ) -> Cc; update : (Cc , List(((Int , Char)) )) -> Cc; sub : (Cc , Int) -> Char;};; eqtype Speed; compare_speed : (Speed , Speed) -> Order; speed_to_unt : Speed -> Unt; unt_to_speed : Unt -> Speed; b0 : Speed; b50 : Speed; b75 : Speed; b110 : Speed; b134 : Speed; b150 : Speed; b200 : Speed; b300 : Speed; b600 : Speed; b1200 : Speed; b1800 : Speed; b2400 : Speed; b4800 : Speed; b9600 : Speed; b19200 : Speed; b38400 : Speed; Termios; termios : {cc:v::Cc, cflag:c::Flags, iflag:i::Flags, ispeed:Speed, lflag:l::Flags, oflag:o::Flags, ospeed:Speed} -> Termios; fields_of : Termios -> {cc:v::Cc, cflag:c::Flags, iflag:i::Flags, ispeed:Speed, lflag:l::Flags, oflag:o::Flags, ospeed:Speed}; getiflag : Termios -> i::Flags; getoflag : Termios -> o::Flags; getcflag : Termios -> c::Flags; getlflag : Termios -> l::Flags; getcc : Termios -> v::Cc; getospeed : Termios -> Speed; setospeed : (Termios , Speed) -> Termios; getispeed : Termios -> Speed; setispeed : (Termios , Speed) -> Termios; package tc : api { eqtype Set_Action; sanow : Set_Action; sadrain : Set_Action; saflush : Set_Action; eqtype Flow_Action; ooff : Flow_Action; oon : Flow_Action; ioff : Flow_Action; ion : Flow_Action; eqtype Queue_Sel; iflush : Queue_Sel; oflush : Queue_Sel; ioflush : Queue_Sel;};; getattr : File_Descriptor -> Termios; setattr : (File_Descriptor , tc::Set_Action , Termios) -> Void; sendbreak : (File_Descriptor , Int) -> Void; drain : File_Descriptor -> Void; flush : (File_Descriptor , tc::Queue_Sel) -> Void; flow : (File_Descriptor , tc::Flow_Action) -> Void; getpgrp : File_Descriptor -> Process_Id; setpgrp : (File_Descriptor , Process_Id) -> Void; Sy_Int = Int; osval4__syscall : String -> Sy_Int; set__osval4__ref : ({fun_name:String, io_call:String -> Sy_Int, lib_name:String} -> String -> Sy_Int) -> Void; Termio_Rep = (Unt , Unt , Unt , Unt , vector_of_one_byte_unts::Vector , Unt , Unt); tcgetattr__syscall : Int -> Termio_Rep; set__tcgetattr__ref : ({fun_name:String, io_call:Int -> Termio_Rep, lib_name:String} -> Int -> Termio_Rep) -> Void; tcsetattr__syscall : (Int , Sy_Int , Termio_Rep) -> Void; set__tcsetattr__ref : ( {fun_name:String, io_call:(Int , Sy_Int , Termio_Rep) -> Void, lib_name:String} -> (Int , Sy_Int , Termio_Rep) -> Void ) -> Void; tcsendbreak__syscall : (Int , Int) -> Void; set__tcsendbreak__ref : ({fun_name:String, io_call:(Int , Int) -> Void, lib_name:String} -> (Int , Int) -> Void) -> Void; tcdrain__syscall : Int -> Void; set__tcdrain__ref : ({fun_name:String, io_call:Int -> Void, lib_name:String} -> Int -> Void) -> Void; tcflush__syscall : (Int , Sy_Int) -> Void; set__tcflush__ref : ({fun_name:String, io_call:(Int , Sy_Int) -> Void, lib_name:String} -> (Int , Sy_Int) -> Void) -> Void; tcflow__syscall : (Int , Sy_Int) -> Void; set__tcflow__ref : ({fun_name:String, io_call:(Int , Sy_Int) -> Void, lib_name:String} -> (Int , Sy_Int) -> Void) -> Void; tcgetpgrp__syscall : Int -> Sy_Int; set__tcgetpgrp__ref : ({fun_name:String, io_call:Int -> Sy_Int, lib_name:String} -> Int -> Sy_Int) -> Void; tcsetpgrp__syscall : (Int , Sy_Int) -> Void; set__tcsetpgrp__ref : ({fun_name:String, io_call:(Int , Sy_Int) -> Void, lib_name:String} -> (Int , Sy_Int) -> Void) -> Void;};; eqtype Process_Id; unt_to_pid : Unt -> Process_Id; pid_to_unt : Process_Id -> Unt; fork : Void -> Null_Or(Process_Id ); exec : (String , List(String )) -> X; exece : (String , List(String ) , List(String )) -> X; execp : (String , List(String )) -> X; Waitpid_Arg = W_ANY_CHILD | W_CHILD Process_Id | W_GROUP Process_Id | W_SAME_GROUP; Exit_Status = W_EXITED | W_EXITSTATUS one_byte_unt::Unt | W_SIGNALED interprocess_signals::Signal | W_STOPPED interprocess_signals::Signal; package w : api { eqtype Flags; to_unt : Flags -> Unt; from_unt : Unt -> Flags; all : Flags; flags : List(Flags ) -> Flags; intersect : List(Flags ) -> Flags; clear : (Flags , Flags) -> Flags; all_set : (Flags , Flags) -> Bool; any_set : (Flags , Flags) -> Bool; untraced : Flags;};; wait : Void -> (Process_Id , Exit_Status); waitpid : (Waitpid_Arg , List(w::Flags )) -> (Process_Id , Exit_Status); waitpid_without_blocking : (Waitpid_Arg , List(w::Flags )) -> Null_Or(((Process_Id , Exit_Status)) ); exit : one_byte_unt::Unt -> X; Killpid_Arg = K_GROUP Process_Id | K_PROC Process_Id | K_SAME_GROUP; kill : (Killpid_Arg , interprocess_signals::Signal) -> Void; alarm : time::Time -> time::Time; pause : Void -> Void; sleep : time::Time -> time::Time; osval : String -> Int; osval__syscall : String -> Int; set__osval__ref : ({fun_name:String, io_call:String -> Int, lib_name:String} -> String -> Int) -> Void; sysconf__syscall : String -> Unt; set__sysconf__ref : ({fun_name:String, io_call:String -> Unt, lib_name:String} -> String -> Unt) -> Void; waitpid__syscall : (Int , Unt) -> (Int , Int , Int); set__waitpid__ref : ( {fun_name:String, io_call:(Int , Unt) -> (Int , Int , Int), lib_name:String} -> (Int , Unt) -> (Int , Int , Int) ) -> Void; kill__syscall : (Int , Int) -> Void; set__kill__ref : ({fun_name:String, io_call:(Int , Int) -> Void, lib_name:String} -> (Int , Int) -> Void) -> Void; eqtype User_Id; eqtype Group_Id; eqtype File_Descriptor; fd_to_int : File_Descriptor -> Int; int_to_fd : Int -> File_Descriptor; fd_to_iod : File_Descriptor -> Int; iod_to_fd : Int -> File_Descriptor; Directory_Stream; open_directory_stream : String -> Directory_Stream; read_directory_entry : Directory_Stream -> Null_Or(String ); rewind_directory_stream : Directory_Stream -> Void; close_directory_stream : Directory_Stream -> Void; change_directory : String -> Void; current_directory : Void -> String; stdin : File_Descriptor; stdout : File_Descriptor; stderr : File_Descriptor; package s : api { Mode; Flags = Mode; to_unt : Flags -> Unt; from_unt : Unt -> Flags; all : Flags; flags : List(Flags ) -> Flags; intersect : List(Flags ) -> Flags; clear : (Flags , Flags) -> Flags; all_set : (Flags , Flags) -> Bool; any_set : (Flags , Flags) -> Bool; irwxu : Mode; irusr : Mode; iwusr : Mode; ixusr : Mode; irwxg : Mode; irgrp : Mode; iwgrp : Mode; ixgrp : Mode; irwxo : Mode; iroth : Mode; iwoth : Mode; ixoth : Mode; isuid : Mode; isgid : Mode;};; mode_0755 : s::Mode; mode_0700 : s::Mode; mode_0666 : s::Mode; mode_0644 : s::Mode; mode_0600 : s::Mode; package o : api { eqtype Flags; to_unt : Flags -> Unt; from_unt : Unt -> Flags; all : Flags; flags : List(Flags ) -> Flags; intersect : List(Flags ) -> Flags; clear : (Flags , Flags) -> Flags; all_set : (Flags , Flags) -> Bool; any_set : (Flags , Flags) -> Bool; append : Flags; dsync : Flags; excl : Flags; noctty : Flags; nonblock : Flags; rsync : Flags; sync : Flags; trunc : Flags;};; Open_Mode = O_RDONLY | O_RDWR | O_WRONLY; openf : (String , Open_Mode , o::Flags) -> File_Descriptor; createf : (String , Open_Mode , o::Flags , s::Mode) -> File_Descriptor; creat : (String , s::Mode) -> File_Descriptor; umask : s::Mode -> s::Mode; link : {new:String, old:String} -> Void; mkstemp : Void -> File_Descriptor; mkdir : (String , s::Mode) -> Void; make_named_pipe : (String , s::Mode) -> Void; unlink : String -> Void; rmdir : String -> Void; rename : {from:String, to:String} -> Void; symlink : {new:String, old:String} -> Void; readlink : String -> String; ftruncate : (File_Descriptor , Int) -> Void; eqtype Device; unt_to_dev : Unt -> Device; dev_to_unt : Device -> Unt; eqtype Inode; unt_to_ino : Unt -> Inode; ino_to_unt : Inode -> Unt; package stat : api { Stat = {atime:time::Time, ctime:time::Time, dev:Int, ftype:Int, gid:Unt, inode:Int, mode:s::Flags, mtime:time::Time, nlink:Int, size:Int, uid:Unt}; is_directory : Stat -> Bool; is_char_dev : Stat -> Bool; is_block_dev : Stat -> Bool; is_file : Stat -> Bool; is_pipe : Stat -> Bool; is_symlink : Stat -> Bool; is_socket : Stat -> Bool; mode : Stat -> s::Mode; inode : Stat -> Int; dev : Stat -> Int; nlink : Stat -> Int; uid : Stat -> User_Id; gid : Stat -> Group_Id; size : Stat -> Int; atime : Stat -> time::Time; mtime : Stat -> time::Time; ctime : Stat -> time::Time;};; stat : String -> stat::Stat; lstat : String -> stat::Stat; fstat : File_Descriptor -> stat::Stat; Access_Mode = MAY_EXECUTE | MAY_READ | MAY_WRITE; access : (String , List(Access_Mode )) -> Bool; chmod : (String , s::Mode) -> Void; fchmod : (File_Descriptor , s::Mode) -> Void; chown : (String , User_Id , Group_Id) -> Void; fchown : (File_Descriptor , User_Id , Group_Id) -> Void; utime : (String , Null_Or({actime:time::Time, modtime:time::Time} )) -> Void; pathconf : (String , String) -> Null_Or(Unt ); fpathconf : (File_Descriptor , String) -> Null_Or(Unt ); osval3__syscall : String -> Int; set__osval3__ref : ({fun_name:String, io_call:String -> Int, lib_name:String} -> String -> Int) -> Void; Ckit_Dirstream = runtime::Chunk; opendir__syscall : String -> Ckit_Dirstream; set__opendir__ref : ({fun_name:String, io_call:String -> Ckit_Dirstream, lib_name:String} -> String -> Ckit_Dirstream) -> Void; readdir__syscall : Ckit_Dirstream -> String; set__readdir__ref : ({fun_name:String, io_call:Ckit_Dirstream -> String, lib_name:String} -> Ckit_Dirstream -> String) -> Void; rewinddir__syscall : Ckit_Dirstream -> Void; set__rewinddir__ref : ({fun_name:String, io_call:Ckit_Dirstream -> Void, lib_name:String} -> Ckit_Dirstream -> Void) -> Void; closedir__syscall : Ckit_Dirstream -> Void; set__closedir__ref : ({fun_name:String, io_call:Ckit_Dirstream -> Void, lib_name:String} -> Ckit_Dirstream -> Void) -> Void; change_directory__syscall : String -> Void; set__change_directory__ref : ({fun_name:String, io_call:String -> Void, lib_name:String} -> String -> Void) -> Void; current_directory__syscall : Void -> String; set__current_directory__ref : ({fun_name:String, io_call:Void -> String, lib_name:String} -> Void -> String) -> Void; openf__syscall : (String , Unt , Unt) -> Int; set__openf__ref : ( {fun_name:String, io_call:(String , Unt , Unt) -> Int, lib_name:String} -> (String , Unt , Unt) -> Int ) -> Void; mkstemp__syscall : Void -> Int; set__mkstemp__ref : ({fun_name:String, io_call:Void -> Int, lib_name:String} -> Void -> Int) -> Void; umask__syscall : Unt -> Unt; set__umask__ref : ({fun_name:String, io_call:Unt -> Unt, lib_name:String} -> Unt -> Unt) -> Void; link__syscall : (String , String) -> Void; set__link__ref : ({fun_name:String, io_call:(String , String) -> Void, lib_name:String} -> (String , String) -> Void) -> Void; rename__syscall : (String , String) -> Void; set__rename__ref : ({fun_name:String, io_call:(String , String) -> Void, lib_name:String} -> (String , String) -> Void) -> Void; symlink__syscall : (String , String) -> Void; set__symlink__ref : ({fun_name:String, io_call:(String , String) -> Void, lib_name:String} -> (String , String) -> Void) -> Void; mkdir__syscall : (String , Unt) -> Void; set__mkdir__ref : ({fun_name:String, io_call:(String , Unt) -> Void, lib_name:String} -> (String , Unt) -> Void) -> Void; make_named_pipe__syscall : (String , Unt) -> Void; set__make_named_pipe__ref : ({fun_name:String, io_call:(String , Unt) -> Void, lib_name:String} -> (String , Unt) -> Void) -> Void; unlink__syscall : String -> Void; set__unlink__ref : ({fun_name:String, io_call:String -> Void, lib_name:String} -> String -> Void) -> Void; rmdir__syscall : String -> Void; set__rmdir__ref : ({fun_name:String, io_call:String -> Void, lib_name:String} -> String -> Void) -> Void; readlink__syscall : String -> String; set__readlink__ref : ({fun_name:String, io_call:String -> String, lib_name:String} -> String -> String) -> Void; ftruncate__syscall : (Int , Int) -> Void; set__ftruncate__ref : ({fun_name:String, io_call:(Int , Int) -> Void, lib_name:String} -> (Int , Int) -> Void) -> Void; Statrep = ( Int , Unt , Unt , Unt , Unt , Unt , Unt , Int , one_word_int::Int , one_word_int::Int , one_word_int::Int ); stat__syscall : String -> Statrep; set__stat__ref : ({fun_name:String, io_call:String -> Statrep, lib_name:String} -> String -> Statrep) -> Void; lstat__syscall : String -> Statrep; set__lstat__ref : ({fun_name:String, io_call:String -> Statrep, lib_name:String} -> String -> Statrep) -> Void; fstat__syscall : Int -> Statrep; set__fstat__ref : ({fun_name:String, io_call:Int -> Statrep, lib_name:String} -> Int -> Statrep) -> Void; access__syscall : (String , Unt) -> Bool; set__access__ref : ({fun_name:String, io_call:(String , Unt) -> Bool, lib_name:String} -> (String , Unt) -> Bool) -> Void; chmod__syscall : (String , Unt) -> Void; set__chmod__ref : ({fun_name:String, io_call:(String , Unt) -> Void, lib_name:String} -> (String , Unt) -> Void) -> Void; fchmod__syscall : (Int , Unt) -> Void; set__fchmod__ref : ({fun_name:String, io_call:(Int , Unt) -> Void, lib_name:String} -> (Int , Unt) -> Void) -> Void; chown__syscall : (String , Unt , Unt) -> Void; set__chown__ref : ( {fun_name:String, io_call:(String , Unt , Unt) -> Void, lib_name:String} -> (String , Unt , Unt) -> Void ) -> Void; fchown__syscall : (Int , Unt , Unt) -> Void; set__fchown__ref : ({fun_name:String, io_call:(Int , Unt , Unt) -> Void, lib_name:String} -> (Int , Unt , Unt) -> Void) -> Void; utime__syscall : (String , one_word_int::Int , one_word_int::Int) -> Void; set__utime__ref : ( {fun_name:String, io_call:(String , one_word_int::Int , one_word_int::Int) -> Void, lib_name:String} -> (String , one_word_int::Int , one_word_int::Int) -> Void ) -> Void; pathconf__syscall : (String , String) -> Null_Or(Unt ); set__pathconf__ref : ( {fun_name:String, io_call:(String , String) -> Null_Or(Unt ), lib_name:String} -> (String , String) -> Null_Or(Unt ) ) -> Void; fpathconf__syscall : (Int , String) -> Null_Or(Unt ); set__fpathconf__ref : ( {fun_name:String, io_call:(Int , String) -> Null_Or(Unt ), lib_name:String} -> (Int , String) -> Null_Or(Unt ) ) -> Void; make_pipe : Void -> {infd:File_Descriptor, outfd:File_Descriptor}; make_pipe__without_syscall_redirection : Void -> {infd:File_Descriptor, outfd:File_Descriptor}; dup : File_Descriptor -> File_Descriptor; dup2 : {new:File_Descriptor, old:File_Descriptor} -> Void; dup2__without_syscall_redirection : {new:File_Descriptor, old:File_Descriptor} -> Void; close : File_Descriptor -> Void; close__without_syscall_redirection : File_Descriptor -> Void; copy_file : {from:String, to:String} -> Int; file_contents_are_identical : (String , String) -> Bool; read_as_vector : {file_descriptor:File_Descriptor, max_bytes_to_read:Int} -> vector_of_one_byte_unts::Vector; read_into_buffer : {file_descriptor:File_Descriptor, read_buffer:rw_vector_slice_of_one_byte_unts::Slice} -> Int; stdout_redirect : Ref(Null_Or((String -> Void) ) ); stderr_redirect : Ref(Null_Or((String -> Void) ) ); write_string : (File_Descriptor , String) -> Int; write_vector : (File_Descriptor , vector_slice_of_one_byte_unts::Slice) -> Int; write_rw_vector : (File_Descriptor , rw_vector_slice_of_one_byte_unts::Slice) -> Int; read_as_vector__without_syscall_redirection : {file_descriptor:File_Descriptor, max_bytes_to_read:Int} -> vector_of_one_byte_unts::Vector; read_into_buffer__without_syscall_redirection : {file_descriptor:File_Descriptor, read_buffer:rw_vector_slice_of_one_byte_unts::Slice} -> Int; write_vector__without_syscall_redirection : (File_Descriptor , vector_slice_of_one_byte_unts::Slice) -> Int; write_rw_vector__without_syscall_redirection : (File_Descriptor , rw_vector_slice_of_one_byte_unts::Slice) -> Int; Whence = SEEK_CUR | SEEK_END | SEEK_SET; package fd : api { eqtype Flags; to_unt : Flags -> Unt; from_unt : Unt -> Flags; all : Flags; flags : List(Flags ) -> Flags; intersect : List(Flags ) -> Flags; clear : (Flags , Flags) -> Flags; all_set : (Flags , Flags) -> Bool; any_set : (Flags , Flags) -> Bool; cloexec : Flags;};; package flags : api { eqtype Flags; to_unt : Flags -> Unt; from_unt : Unt -> Flags; all : Flags; flags : List(Flags ) -> Flags; intersect : List(Flags ) -> Flags; clear : (Flags , Flags) -> Flags; all_set : (Flags , Flags) -> Bool; any_set : (Flags , Flags) -> Bool; append : Flags; nonblock : Flags; sync : Flags; rsync : Flags; dsync : Flags;};; dupfd : {base:File_Descriptor, old:File_Descriptor} -> File_Descriptor; getfd : File_Descriptor -> fd::Flags; setfd : (File_Descriptor , fd::Flags) -> Void; setfd__without_syscall_redirection : (File_Descriptor , fd::Flags) -> Void; getfl : File_Descriptor -> (flags::Flags , ?.posix_common::Open_Mode); setfl : (File_Descriptor , flags::Flags) -> Void; lseek : (File_Descriptor , Int , Whence) -> Int; fsync : File_Descriptor -> Void; Lock_Type = F_RDLCK | F_UNLCK | F_WRLCK; package flock : api { Flock; flock : {len:Int, locktype:Lock_Type, pid:Null_Or(Process_Id ), start:Int, whence:Whence} -> Flock; locktype : Flock -> Lock_Type; whence : Flock -> Whence; start : Flock -> Int; len : Flock -> Int; pid : Flock -> Null_Or(Process_Id );};; getlk : (File_Descriptor , flock::Flock) -> flock::Flock; setlk : (File_Descriptor , flock::Flock) -> flock::Flock; setlkw : (File_Descriptor , flock::Flock) -> flock::Flock; make_data_filereader : {file_descriptor:File_Descriptor, filename:String, ok_to_block:Bool} -> winix_base_data_file_io_driver_for_posix__premicrothread::Filereader; make_text_filereader : {file_descriptor:File_Descriptor, filename:String, ok_to_block:Bool} -> winix_base_text_file_io_driver_for_posix__premicrothread::Filereader; make_data_filewriter : {append_mode:Bool, best_io_quantum:Int, file_descriptor:File_Descriptor, filename:String, ok_to_block:Bool} -> winix_base_data_file_io_driver_for_posix__premicrothread::Filewriter; make_text_filewriter : {append_mode:Bool, best_io_quantum:Int, file_descriptor:File_Descriptor, filename:String, ok_to_block:Bool} -> winix_base_text_file_io_driver_for_posix__premicrothread::Filewriter; Sy_Int = Int; Sy_Unt = Unt; osval2__syscall : String -> Sy_Int; set__osval2__ref : ({fun_name:String, io_call:String -> Sy_Int, lib_name:String} -> String -> Sy_Int) -> Void; make_pipe__syscall : Void -> (Sy_Int , Sy_Int); set__make_pipe__ref : ({fun_name:String, io_call:Void -> (Sy_Int , Sy_Int), lib_name:String} -> Void -> (Sy_Int , Sy_Int)) -> Void; dup__syscall : Sy_Int -> Sy_Int; set__dup__ref : ({fun_name:String, io_call:Sy_Int -> Sy_Int, lib_name:String} -> Sy_Int -> Sy_Int) -> Void; dup2__syscall : (Sy_Int , Sy_Int) -> Void; set__dup2__ref : ({fun_name:String, io_call:(Sy_Int , Sy_Int) -> Void, lib_name:String} -> (Sy_Int , Sy_Int) -> Void) -> Void; close__syscall : Sy_Int -> Void; set__close__ref : ({fun_name:String, io_call:Sy_Int -> Void, lib_name:String} -> Sy_Int -> Void) -> Void; read__syscall : (Int , Int) -> vector_of_one_byte_unts::Vector; set__read__ref : ( {fun_name:String, io_call:(Int , Int) -> vector_of_one_byte_unts::Vector, lib_name:String} -> (Int , Int) -> vector_of_one_byte_unts::Vector ) -> Void; readbuf__syscall : (Int , rw_vector_of_one_byte_unts::Rw_Vector , Int , Int) -> Int; set__readbuf__ref : ( {fun_name:String, io_call:(Int , rw_vector_of_one_byte_unts::Rw_Vector , Int , Int) -> Int, lib_name:String} -> (Int , rw_vector_of_one_byte_unts::Rw_Vector , Int , Int) -> Int ) -> Void; write_ro_slice__syscall : (Int , vector_of_one_byte_unts::Vector , Int , Int) -> Int; set__write_ro_slice__ref : ( {fun_name:String, io_call:(Int , vector_of_one_byte_unts::Vector , Int , Int) -> Int, lib_name:String} -> (Int , vector_of_one_byte_unts::Vector , Int , Int) -> Int ) -> Void; write_rw_slice__syscall : (Int , rw_vector_of_one_byte_unts::Rw_Vector , Int , Int) -> Int; set__write_rw_slice__ref : ( {fun_name:String, io_call:(Int , rw_vector_of_one_byte_unts::Rw_Vector , Int , Int) -> Int, lib_name:String} -> (Int , rw_vector_of_one_byte_unts::Rw_Vector , Int , Int) -> Int ) -> Void; fcntl_d__syscall : (Sy_Int , Sy_Int) -> Sy_Int; set__fcntl_d__ref : ( {fun_name:String, io_call:(Sy_Int , Sy_Int) -> Sy_Int, lib_name:String} -> (Sy_Int , Sy_Int) -> Sy_Int ) -> Void; fcntl_gfd__syscall : Sy_Int -> Sy_Unt; set__fcntl_gfd__ref : ({fun_name:String, io_call:Sy_Int -> Sy_Unt, lib_name:String} -> Sy_Int -> Sy_Unt) -> Void; fcntl_sfd__syscall : (Sy_Int , Sy_Unt) -> Void; set__fcntl_sfd__ref : ({fun_name:String, io_call:(Sy_Int , Sy_Unt) -> Void, lib_name:String} -> (Sy_Int , Sy_Unt) -> Void) -> Void; fcntl_gfl__syscall : Sy_Int -> (Sy_Unt , Sy_Unt); set__fcntl_gfl__ref : ( {fun_name:String, io_call:Sy_Int -> (Sy_Unt , Sy_Unt), lib_name:String} -> Sy_Int -> (Sy_Unt , Sy_Unt) ) -> Void; fcntl_sfl__syscall : (Sy_Int , Sy_Unt) -> Void; set__fcntl_sfl__ref : ({fun_name:String, io_call:(Sy_Int , Sy_Unt) -> Void, lib_name:String} -> (Sy_Int , Sy_Unt) -> Void) -> Void; Flock_Rep = (Sy_Int , Sy_Int , Int , Int , Sy_Int); fcntl_l__syscall : (Sy_Int , Sy_Int , Flock_Rep) -> Flock_Rep; set__fcntl_l__ref : ( {fun_name:String, io_call:(Sy_Int , Sy_Int , Flock_Rep) -> Flock_Rep, lib_name:String} -> (Sy_Int , Sy_Int , Flock_Rep) -> Flock_Rep ) -> Void; lseek__syscall : (Sy_Int , Int , Sy_Int) -> Int; set__lseek__ref : ( {fun_name:String, io_call:(Sy_Int , Int , Sy_Int) -> Int, lib_name:String} -> (Sy_Int , Int , Sy_Int) -> Int ) -> Void; fsync__syscall : Sy_Int -> Void; set__fsync__ref : ({fun_name:String, io_call:Sy_Int -> Void, lib_name:String} -> Sy_Int -> Void) -> Void; package passwd : api { Passwd; name : Passwd -> String; uid : Passwd -> User_Id; gid : Passwd -> Group_Id; home : Passwd -> String; shell : Passwd -> String;};; package group : api { Group; name : Group -> String; gid : Group -> Group_Id; members : Group -> List(String );};; getgrgid : Group_Id -> group::Group; getgrnam : String -> group::Group; getpwuid : User_Id -> passwd::Passwd; getpwnam : String -> passwd::Passwd; Unt = Unt; getgrgid__syscall : Unt -> (String , Unt , List(String )); set__getgrgid__ref : ( {fun_name:String, io_call:Unt -> (String , Unt , List(String )), lib_name:String} -> Unt -> (String , Unt , List(String )) ) -> Void; getgrnam__syscall : String -> (String , Unt , List(String )); set__getgrnam__ref : ( {fun_name:String, io_call:String -> (String , Unt , List(String )), lib_name:String} -> String -> (String , Unt , List(String )) ) -> Void; getpwuid__syscall : Unt -> (String , Unt , Unt , String , String); set__getpwuid__ref : ( {fun_name:String, io_call:Unt -> (String , Unt , Unt , String , String), lib_name:String} -> Unt -> (String , Unt , Unt , String , String) ) -> Void; getpwnam__syscall : String -> (String , Unt , Unt , String , String); set__getpwnam__ref : ( {fun_name:String, io_call:String -> (String , Unt , Unt , String , String), lib_name:String} -> String -> (String , Unt , Unt , String , String) ) -> Void; uid_to_unt : User_Id -> Unt; unt_to_uid : Unt -> User_Id; gid_to_unt : Group_Id -> Unt; unt_to_gid : Unt -> Group_Id; get_process_id : Void -> Int; get_process_id' : Void -> Process_Id; get_parent_process_id : Void -> Int; get_parent_process_id' : Void -> Process_Id; get_user_id : Void -> Int; get_user_id' : Void -> User_Id; get_effective_user_id : Void -> Int; get_effective_user_id' : Void -> User_Id; get_group_id : Void -> Int; get_group_id' : Void -> Group_Id; get_effective_group_id : Void -> Int; get_effective_group_id' : Void -> Group_Id; set_user_id : Int -> Void; set_user_id' : User_Id -> Void; set_group_id : Int -> Void; set_group_id' : Group_Id -> Void; get_group_ids : Void -> List(Int ); get_group_ids' : Void -> List(Group_Id ); get_login : Void -> String; get_process_group : Void -> Int; get_process_group' : Void -> Process_Id; set_session_id : Void -> Int; set_session_id' : Void -> Process_Id; set_process_group_id : (Int , Int) -> Void; set_process_group_id' : {pgid:Null_Or(Process_Id ), pid:Null_Or(Process_Id )} -> Void; get_kernel_info : Void -> List(((String , String)) ); get_elapsed_seconds_since_1970 : Void -> one_word_int::Int; get_elapsed_seconds_since_1970' : Void -> time::Time; times : Void -> {cstime:time::Time, cutime:time::Time, elapsed:time::Time, stime:time::Time, utime:time::Time}; getenv : String -> Null_Or(String ); environment : Void -> List(String ); get_name_of_controlling_terminal : Void -> String; get_name_of_terminal : File_Descriptor -> String; is_a_terminal : File_Descriptor -> Bool; sysconf : String -> Unt; get_process_id__syscall : Void -> Int; set__get_process_id__ref : ({fun_name:String, io_call:Void -> Int, lib_name:String} -> Void -> Int) -> Void; get_parent_process_id__syscall : Void -> Int; set__get_parent_process_id__ref : ({fun_name:String, io_call:Void -> Int, lib_name:String} -> Void -> Int) -> Void; get_user_id__syscall : Void -> Int; set__get_user_id__ref : ({fun_name:String, io_call:Void -> Int, lib_name:String} -> Void -> Int) -> Void; get_effective_user_id__syscall : Void -> Int; set__get_effective_user_id__ref : ({fun_name:String, io_call:Void -> Int, lib_name:String} -> Void -> Int) -> Void; get_group_id__syscall : Void -> Int; set__get_group_id__ref : ({fun_name:String, io_call:Void -> Int, lib_name:String} -> Void -> Int) -> Void; get_effective_group_id__syscall : Void -> Int; set__get_effective_group_id__ref : ({fun_name:String, io_call:Void -> Int, lib_name:String} -> Void -> Int) -> Void; set_user_id__syscall : Int -> Void; set__set_user_id__ref : ({fun_name:String, io_call:Int -> Void, lib_name:String} -> Int -> Void) -> Void; set_group_id__syscall : Int -> Void; set__set_group_id__ref : ({fun_name:String, io_call:Int -> Void, lib_name:String} -> Int -> Void) -> Void; get_group_ids__syscall : Void -> List(Int ); set__get_group_ids__ref : ({fun_name:String, io_call:Void -> List(Int ), lib_name:String} -> Void -> List(Int )) -> Void; get_login__syscall : Void -> String; set__get_login__ref : ({fun_name:String, io_call:Void -> String, lib_name:String} -> Void -> String) -> Void; get_process_group__syscall : Void -> Int; set__get_process_group__ref : ({fun_name:String, io_call:Void -> Int, lib_name:String} -> Void -> Int) -> Void; set_session_id__syscall : Void -> Int; set__set_session_id__ref : ({fun_name:String, io_call:Void -> Int, lib_name:String} -> Void -> Int) -> Void; set_process_group_id__syscall : (Int , Int) -> Void; set__set_process_group_id__ref : ({fun_name:String, io_call:(Int , Int) -> Void, lib_name:String} -> (Int , Int) -> Void) -> Void; get_kernel_info__syscall : Void -> List(((String , String)) ); set__get_kernel_info__ref : ( {fun_name:String, io_call:Void -> List(((String , String)) ), lib_name:String} -> Void -> List(((String , String)) ) ) -> Void; get_elapsed_seconds_since_1970__syscall : Void -> one_word_int::Int; set__get_elapsed_seconds_since_1970__ref : ({fun_name:String, io_call:Void -> one_word_int::Int, lib_name:String} -> Void -> one_word_int::Int) -> Void; times__syscall : Void -> (one_word_int::Int , one_word_int::Int , one_word_int::Int , one_word_int::Int , one_word_int::Int); set__times__ref : ( {fun_name:String, io_call: Void -> (one_word_int::Int , one_word_int::Int , one_word_int::Int , one_word_int::Int , one_word_int::Int) , lib_name:String} -> Void -> (one_word_int::Int , one_word_int::Int , one_word_int::Int , one_word_int::Int , one_word_int::Int) ) -> Void; getenv__syscall : String -> Null_Or(String ); set__getenv__ref : ({fun_name:String, io_call:String -> Null_Or(String ), lib_name:String} -> String -> Null_Or(String )) -> Void; environment__syscall : Void -> List(String ); set__environment__ref : ({fun_name:String, io_call:Void -> List(String ), lib_name:String} -> Void -> List(String )) -> Void; get_name_of_controlling_terminal__syscall : Void -> String; set__get_name_of_controlling_terminal__ref : ({fun_name:String, io_call:Void -> String, lib_name:String} -> Void -> String) -> Void; get_name_of_terminal__syscall : Int -> String; set__get_name_of_terminal__ref : ({fun_name:String, io_call:Int -> String, lib_name:String} -> Int -> String) -> Void; is_a_terminal__syscall : Int -> Bool; set__is_a_terminal__ref : ({fun_name:String, io_call:Int -> Bool, lib_name:String} -> Int -> Bool) -> Void;};
The following information is manually maintained and may contain errors.
The Posixlib api is implemented by the posixlib package.
The Posixlib api source code is in src/lib/std/src/psx/posixlib.api.