posix

Search:
Group by:

This is a raw POSIX interface module. It does not not provide any convenience: cstrings are used instead of proper Nim strings and return codes indicate errors. If you want exceptions and a proper Nim-like interface, use the OS module or write a wrapper.

Coding conventions: ALL types are named the same as in the POSIX standard except that they start with 'T' or 'P' (if they are pointers) and without the '_t' suffix to be consistent with Nim conventions. If an identifier is a Nim keyword the `identifier` notation is used.

This library relies on the header files of your C compiler. The resulting C code will just #include <XYZ.h> and not define the symbols declared here.

Types

DIR {...}{.importc: "DIR", header: "<dirent.h>", incompleteStruct.} = object
  
A type representing a directory stream.   Source Edit
SocketHandle = distinct cint
  Source Edit
Time {...}{.importc: "time_t", header: "<time.h>".} = distinct clong
  Source Edit
Timespec {...}{.importc: "struct timespec", header: "<time.h>", final, pure.} = object
  tv_sec*: Time                ## Seconds.
  tv_nsec*: int                ## Nanoseconds.
  
struct timespec   Source Edit
Dirent {...}{.importc: "struct dirent", header: "<dirent.h>", final, pure.} = object
  when defined(haiku):
      d_dev*: Dev              ## Device (not POSIX)
      d_pdev*: Dev             ## Parent device (only for queries) (not POSIX)
    
  d_ino*: Ino                  ## File serial number.
  when defined(dragonfly):
      d_type*: uint8

  elif true or false:
      d_reclen*: cshort        ## Length of this record. (not POSIX)
      d_type*: int8 ## Type of file; not supported by all filesystem types.
                  ## (not POSIX)
      when false or false:
          d_off*: Off          ## Not an offset. Value that ``telldir()`` would return.
        
    
  elif defined(haiku):
      d_pino*: Ino             ## Parent inode (only for queries) (not POSIX)
      d_reclen*: cushort       ## Length of this record. (not POSIX)
    
  d_name*: array[0 .. 255, char]  ## Name of entry.
  
dirent_t struct   Source Edit
Tflock {...}{.importc: "struct flock", final, pure, header: "<fcntl.h>".} = object
  l_type*: cshort              ## Type of lock; F_RDLCK, F_WRLCK, F_UNLCK.
  l_whence*: cshort            ## Flag for starting offset.
  l_start*: Off                ## Relative offset in bytes.
  l_len*: Off                  ## Size; if 0 then until EOF.
  l_pid*: Pid                  ## Process ID of the process holding the lock;
            ## returned with F_GETLK.
  
flock type   Source Edit
FTW {...}{.importc: "struct FTW", header: "<ftw.h>", final, pure.} = object
  base*: cint
  level*: cint
  Source Edit
Glob {...}{.importc: "glob_t", header: "<glob.h>", final, pure.} = object
  gl_pathc*: int               ## Count of paths matched by pattern.
  gl_pathv*: cstringArray      ## Pointer to a list of matched pathnames.
  gl_offs*: int                ## Slots to reserve at the beginning of gl_pathv.
  
glob_t   Source Edit
Group {...}{.importc: "struct group", header: "<grp.h>", final, pure.} = object
  gr_name*: cstring            ## The name of the group.
  gr_gid*: Gid                 ## Numerical group ID.
  gr_mem*: cstringArray        ## Pointer to a null-terminated array of character
                      ## pointers to member names.
  
struct group   Source Edit
Iconv {...}{.importc: "iconv_t", header: "<iconv.h>", final, pure.} = object
Identifies the conversion from one codeset to another.   Source Edit
Lconv {...}{.importc: "struct lconv", header: "<locale.h>", final, pure.} = object
  currency_symbol*: cstring
  decimal_point*: cstring
  frac_digits*: char
  grouping*: cstring
  int_curr_symbol*: cstring
  int_frac_digits*: char
  int_n_cs_precedes*: char
  int_n_sep_by_space*: char
  int_n_sign_posn*: char
  int_p_cs_precedes*: char
  int_p_sep_by_space*: char
  int_p_sign_posn*: char
  mon_decimal_point*: cstring
  mon_grouping*: cstring
  mon_thousands_sep*: cstring
  negative_sign*: cstring
  n_cs_precedes*: char
  n_sep_by_space*: char
  n_sign_posn*: char
  positive_sign*: cstring
  p_cs_precedes*: char
  p_sep_by_space*: char
  p_sign_posn*: char
  thousands_sep*: cstring
  Source Edit
Mqd {...}{.importc: "mqd_t", header: "<mqueue.h>", final, pure.} = object
  Source Edit
MqAttr {...}{.importc: "struct mq_attr", header: "<mqueue.h>", final, pure.} = object
  mq_flags*: int               ## Message queue flags.
  mq_maxmsg*: int              ## Maximum number of messages.
  mq_msgsize*: int             ## Maximum message size.
  mq_curmsgs*: int             ## Number of messages currently queued.
  
message queue attribute   Source Edit
Passwd {...}{.importc: "struct passwd", header: "<pwd.h>", final, pure.} = object
  pw_name*: cstring            ## User's login name.
  pw_uid*: Uid                 ## Numerical user ID.
  pw_gid*: Gid                 ## Numerical group ID.
  pw_dir*: cstring             ## Initial working directory.
  pw_shell*: cstring           ## Program to use as shell.
  
struct passwd   Source Edit
Blkcnt {...}{.importc: "blkcnt_t", header: "<sys/types.h>".} = int
used for file block counts   Source Edit
Blksize {...}{.importc: "blksize_t", header: "<sys/types.h>".} = int32
used for block sizes   Source Edit
Clock {...}{.importc: "clock_t", header: "<sys/types.h>".} = int
  Source Edit
ClockId {...}{.importc: "clockid_t", header: "<sys/types.h>".} = int
  Source Edit
Dev {...}{.importc: "dev_t", header: "<sys/types.h>".} = int32
  Source Edit
Fsblkcnt {...}{.importc: "fsblkcnt_t", header: "<sys/types.h>".} = int
  Source Edit
Fsfilcnt {...}{.importc: "fsfilcnt_t", header: "<sys/types.h>".} = int
  Source Edit
Gid {...}{.importc: "gid_t", header: "<sys/types.h>".} = int32
  Source Edit
Id {...}{.importc: "id_t", header: "<sys/types.h>".} = int
  Source Edit
Ino {...}{.importc: "ino_t", header: "<sys/types.h>".} = int
  Source Edit
Key {...}{.importc: "key_t", header: "<sys/types.h>".} = int
  Source Edit
Mode {...}{.importc: "mode_t", header: "<sys/types.h>".} = int16
  Source Edit
Nlink {...}{.importc: "nlink_t", header: "<sys/types.h>".} = int16
  Source Edit
Off {...}{.importc: "off_t", header: "<sys/types.h>".} = int64
  Source Edit
Pid {...}{.importc: "pid_t", header: "<sys/types.h>".} = int32
  Source Edit
Pthread_attr {...}{.importc: "pthread_attr_t", header: "<sys/types.h>".} = int
  Source Edit
Pthread_barrier {...}{.importc: "pthread_barrier_t", header: "<sys/types.h>".} = int
  Source Edit
Pthread_barrierattr {...}{.importc: "pthread_barrierattr_t", header: "<sys/types.h>".} = int
  Source Edit
Pthread_cond {...}{.importc: "pthread_cond_t", header: "<sys/types.h>".} = int
  Source Edit
Pthread_condattr {...}{.importc: "pthread_condattr_t", header: "<sys/types.h>".} = int
  Source Edit
Pthread_key {...}{.importc: "pthread_key_t", header: "<sys/types.h>".} = int
  Source Edit
Pthread_mutex {...}{.importc: "pthread_mutex_t", header: "<sys/types.h>".} = int
  Source Edit
Pthread_mutexattr {...}{.importc: "pthread_mutexattr_t", header: "<sys/types.h>".} = int
  Source Edit
Pthread_once {...}{.importc: "pthread_once_t", header: "<sys/types.h>".} = int
  Source Edit
Pthread_rwlock {...}{.importc: "pthread_rwlock_t", header: "<sys/types.h>".} = int
  Source Edit
Pthread_rwlockattr {...}{.importc: "pthread_rwlockattr_t", header: "<sys/types.h>".} = int
  Source Edit
Pthread_spinlock {...}{.importc: "pthread_spinlock_t", header: "<sys/types.h>".} = int
  Source Edit
Pthread {...}{.importc: "pthread_t", header: "<sys/types.h>".} = int
  Source Edit
Suseconds {...}{.importc: "suseconds_t", header: "<sys/types.h>".} = int32
  Source Edit
Timer {...}{.importc: "timer_t", header: "<sys/types.h>".} = int
  Source Edit
Trace_attr {...}{.importc: "trace_attr_t", header: "<sys/types.h>".} = int
  Source Edit
Trace_event_id {...}{.importc: "trace_event_id_t", header: "<sys/types.h>".} = int
  Source Edit
Trace_event_set {...}{.importc: "trace_event_set_t", header: "<sys/types.h>".} = int
  Source Edit
Trace_id {...}{.importc: "trace_id_t", header: "<sys/types.h>".} = int
  Source Edit
Uid {...}{.importc: "uid_t", header: "<sys/types.h>".} = int32
  Source Edit
Useconds {...}{.importc: "useconds_t", header: "<sys/types.h>".} = int
  Source Edit
Utsname {...}{.importc: "struct utsname", header: "<sys/utsname.h>", final, pure.} = object
  sysname*,                   ## Name of the hardware type on which the
           ## system is running.
  ## Name of this implementation of the operating system.
  nodename*,                  ## Name of this node within the communications
            ## network to which this node is attached, if any.
  release*,                   ## Current release level of this implementation.
  version*,                   ## Current version level of this release.
  machine*: array[0 .. 255, char]
struct utsname   Source Edit
Sem {...}{.importc: "sem_t", header: "<semaphore.h>", final, pure.} = object
  Source Edit
Ipc_perm {...}{.importc: "struct ipc_perm", header: "<sys/ipc.h>", final, pure.} = object
  uid*: Uid                    ## Owner's user ID.
  gid*: Gid                    ## Owner's group ID.
  cuid*: Uid                   ## Creator's user ID.
  cgid*: Gid                   ## Creator's group ID.
  mode*: Mode                  ## Read/write permission.
  
struct ipc_perm   Source Edit
Stat {...}{.importc: "struct stat", header: "<sys/stat.h>", final, pure.} = object
  st_dev*: Dev                 ## Device ID of device containing file.
  st_ino*: Ino                 ## File serial number.
  st_mode*: Mode               ## Mode of file (see below).
  st_nlink*: Nlink             ## Number of hard links to the file.
  st_uid*: Uid                 ## User ID of file.
  st_gid*: Gid                 ## Group ID of file.
  st_rdev*: Dev                ## Device ID (if file is character or block special).
  st_size*: Off                ## For regular files, the file size in bytes.
              ## For symbolic links, the length in bytes of the
              ## pathname contained in the symbolic link.
              ## For a shared memory object, the length in bytes.
              ## For a typed memory object, the length in bytes.
              ## For other file types, the use of this field is
              ## unspecified.
  when StatHasNanoseconds:
      st_atim*: Timespec       ## Time of last access.
      st_mtim*: Timespec       ## Time of last data modification.
      st_ctim*: Timespec       ## Time of last status change.
    
  else:
      st_atime*: Time          ## Time of last access.
      st_mtime*: Time          ## Time of last data modification.
      st_ctime*: Time          ## Time of last status change.
    
  st_blksize*: Blksize         ## A file system-specific preferred I/O block size
                     ## for this object. In some file system types, this
                     ## may vary from file to file.
  st_blocks*: Blkcnt           ## Number of blocks allocated for this object.
  
struct stat   Source Edit
Statvfs {...}{.importc: "struct statvfs", header: "<sys/statvfs.h>", final, pure.} = object
  f_bsize*: int                ## File system block size.
  f_frsize*: int               ## Fundamental file system block size.
  f_blocks*: Fsblkcnt          ## Total number of blocks on file system
                    ## in units of f_frsize.
  f_bfree*: Fsblkcnt           ## Total number of free blocks.
  f_bavail*: Fsblkcnt          ## Number of free blocks available to
                    ## non-privileged process.
  f_files*: Fsfilcnt           ## Total number of file serial numbers.
  f_ffree*: Fsfilcnt           ## Total number of free file serial numbers.
  f_favail*: Fsfilcnt          ## Number of file serial numbers available to
                    ## non-privileged process.
  f_fsid*: int                 ## File system ID.
  f_flag*: int                 ## Bit mask of f_flag values.
  f_namemax*: int              ## Maximum filename length.
  
struct statvfs   Source Edit
Posix_typed_mem_info {...}{.importc: "struct posix_typed_mem_info",
                      header: "<sys/mman.h>", final, pure.} = object
  posix_tmi_length*: int
  Source Edit
Tm {...}{.importc: "struct tm", header: "<time.h>", final, pure.} = object
  tm_sec*: cint                ## Seconds [0,60].
  tm_min*: cint                ## Minutes [0,59].
  tm_hour*: cint               ## Hour [0,23].
  tm_mday*: cint               ## Day of month [1,31].
  tm_mon*: cint                ## Month of year [0,11].
  tm_year*: cint               ## Years since 1900.
  tm_wday*: cint               ## Day of week [0,6] (Sunday =0).
  tm_yday*: cint               ## Day of year [0,365].
  tm_isdst*: cint              ## Daylight Savings flag.
  
struct tm   Source Edit
Itimerspec {...}{.importc: "struct itimerspec", header: "<time.h>", final, pure.} = object
  it_interval*: Timespec       ## Timer period.
  it_value*: Timespec          ## Timer expiration.
  
struct itimerspec   Source Edit
Sig_atomic {...}{.importc: "sig_atomic_t", header: "<signal.h>".} = cint
Possibly volatile-qualified integer type of an object that can be accessed as an atomic entity, even in the presence of asynchronous interrupts.   Source Edit
Sigset {...}{.importc: "sigset_t", header: "<signal.h>", final, pure.} = object
  Source Edit
SigEvent {...}{.importc: "struct sigevent", header: "<signal.h>", final, pure.} = object
  sigev_notify*: cint          ## Notification type.
  sigev_signo*: cint           ## Signal number.
  sigev_value*: SigVal         ## Signal value.
  sigev_notify_function*: proc (x: SigVal) {...}{.noconv.} ## Notification func.
  sigev_notify_attributes*: ptr Pthread_attr ## Notification attributes.
  
struct sigevent   Source Edit
SigVal {...}{.importc: "union sigval", header: "<signal.h>", final, pure.} = object
  sival_ptr*: pointer          ## pointer signal value;
                    ## integer signal value not defined!
  
struct sigval   Source Edit
Sigaction {...}{.importc: "struct sigaction", header: "<signal.h>", final, pure.} = object
  sa_handler*: proc (x: cint) {...}{.noconv.} ## Pointer to a signal-catching
                                    ## function or one of the macros
                                    ## SIG_IGN or SIG_DFL.
  sa_mask*: Sigset             ## Set of signals to be blocked during execution of
                 ## the signal handling function.
  sa_flags*: cint              ## Special flags.
  sa_sigaction*: proc (x: cint; y: ptr SigInfo; z: pointer) {...}{.noconv.}
struct sigaction   Source Edit
Stack {...}{.importc: "stack_t", header: "<signal.h>", final, pure.} = object
  ss_sp*: pointer              ## Stack base or pointer.
  ss_size*: int                ## Stack size.
  ss_flags*: cint              ## Flags.
  
stack_t   Source Edit
SigStack {...}{.importc: "struct sigstack", header: "<signal.h>", final, pure.} = object
  ss_onstack*: cint            ## Non-zero when signal stack is in use.
  ss_sp*: pointer              ## Signal stack pointer.
  
struct sigstack   Source Edit
SigInfo {...}{.importc: "siginfo_t", header: "<signal.h>", final, pure.} = object
  si_signo*: cint              ## Signal number.
  si_code*: cint               ## Signal code.
  si_errno*: cint              ## If non-zero, an errno value associated with
                ## this signal, as defined in <errno.h>.
  si_pid*: Pid                 ## Sending process ID.
  si_uid*: Uid                 ## Real user ID of sending process.
  si_addr*: pointer            ## Address of faulting instruction.
  si_status*: cint             ## Exit value or signal.
  si_band*: int                ## Band event for SIGPOLL.
  si_value*: SigVal            ## Signal value.
  
siginfo_t   Source Edit
Nl_item {...}{.importc: "nl_item", header: "<nl_types.h>".} = cint
  Source Edit
Nl_catd {...}{.importc: "nl_catd", header: "<nl_types.h>".} = cint
  Source Edit
Sched_param {...}{.importc: "struct sched_param", header: "<sched.h>", final, pure.} = object
  sched_priority*: cint
  sched_ss_low_priority*: cint ## Low scheduling priority for
                             ## sporadic server.
  sched_ss_repl_period*: Timespec ## Replenishment period for
                                ## sporadic server.
  sched_ss_init_budget*: Timespec ## Initial budget for sporadic server.
  sched_ss_max_repl*: cint     ## Maximum pending replenishments for
                         ## sporadic server.
  
struct sched_param   Source Edit
Timeval {...}{.importc: "struct timeval", header: "<sys/select.h>", final, pure.} = object
  tv_sec*: Time                ## Seconds.
  tv_usec*: Suseconds          ## Microseconds.
  
struct timeval   Source Edit
TFdSet {...}{.importc: "fd_set", header: "<sys/select.h>", final, pure.} = object
  Source Edit
Mcontext {...}{.importc: "mcontext_t", header: "<ucontext.h>", final, pure.} = object
  Source Edit
Ucontext {...}{.importc: "ucontext_t", header: "<ucontext.h>", final, pure.} = object
  uc_link*: ptr Ucontext        ## Pointer to the context that is resumed
                      ## when this context returns.
  uc_sigmask*: Sigset          ## The set of signals that are blocked when this
                    ## context is active.
  uc_stack*: Stack             ## The stack used by this context.
  uc_mcontext*: Mcontext       ## A machine-specific representation of the saved
                       ## context.
  
ucontext_t   Source Edit
Tposix_spawnattr {...}{.importc: "posix_spawnattr_t", header: "<spawn.h>", final, pure.} = object
  Source Edit
Tposix_spawn_file_actions {...}{.importc: "posix_spawn_file_actions_t",
                           header: "<spawn.h>", final, pure.} = object
  Source Edit
SockLen {...}{.importc: "socklen_t", header: "<sys/socket.h>".} = cuint
  Source Edit
TSa_Family {...}{.importc: "sa_family_t", header: "<sys/socket.h>".} = uint8
  Source Edit
SockAddr {...}{.importc: "struct sockaddr", header: "<sys/socket.h>", pure, final.} = object
  sa_family*: TSa_Family       ## Address family.
  sa_data*: array[0 .. 255, char] ## Socket address (variable-length data).
  
struct sockaddr   Source Edit
Sockaddr_un {...}{.importc: "struct sockaddr_un", header: "<sys/un.h>", pure, final.} = object
  sun_family*: TSa_Family      ## Address family.
  sun_path*: array[0 .. 92 - 1, char] ## Socket path
  
struct sockaddr_un   Source Edit
Sockaddr_storage {...}{.importc: "struct sockaddr_storage", header: "<sys/socket.h>",
                  pure, final.} = object
  ss_family*: TSa_Family       ## Address family.
  
struct sockaddr_storage   Source Edit
Tif_nameindex {...}{.importc: "struct if_nameindex", final, pure, header: "<net/if.h>".} = object
  if_index*: cint              ## Numeric index of the interface.
  if_name*: cstring            ## Null-terminated name of the interface.
  
struct if_nameindex   Source Edit
IOVec {...}{.importc: "struct iovec", pure, final, header: "<sys/uio.h>".} = object
  iov_base*: pointer           ## Base address of a memory region for input or output.
  iov_len*: int                ## The size of the memory pointed to by iov_base.
  
struct iovec   Source Edit
Tmsghdr {...}{.importc: "struct msghdr", pure, final, header: "<sys/socket.h>".} = object
  msg_name*: pointer           ## Optional address.
  msg_namelen*: SockLen        ## Size of address.
  msg_iov*: ptr IOVec           ## Scatter/gather array.
  msg_iovlen*: cint            ## Members in msg_iov.
  msg_control*: pointer        ## Ancillary data; see below.
  msg_controllen*: SockLen     ## Ancillary data buffer len.
  msg_flags*: cint             ## Flags on received message.
  
struct msghdr   Source Edit
Tcmsghdr {...}{.importc: "struct cmsghdr", pure, final, header: "<sys/socket.h>".} = object
  cmsg_len*: SockLen           ## Data byte count, including the cmsghdr.
  cmsg_level*: cint            ## Originating protocol.
  cmsg_type*: cint             ## Protocol-specific type.
  
struct cmsghdr   Source Edit
TLinger {...}{.importc: "struct linger", pure, final, header: "<sys/socket.h>".} = object
  l_onoff*: cint               ## Indicates whether linger option is enabled.
  l_linger*: cint              ## Linger time, in seconds.
  
struct linger   Source Edit
InPort = uint16
  Source Edit
InAddrScalar = uint32
  Source Edit
InAddrT {...}{.importc: "in_addr_t", pure, final, header: "<netinet/in.h>".} = uint32
  Source Edit
InAddr {...}{.importc: "struct in_addr", pure, final, header: "<netinet/in.h>".} = object
  s_addr*: InAddrScalar
struct in_addr   Source Edit
Sockaddr_in {...}{.importc: "struct sockaddr_in", pure, final, header: "<netinet/in.h>".} = object
  sin_family*: TSa_Family      ## AF_INET.
  sin_port*: InPort            ## Port number.
  sin_addr*: InAddr            ## IP address.
  
struct sockaddr_in   Source Edit
In6Addr {...}{.importc: "struct in6_addr", pure, final, header: "<netinet/in.h>".} = object
  s6_addr*: array[0 .. 15, char]
struct in6_addr   Source Edit
Sockaddr_in6 {...}{.importc: "struct sockaddr_in6", pure, final, header: "<netinet/in.h>".} = object
  sin6_family*: TSa_Family     ## AF_INET6.
  sin6_port*: InPort           ## Port number.
  sin6_flowinfo*: int32        ## IPv6 traffic class and flow information.
  sin6_addr*: In6Addr          ## IPv6 address.
  sin6_scope_id*: int32        ## Set of interfaces for a scope.
  
struct sockaddr_in6   Source Edit
Tipv6_mreq {...}{.importc: "struct ipv6_mreq", pure, final, header: "<netinet/in.h>".} = object
  ipv6mr_multiaddr*: In6Addr   ## IPv6 multicast address.
  ipv6mr_interface*: cint      ## Interface index.
  
struct ipv6_mreq   Source Edit
Hostent {...}{.importc: "struct hostent", pure, final, header: "<netdb.h>".} = object
  h_name*: cstring             ## Official name of the host.
  h_aliases*: cstringArray     ## A pointer to an array of pointers to
                         ## alternative host names, terminated by a
                         ## null pointer.
  h_addrtype*: cint            ## Address type.
  h_length*: cint              ## The length, in bytes, of the address.
  h_addr_list*: cstringArray   ## A pointer to an array of pointers to network
                           ## addresses (in network byte order) for the
                           ## host, terminated by a null pointer.
  
struct hostent   Source Edit
Tnetent {...}{.importc: "struct netent", pure, final, header: "<netdb.h>".} = object
  n_name*: cstring             ## Official, fully-qualified (including the
                 ## domain) name of the host.
  n_aliases*: cstringArray     ## A pointer to an array of pointers to
                         ## alternative network names, terminated by a
                         ## null pointer.
  n_addrtype*: cint            ## The address type of the network.
  n_net*: int32                ## The network number, in host byte order.
  
struct netent   Source Edit
Protoent {...}{.importc: "struct protoent", pure, final, header: "<netdb.h>".} = object
  p_name*: cstring             ## Official name of the protocol.
  p_aliases*: cstringArray     ## A pointer to an array of pointers to
                         ## alternative protocol names, terminated by
                         ## a null pointer.
  p_proto*: cint               ## The protocol number.
  
struct protoent   Source Edit
Servent {...}{.importc: "struct servent", pure, final, header: "<netdb.h>".} = object
  s_name*: cstring             ## Official name of the service.
  s_aliases*: cstringArray     ## A pointer to an array of pointers to
                         ## alternative service names, terminated by
                         ## a null pointer.
  s_port*: cint                ## The port number at which the service
              ## resides, in network byte order.
  s_proto*: cstring            ## The name of the protocol to use when
                  ## contacting the service.
  
struct servent   Source Edit
AddrInfo {...}{.importc: "struct addrinfo", pure, final, header: "<netdb.h>".} = object
  ai_flags*: cint              ## Input flags.
  ai_family*: cint             ## Address family of socket.
  ai_socktype*: cint           ## Socket type.
  ai_protocol*: cint           ## Protocol of socket.
  ai_addrlen*: SockLen         ## Length of socket address.
  ai_addr*: ptr SockAddr        ## Socket address of socket.
  ai_canonname*: cstring       ## Canonical name of service location.
  ai_next*: ptr AddrInfo        ## Pointer to next in list.
  
struct addrinfo   Source Edit
TPollfd {...}{.importc: "struct pollfd", pure, final, header: "<poll.h>".} = object
  fd*: cint                    ## The following descriptor being polled.
  events*: cshort              ## The input event flags (see below).
  revents*: cshort             ## The output event flags (see below).
  
struct pollfd   Source Edit
Tnfds {...}{.importc: "nfds_t", header: "<poll.h>".} = cint
  Source Edit
Rusage {...}{.importc: "struct rusage", header: "<sys/resource.h>", bycopy.} = object
  ru_utime*, ru_stime*: Timeval
  ru_maxrss*, ru_ixrss*, ru_idrss*, ru_isrss*, ru_minflt*, ru_majflt*, ru_nswap*,
  ru_inblock*, ru_oublock*, ru_msgsnd*, ru_msgrcv*, ru_nsignals*, ru_nvcsw*,
  ru_nivcsw*: clong
  Source Edit
RLimit {...}{.importc: "struct rlimit", header: "<sys/resource.h>", pure, final.} = object
  rlim_cur*: int
  rlim_max*: int
  Source Edit

Vars

errno: cint
error variable   Source Edit
h_errno: cint
  Source Edit
daylight: cint
  Source Edit
timezone: int
  Source Edit
AIO_ALLDONE: cint
  Source Edit
AIO_CANCELED: cint
  Source Edit
AIO_NOTCANCELED: cint
  Source Edit
LIO_NOP: cint
  Source Edit
LIO_NOWAIT: cint
  Source Edit
LIO_READ: cint
  Source Edit
LIO_WAIT: cint
  Source Edit
LIO_WRITE: cint
  Source Edit
RTLD_LAZY: cint
  Source Edit
RTLD_NOW: cint
  Source Edit
RTLD_GLOBAL: cint
  Source Edit
RTLD_LOCAL: cint
  Source Edit
E2BIG: cint
  Source Edit
EACCES: cint
  Source Edit
EADDRINUSE: cint
  Source Edit
EADDRNOTAVAIL: cint
  Source Edit
EAFNOSUPPORT: cint
  Source Edit
EAGAIN: cint
  Source Edit
EALREADY: cint
  Source Edit
EBADF: cint
  Source Edit
EBADMSG: cint
  Source Edit
EBUSY: cint
  Source Edit
ECANCELED: cint
  Source Edit
ECHILD: cint
  Source Edit
ECONNABORTED: cint
  Source Edit
ECONNREFUSED: cint
  Source Edit
ECONNRESET: cint
  Source Edit
EDEADLK: cint
  Source Edit
EDESTADDRREQ: cint
  Source Edit
EDOM: cint
  Source Edit
EDQUOT: cint
  Source Edit
EEXIST: cint
  Source Edit
EFAULT: cint
  Source Edit
EFBIG: cint
  Source Edit
EHOSTUNREACH: cint
  Source Edit
EIDRM: cint
  Source Edit
EILSEQ: cint
  Source Edit
EINPROGRESS: cint
  Source Edit
EINTR: cint
  Source Edit
EINVAL: cint
  Source Edit
EIO: cint
  Source Edit
EISCONN: cint
  Source Edit
EISDIR: cint
  Source Edit
ELOOP: cint
  Source Edit
EMFILE: cint
  Source Edit
EMLINK: cint
  Source Edit
EMSGSIZE: cint
  Source Edit
EMULTIHOP: cint
  Source Edit
ENAMETOOLONG: cint
  Source Edit
ENETDOWN: cint
  Source Edit
ENETRESET: cint
  Source Edit
ENETUNREACH: cint
  Source Edit
ENFILE: cint
  Source Edit
ENOBUFS: cint
  Source Edit
ENODATA: cint
  Source Edit
ENODEV: cint
  Source Edit
ENOENT: cint
  Source Edit
ENOEXEC: cint
  Source Edit
ENOLCK: cint
  Source Edit
ENOLINK: cint
  Source Edit
ENOMEM: cint
  Source Edit
ENOMSG: cint
  Source Edit
ENOPROTOOPT: cint
  Source Edit
ENOSPC: cint
  Source Edit
ENOSR: cint
  Source Edit
ENOSTR: cint
  Source Edit
ENOSYS: cint
  Source Edit
ENOTCONN: cint
  Source Edit
ENOTDIR: cint
  Source Edit
ENOTEMPTY: cint
  Source Edit
ENOTSOCK: cint
  Source Edit
ENOTSUP: cint
  Source Edit
ENOTTY: cint
  Source Edit
ENXIO: cint
  Source Edit
EOPNOTSUPP: cint
  Source Edit
EOVERFLOW: cint
  Source Edit
EPERM: cint
  Source Edit
EPIPE: cint
  Source Edit
EPROTO: cint
  Source Edit
EPROTONOSUPPORT: cint
  Source Edit
EPROTOTYPE: cint
  Source Edit
ERANGE: cint
  Source Edit
EROFS: cint
  Source Edit
ESPIPE: cint
  Source Edit
ESRCH: cint
  Source Edit
ESTALE: cint
  Source Edit
ETIME: cint
  Source Edit
ETIMEDOUT: cint
  Source Edit
ETXTBSY: cint
  Source Edit
EWOULDBLOCK: cint
  Source Edit
EXDEV: cint
  Source Edit
F_DUPFD: cint
  Source Edit
F_GETFD: cint
  Source Edit
F_SETFD: cint
  Source Edit
F_GETFL: cint
  Source Edit
F_SETFL: cint
  Source Edit
F_GETLK: cint
  Source Edit
F_SETLK: cint
  Source Edit
F_SETLKW: cint
  Source Edit
F_GETOWN: cint
  Source Edit
F_SETOWN: cint
  Source Edit
FD_CLOEXEC: cint
  Source Edit
F_RDLCK: cint
  Source Edit
F_UNLCK: cint
  Source Edit
F_WRLCK: cint
  Source Edit
O_CREAT: cint
  Source Edit
O_EXCL: cint
  Source Edit
O_NOCTTY: cint
  Source Edit
O_TRUNC: cint
  Source Edit
O_APPEND: cint
  Source Edit
O_DSYNC: cint
  Source Edit
O_NONBLOCK: cint
  Source Edit
O_RSYNC: cint
  Source Edit
O_SYNC: cint
  Source Edit
O_ACCMODE: cint
  Source Edit
O_RDONLY: cint
  Source Edit
O_RDWR: cint
  Source Edit
O_WRONLY: cint
  Source Edit
POSIX_FADV_NORMAL: cint
  Source Edit
POSIX_FADV_SEQUENTIAL: cint
  Source Edit
POSIX_FADV_RANDOM: cint
  Source Edit
POSIX_FADV_WILLNEED: cint
  Source Edit
POSIX_FADV_DONTNEED: cint
  Source Edit
POSIX_FADV_NOREUSE: cint
  Source Edit
FE_DIVBYZERO: cint
  Source Edit
FE_INEXACT: cint
  Source Edit
FE_INVALID: cint
  Source Edit
FE_OVERFLOW: cint
  Source Edit
FE_UNDERFLOW: cint
  Source Edit
FE_ALL_EXCEPT: cint
  Source Edit
FE_DOWNWARD: cint
  Source Edit
FE_TONEAREST: cint
  Source Edit
FE_TOWARDZERO: cint
  Source Edit
FE_UPWARD: cint
  Source Edit
FE_DFL_ENV: cint
  Source Edit
MM_HARD: cint
  Source Edit
MM_SOFT: cint
  Source Edit
MM_FIRM: cint
  Source Edit
MM_APPL: cint
  Source Edit
MM_UTIL: cint
  Source Edit
MM_OPSYS: cint
  Source Edit
MM_RECOVER: cint
  Source Edit
MM_NRECOV: cint
  Source Edit
MM_HALT: cint
  Source Edit
MM_ERROR: cint
  Source Edit
MM_WARNING: cint
  Source Edit
MM_INFO: cint
  Source Edit
MM_NOSEV: cint
  Source Edit
MM_PRINT: cint
  Source Edit
MM_CONSOLE: cint
  Source Edit
MM_OK: cint
  Source Edit
MM_NOTOK: cint
  Source Edit
MM_NOMSG: cint
  Source Edit
MM_NOCON: cint
  Source Edit
FNM_NOMATCH: cint
  Source Edit
FNM_PATHNAME: cint
  Source Edit
FNM_PERIOD: cint
  Source Edit
FNM_NOESCAPE: cint
  Source Edit
FNM_NOSYS: cint
  Source Edit
FTW_F: cint
  Source Edit
FTW_D: cint
  Source Edit
FTW_DNR: cint
  Source Edit
FTW_DP: cint
  Source Edit
FTW_NS: cint
  Source Edit
FTW_SL: cint
  Source Edit
FTW_SLN: cint
  Source Edit
FTW_PHYS: cint
  Source Edit
FTW_MOUNT: cint
  Source Edit
FTW_DEPTH: cint
  Source Edit
FTW_CHDIR: cint
  Source Edit
GLOB_APPEND: cint
  Source Edit
GLOB_DOOFFS: cint
  Source Edit
GLOB_ERR: cint
  Source Edit
GLOB_MARK: cint
  Source Edit
GLOB_NOCHECK: cint
  Source Edit
GLOB_NOESCAPE: cint
  Source Edit
GLOB_NOSORT: cint
  Source Edit
GLOB_ABORTED: cint
  Source Edit
GLOB_NOMATCH: cint
  Source Edit
GLOB_NOSPACE: cint
  Source Edit
GLOB_NOSYS: cint
  Source Edit
CODESET: cint
  Source Edit
D_T_FMT: cint
  Source Edit
D_FMT: cint
  Source Edit
T_FMT: cint
  Source Edit
T_FMT_AMPM: cint
  Source Edit
AM_STR: cint
  Source Edit
PM_STR: cint
  Source Edit
DAY_1: cint
  Source Edit
DAY_2: cint
  Source Edit
DAY_3: cint
  Source Edit
DAY_4: cint
  Source Edit
DAY_5: cint
  Source Edit
DAY_6: cint
  Source Edit
DAY_7: cint
  Source Edit
ABDAY_1: cint
  Source Edit
ABDAY_2: cint
  Source Edit
ABDAY_3: cint
  Source Edit
ABDAY_4: cint
  Source Edit
ABDAY_5: cint
  Source Edit
ABDAY_6: cint
  Source Edit
ABDAY_7: cint
  Source Edit
MON_1: cint
  Source Edit
MON_2: cint
  Source Edit
MON_3: cint
  Source Edit
MON_4: cint
  Source Edit
MON_5: cint
  Source Edit
MON_6: cint
  Source Edit
MON_7: cint
  Source Edit
MON_8: cint
  Source Edit
MON_9: cint
  Source Edit
MON_10: cint
  Source Edit
MON_11: cint
  Source Edit
MON_12: cint
  Source Edit
ABMON_1: cint
  Source Edit
ABMON_2: cint
  Source Edit
ABMON_3: cint
  Source Edit
ABMON_4: cint
  Source Edit
ABMON_5: cint
  Source Edit
ABMON_6: cint
  Source Edit
ABMON_7: cint
  Source Edit
ABMON_8: cint
  Source Edit
ABMON_9: cint
  Source Edit
ABMON_10: cint
  Source Edit
ABMON_11: cint
  Source Edit
ABMON_12: cint
  Source Edit
ERA: cint
  Source Edit
ERA_D_FMT: cint
  Source Edit
ERA_D_T_FMT: cint
  Source Edit
ERA_T_FMT: cint
  Source Edit
ALT_DIGITS: cint
  Source Edit
RADIXCHAR: cint
  Source Edit
THOUSEP: cint
  Source Edit
YESEXPR: cint
  Source Edit
NOEXPR: cint
  Source Edit
CRNCYSTR: cint
  Source Edit
LC_ALL: cint
  Source Edit
LC_COLLATE: cint
  Source Edit
LC_CTYPE: cint
  Source Edit
LC_MESSAGES: cint
  Source Edit
LC_MONETARY: cint
  Source Edit
LC_NUMERIC: cint
  Source Edit
LC_TIME: cint
  Source Edit
IPPORT_RESERVED: cint
  Source Edit
HOST_NOT_FOUND: cint
  Source Edit
NO_DATA: cint
  Source Edit
NO_RECOVERY: cint
  Source Edit
TRY_AGAIN: cint
  Source Edit
AI_PASSIVE: cint
  Source Edit
AI_CANONNAME: cint
  Source Edit
AI_NUMERICHOST: cint
  Source Edit
AI_NUMERICSERV: cint
  Source Edit
AI_V4MAPPED: cint
  Source Edit
AI_ALL: cint
  Source Edit
AI_ADDRCONFIG: cint
  Source Edit
NI_NOFQDN: cint
  Source Edit
NI_NUMERICHOST: cint
  Source Edit
NI_NAMEREQD: cint
  Source Edit
NI_NUMERICSERV: cint
  Source Edit
NI_NUMERICSCOPE: cint
  Source Edit
NI_DGRAM: cint
  Source Edit
EAI_AGAIN: cint
  Source Edit
EAI_BADFLAGS: cint
  Source Edit
EAI_FAIL: cint
  Source Edit
EAI_FAMILY: cint
  Source Edit
EAI_MEMORY: cint
  Source Edit
EAI_NONAME: cint
  Source Edit
EAI_SERVICE: cint
  Source Edit
EAI_SOCKTYPE: cint
  Source Edit
EAI_SYSTEM: cint
  Source Edit
EAI_OVERFLOW: cint
  Source Edit
IF_NAMESIZE: cint
  Source Edit
IPPROTO_IP: cint
  Source Edit
IPPROTO_IPV6: cint
  Source Edit
IPPROTO_ICMP: cint
  Source Edit
IPPROTO_ICMPV6: cint
  Source Edit
IPPROTO_RAW: cint
  Source Edit
IPPROTO_TCP: cint
  Source Edit
IPPROTO_UDP: cint
  Source Edit
INADDR_ANY: InAddrScalar
  Source Edit
INADDR_LOOPBACK: InAddrScalar
  Source Edit
INADDR_BROADCAST: InAddrScalar
  Source Edit
INET_ADDRSTRLEN: cint
  Source Edit
INET6_ADDRSTRLEN: cint
  Source Edit
IPV6_JOIN_GROUP: cint
  Source Edit
IPV6_LEAVE_GROUP: cint
  Source Edit
IPV6_MULTICAST_HOPS: cint
  Source Edit
IPV6_MULTICAST_IF: cint
  Source Edit
IPV6_MULTICAST_LOOP: cint
  Source Edit
IPV6_UNICAST_HOPS: cint
  Source Edit
IPV6_V6ONLY: cint
  Source Edit
TCP_NODELAY: cint
  Source Edit
NL_SETD: cint
  Source Edit
NL_CAT_LOCALE: cint
  Source Edit
POLLIN: cshort
  Source Edit
POLLRDNORM: cshort
  Source Edit
POLLRDBAND: cshort
  Source Edit
POLLPRI: cshort
  Source Edit
POLLOUT: cshort
  Source Edit
POLLWRNORM: cshort
  Source Edit
POLLWRBAND: cshort
  Source Edit
POLLERR: cshort
  Source Edit
POLLHUP: cshort
  Source Edit
POLLNVAL: cshort
  Source Edit
PTHREAD_BARRIER_SERIAL_THREAD: cint
  Source Edit
PTHREAD_CANCEL_ASYNCHRONOUS: cint
  Source Edit
PTHREAD_CANCEL_ENABLE: cint
  Source Edit
PTHREAD_CANCEL_DEFERRED: cint
  Source Edit
PTHREAD_CANCEL_DISABLE: cint
  Source Edit
PTHREAD_CREATE_DETACHED: cint
  Source Edit
PTHREAD_CREATE_JOINABLE: cint
  Source Edit
PTHREAD_EXPLICIT_SCHED: cint
  Source Edit
PTHREAD_INHERIT_SCHED: cint
  Source Edit
PTHREAD_MUTEX_DEFAULT: cint
  Source Edit
PTHREAD_MUTEX_ERRORCHECK: cint
  Source Edit
PTHREAD_MUTEX_NORMAL: cint
  Source Edit
PTHREAD_MUTEX_RECURSIVE: cint
  Source Edit
PTHREAD_PRIO_INHERIT: cint
  Source Edit
PTHREAD_PRIO_NONE: cint
  Source Edit
PTHREAD_PRIO_PROTECT: cint
  Source Edit
PTHREAD_PROCESS_SHARED: cint
  Source Edit
PTHREAD_PROCESS_PRIVATE: cint
  Source Edit
PTHREAD_SCOPE_PROCESS: cint
  Source Edit
PTHREAD_SCOPE_SYSTEM: cint
  Source Edit
SCHED_FIFO: cint
  Source Edit
SCHED_RR: cint
  Source Edit
SCHED_SPORADIC: cint
  Source Edit
SCHED_OTHER: cint
  Source Edit
SEM_FAILED: pointer
  Source Edit
SIGEV_NONE: cint
  Source Edit
SIGEV_SIGNAL: cint
  Source Edit
SIGEV_THREAD: cint
  Source Edit
SIGABRT: cint
  Source Edit
SIGALRM: cint
  Source Edit
SIGBUS: cint
  Source Edit
SIGCHLD: cint
  Source Edit
SIGCONT: cint
  Source Edit
SIGFPE: cint
  Source Edit
SIGHUP: cint
  Source Edit
SIGILL: cint
  Source Edit
SIGINT: cint
  Source Edit
SIGKILL: cint
  Source Edit
SIGPIPE: cint
  Source Edit
SIGQUIT: cint
  Source Edit
SIGSEGV: cint
  Source Edit
SIGSTOP: cint
  Source Edit
SIGTERM: cint
  Source Edit
SIGTSTP: cint
  Source Edit
SIGTTIN: cint
  Source Edit
SIGTTOU: cint
  Source Edit
SIGUSR1: cint
  Source Edit
SIGUSR2: cint
  Source Edit
SIGPOLL: cint
  Source Edit
SIGPROF: cint
  Source Edit
SIGSYS: cint
  Source Edit
SIGTRAP: cint
  Source Edit
SIGURG: cint
  Source Edit
SIGVTALRM: cint
  Source Edit
SIGXCPU: cint
  Source Edit
SIGXFSZ: cint
  Source Edit
SA_NOCLDSTOP: cint
  Source Edit
SIG_BLOCK: cint
  Source Edit
SIG_UNBLOCK: cint
  Source Edit
SIG_SETMASK: cint
  Source Edit
SA_ONSTACK: cint
  Source Edit
SA_RESETHAND: cint
  Source Edit
SA_RESTART: cint
  Source Edit
SA_SIGINFO: cint
  Source Edit
SA_NOCLDWAIT: cint
  Source Edit
SA_NODEFER: cint
  Source Edit
SS_ONSTACK: cint
  Source Edit
SS_DISABLE: cint
  Source Edit
MINSIGSTKSZ: cint
  Source Edit
SIGSTKSZ: cint
  Source Edit
SIG_HOLD: Sighandler
  Source Edit
SIG_DFL: Sighandler
  Source Edit
SIG_ERR: Sighandler
  Source Edit
SIG_IGN: Sighandler
  Source Edit
IPC_CREAT: cint
  Source Edit
IPC_EXCL: cint
  Source Edit
IPC_NOWAIT: cint
  Source Edit
IPC_PRIVATE: cint
  Source Edit
IPC_RMID: cint
  Source Edit
IPC_SET: cint
  Source Edit
IPC_STAT: cint
  Source Edit
PROT_READ: cint
  Source Edit
PROT_WRITE: cint
  Source Edit
PROT_EXEC: cint
  Source Edit
PROT_NONE: cint
  Source Edit
MAP_ANONYMOUS: cint
  Source Edit
MAP_FIXED_NOREPLACE: cint
  Source Edit
MAP_NORESERVE: cint
  Source Edit
MAP_SHARED: cint
  Source Edit
MAP_PRIVATE: cint
  Source Edit
MAP_FIXED: cint
  Source Edit
MS_ASYNC: cint
  Source Edit
MS_SYNC: cint
  Source Edit
MS_INVALIDATE: cint
  Source Edit
MCL_CURRENT: cint
  Source Edit
MCL_FUTURE: cint
  Source Edit
MAP_FAILED: pointer
  Source Edit
POSIX_MADV_NORMAL: cint
  Source Edit
POSIX_MADV_SEQUENTIAL: cint
  Source Edit
POSIX_MADV_RANDOM: cint
  Source Edit
POSIX_MADV_WILLNEED: cint
  Source Edit
POSIX_MADV_DONTNEED: cint
  Source Edit
POSIX_TYPED_MEM_ALLOCATE: cint
  Source Edit
POSIX_TYPED_MEM_ALLOCATE_CONTIG: cint
  Source Edit
POSIX_TYPED_MEM_MAP_ALLOCATABLE: cint
  Source Edit
RLIMIT_NOFILE: cint
  Source Edit
FD_SETSIZE: cint
  Source Edit
MSG_CTRUNC: cint
  Source Edit
MSG_DONTROUTE: cint
  Source Edit
MSG_EOR: cint
  Source Edit
MSG_OOB: cint
  Source Edit
SCM_RIGHTS: cint
  Source Edit
SO_ACCEPTCONN: cint
  Source Edit
SO_BROADCAST: cint
  Source Edit
SO_DEBUG: cint
  Source Edit
SO_DONTROUTE: cint
  Source Edit
SO_ERROR: cint
  Source Edit
SO_KEEPALIVE: cint
  Source Edit
SO_LINGER: cint
  Source Edit
SO_OOBINLINE: cint
  Source Edit
SO_RCVBUF: cint
  Source Edit
SO_RCVLOWAT: cint
  Source Edit
SO_RCVTIMEO: cint
  Source Edit
SO_REUSEADDR: cint
  Source Edit
SO_SNDBUF: cint
  Source Edit
SO_SNDLOWAT: cint
  Source Edit
SO_SNDTIMEO: cint
  Source Edit
SO_TYPE: cint
  Source Edit
SOCK_DGRAM: cint
  Source Edit
SOCK_RAW: cint
  Source Edit
SOCK_SEQPACKET: cint
  Source Edit
SOCK_STREAM: cint
  Source Edit
SOL_SOCKET: cint
  Source Edit
SOMAXCONN: cint
  Source Edit
MSG_PEEK: cint
  Source Edit
MSG_TRUNC: cint
  Source Edit
MSG_WAITALL: cint
  Source Edit
AF_INET: cint
  Source Edit
AF_INET6: cint
  Source Edit
AF_UNIX: cint
  Source Edit
AF_UNSPEC: cint
  Source Edit
SHUT_RD: cint
  Source Edit
SHUT_RDWR: cint
  Source Edit
SHUT_WR: cint
  Source Edit
S_IFBLK: cint
  Source Edit
S_IFCHR: cint
  Source Edit
S_IFDIR: cint
  Source Edit
S_IFIFO: cint
  Source Edit
S_IFLNK: cint
  Source Edit
S_IFMT: cint
  Source Edit
S_IFREG: cint
  Source Edit
S_IFSOCK: cint
  Source Edit
S_IRGRP: cint
  Source Edit
S_IROTH: cint
  Source Edit
S_IRUSR: cint
  Source Edit
S_IRWXG: cint
  Source Edit
S_IRWXO: cint
  Source Edit
S_IRWXU: cint
  Source Edit
S_ISGID: cint
  Source Edit
S_ISUID: cint
  Source Edit
S_ISVTX: cint
  Source Edit
S_IWGRP: cint
  Source Edit
S_IWOTH: cint
  Source Edit
S_IWUSR: cint
  Source Edit
S_IXGRP: cint
  Source Edit
S_IXOTH: cint
  Source Edit
S_IXUSR: cint
  Source Edit
ST_RDONLY: cint
  Source Edit
ST_NOSUID: cint
  Source Edit
WNOHANG: cint
  Source Edit
WUNTRACED: cint
  Source Edit
WEXITED: cint
  Source Edit
WSTOPPED: cint
  Source Edit
WCONTINUED: cint
  Source Edit
WNOWAIT: cint
  Source Edit
P_ALL: cint
  Source Edit
P_PID: cint
  Source Edit
P_PGID: cint
  Source Edit
POSIX_SPAWN_RESETIDS: cint
  Source Edit
POSIX_SPAWN_SETPGROUP: cint
  Source Edit
POSIX_SPAWN_SETSCHEDPARAM: cint
  Source Edit
POSIX_SPAWN_SETSCHEDULER: cint
  Source Edit
POSIX_SPAWN_SETSIGDEF: cint
  Source Edit
POSIX_SPAWN_SETSIGMASK: cint
  Source Edit
IOFBF: cint
  Source Edit
IONBF: cint
  Source Edit
CLOCKS_PER_SEC: clong
  Source Edit
CLOCK_PROCESS_CPUTIME_ID: cint
  Source Edit
CLOCK_THREAD_CPUTIME_ID: cint
  Source Edit
CLOCK_REALTIME: cint
  Source Edit
TIMER_ABSTIME: cint
  Source Edit
CLOCK_MONOTONIC: cint
  Source Edit
POSIX_ASYNC_IO: cint
  Source Edit
POSIX_PRIO_IO: cint
  Source Edit
POSIX_SYNC_IO: cint
  Source Edit
F_OK: cint
  Source Edit
R_OK: cint
  Source Edit
W_OK: cint
  Source Edit
X_OK: cint
  Source Edit
CS_PATH: cint
  Source Edit
CS_POSIX_V6_ILP32_OFF32_CFLAGS: cint
  Source Edit
CS_POSIX_V6_ILP32_OFF32_LDFLAGS: cint
  Source Edit
CS_POSIX_V6_ILP32_OFF32_LIBS: cint
  Source Edit
CS_POSIX_V6_ILP32_OFFBIG_CFLAGS: cint
  Source Edit
CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS: cint
  Source Edit
CS_POSIX_V6_ILP32_OFFBIG_LIBS: cint
  Source Edit
CS_POSIX_V6_LP64_OFF64_CFLAGS: cint
  Source Edit
CS_POSIX_V6_LP64_OFF64_LDFLAGS: cint
  Source Edit
CS_POSIX_V6_LP64_OFF64_LIBS: cint
  Source Edit
CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS: cint
  Source Edit
CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS: cint
  Source Edit
CS_POSIX_V6_LPBIG_OFFBIG_LIBS: cint
  Source Edit
CS_POSIX_V6_WIDTH_RESTRICTED_ENVS: cint
  Source Edit
F_LOCK: cint
  Source Edit
F_TEST: cint
  Source Edit
F_TLOCK: cint
  Source Edit
F_ULOCK: cint
  Source Edit
PC_2_SYMLINKS: cint
  Source Edit
PC_ALLOC_SIZE_MIN: cint
  Source Edit
PC_ASYNC_IO: cint
  Source Edit
PC_CHOWN_RESTRICTED: cint
  Source Edit
PC_FILESIZEBITS: cint
  Source Edit
PC_LINK_MAX: cint
  Source Edit
PC_MAX_CANON: cint
  Source Edit
PC_MAX_INPUT: cint
  Source Edit
PC_NAME_MAX: cint
  Source Edit
PC_NO_TRUNC: cint
  Source Edit
PC_PATH_MAX: cint
  Source Edit
PC_PIPE_BUF: cint
  Source Edit
PC_PRIO_IO: cint
  Source Edit
PC_REC_INCR_XFER_SIZE: cint
  Source Edit
PC_REC_MIN_XFER_SIZE: cint
  Source Edit
PC_REC_XFER_ALIGN: cint
  Source Edit
PC_SYMLINK_MAX: cint
  Source Edit
PC_SYNC_IO: cint
  Source Edit
PC_VDISABLE: cint
  Source Edit
SC_2_C_BIND: cint
  Source Edit
SC_2_C_DEV: cint
  Source Edit
SC_2_CHAR_TERM: cint
  Source Edit
SC_2_FORT_DEV: cint
  Source Edit
SC_2_FORT_RUN: cint
  Source Edit
SC_2_LOCALEDEF: cint
  Source Edit
SC_2_PBS: cint
  Source Edit
SC_2_PBS_ACCOUNTING: cint
  Source Edit
SC_2_PBS_CHECKPOINT: cint
  Source Edit
SC_2_PBS_LOCATE: cint
  Source Edit
SC_2_PBS_MESSAGE: cint
  Source Edit
SC_2_PBS_TRACK: cint
  Source Edit
SC_2_SW_DEV: cint
  Source Edit
SC_2_UPE: cint
  Source Edit
SC_2_VERSION: cint
  Source Edit
SC_ADVISORY_INFO: cint
  Source Edit
SC_AIO_LISTIO_MAX: cint
  Source Edit
SC_AIO_MAX: cint
  Source Edit
SC_AIO_PRIO_DELTA_MAX: cint
  Source Edit
SC_ARG_MAX: cint
  Source Edit
SC_ASYNCHRONOUS_IO: cint
  Source Edit
SC_ATEXIT_MAX: cint
  Source Edit
SC_BARRIERS: cint
  Source Edit
SC_BC_BASE_MAX: cint
  Source Edit
SC_BC_DIM_MAX: cint
  Source Edit
SC_BC_SCALE_MAX: cint
  Source Edit
SC_BC_STRING_MAX: cint
  Source Edit
SC_CHILD_MAX: cint
  Source Edit
SC_CLK_TCK: cint
  Source Edit
SC_CLOCK_SELECTION: cint
  Source Edit
SC_COLL_WEIGHTS_MAX: cint
  Source Edit
SC_CPUTIME: cint
  Source Edit
SC_DELAYTIMER_MAX: cint
  Source Edit
SC_EXPR_NEST_MAX: cint
  Source Edit
SC_FSYNC: cint
  Source Edit
SC_GETGR_R_SIZE_MAX: cint
  Source Edit
SC_GETPW_R_SIZE_MAX: cint
  Source Edit
SC_HOST_NAME_MAX: cint
  Source Edit
SC_IOV_MAX: cint
  Source Edit
SC_IPV6: cint
  Source Edit
SC_JOB_CONTROL: cint
  Source Edit
SC_LINE_MAX: cint
  Source Edit
SC_LOGIN_NAME_MAX: cint
  Source Edit
SC_MAPPED_FILES: cint
  Source Edit
SC_MEMLOCK: cint
  Source Edit
SC_MEMLOCK_RANGE: cint
  Source Edit
SC_MEMORY_PROTECTION: cint
  Source Edit
SC_MESSAGE_PASSING: cint
  Source Edit
SC_MONOTONIC_CLOCK: cint
  Source Edit
SC_MQ_OPEN_MAX: cint
  Source Edit
SC_MQ_PRIO_MAX: cint
  Source Edit
SC_NGROUPS_MAX: cint
  Source Edit
SC_OPEN_MAX: cint
  Source Edit
SC_PAGESIZE: cint
  Source Edit
SC_PRIORITIZED_IO: cint
  Source Edit
SC_PRIORITY_SCHEDULING: cint
  Source Edit
SC_RAW_SOCKETS: cint
  Source Edit
SC_RE_DUP_MAX: cint
  Source Edit
SC_READER_WRITER_LOCKS: cint
  Source Edit
SC_REALTIME_SIGNALS: cint
  Source Edit
SC_REGEXP: cint
  Source Edit
SC_RTSIG_MAX: cint
  Source Edit
SC_SAVED_IDS: cint
  Source Edit
SC_SEM_NSEMS_MAX: cint
  Source Edit
SC_SEM_VALUE_MAX: cint
  Source Edit
SC_SEMAPHORES: cint
  Source Edit
SC_SHARED_MEMORY_OBJECTS: cint
  Source Edit
SC_SHELL: cint
  Source Edit
SC_SIGQUEUE_MAX: cint
  Source Edit
SC_SPAWN: cint
  Source Edit
SC_SPIN_LOCKS: cint
  Source Edit
SC_SPORADIC_SERVER: cint
  Source Edit
SC_SS_REPL_MAX: cint
  Source Edit
SC_STREAM_MAX: cint
  Source Edit
SC_SYMLOOP_MAX: cint
  Source Edit
SC_SYNCHRONIZED_IO: cint
  Source Edit
SC_THREAD_ATTR_STACKADDR: cint
  Source Edit
SC_THREAD_ATTR_STACKSIZE: cint
  Source Edit
SC_THREAD_CPUTIME: cint
  Source Edit
SC_THREAD_DESTRUCTOR_ITERATIONS: cint
  Source Edit
SC_THREAD_KEYS_MAX: cint
  Source Edit
SC_THREAD_PRIO_INHERIT: cint
  Source Edit
SC_THREAD_PRIO_PROTECT: cint
  Source Edit
SC_THREAD_PRIORITY_SCHEDULING: cint
  Source Edit
SC_THREAD_PROCESS_SHARED: cint
  Source Edit
SC_THREAD_SAFE_FUNCTIONS: cint
  Source Edit
SC_THREAD_SPORADIC_SERVER: cint
  Source Edit
SC_THREAD_STACK_MIN: cint
  Source Edit
SC_THREAD_THREADS_MAX: cint
  Source Edit
SC_THREADS: cint
  Source Edit
SC_TIMEOUTS: cint
  Source Edit
SC_TIMER_MAX: cint
  Source Edit
SC_TIMERS: cint
  Source Edit
SC_TRACE: cint
  Source Edit
SC_TRACE_EVENT_FILTER: cint
  Source Edit
SC_TRACE_EVENT_NAME_MAX: cint
  Source Edit
SC_TRACE_INHERIT: cint
  Source Edit
SC_TRACE_LOG: cint
  Source Edit
SC_TRACE_NAME_MAX: cint
  Source Edit
SC_TRACE_SYS_MAX: cint
  Source Edit
SC_TRACE_USER_EVENT_MAX: cint
  Source Edit
SC_TTY_NAME_MAX: cint
  Source Edit
SC_TYPED_MEMORY_OBJECTS: cint
  Source Edit
SC_TZNAME_MAX: cint
  Source Edit
SC_V6_ILP32_OFF32: cint
  Source Edit
SC_V6_ILP32_OFFBIG: cint
  Source Edit
SC_V6_LP64_OFF64: cint
  Source Edit
SC_V6_LPBIG_OFFBIG: cint
  Source Edit
SC_VERSION: cint
  Source Edit
SC_XBS5_ILP32_OFF32: cint
  Source Edit
SC_XBS5_ILP32_OFFBIG: cint
  Source Edit
SC_XBS5_LP64_OFF64: cint
  Source Edit
SC_XBS5_LPBIG_OFFBIG: cint
  Source Edit
SC_XOPEN_CRYPT: cint
  Source Edit
SC_XOPEN_ENH_I18N: cint
  Source Edit
SC_XOPEN_LEGACY: cint
  Source Edit
SC_XOPEN_REALTIME: cint
  Source Edit
SC_XOPEN_REALTIME_THREADS: cint
  Source Edit
SC_XOPEN_SHM: cint
  Source Edit
SC_XOPEN_STREAMS: cint
  Source Edit
SC_XOPEN_UNIX: cint
  Source Edit
SC_XOPEN_VERSION: cint
  Source Edit
SC_NPROCESSORS_ONLN: cint
  Source Edit
SEEK_SET: cint
  Source Edit
SEEK_CUR: cint
  Source Edit
SEEK_END: cint
  Source Edit
MAP_POPULATE: cint = 0
  Source Edit
SO_NOSIGPIPE: cint
  Source Edit
in6addr_any: In6Addr
  Source Edit
in6addr_loopback: In6Addr
  Source Edit

Consts

MM_NULLLBL = nil
  Source Edit
MM_NULLSEV = 0
  Source Edit
MM_NULLMC = 0
  Source Edit
MM_NULLTXT = nil
  Source Edit
MM_NULLACT = nil
  Source Edit
MM_NULLTAG = nil
  Source Edit
STDERR_FILENO = 2
File number of stderr;   Source Edit
STDIN_FILENO = 0
File number of stdin;   Source Edit
STDOUT_FILENO = 1
File number of stdout;   Source Edit
DT_UNKNOWN = 0
Unknown file type.   Source Edit
DT_FIFO = 1
Named pipe, or FIFO.   Source Edit
DT_CHR = 2
Character device.   Source Edit
DT_DIR = 4
Directory.   Source Edit
DT_BLK = 6
Block device.   Source Edit
DT_REG = 8
Regular file.   Source Edit
DT_LNK = 10
Symbolic link.   Source Edit
DT_SOCK = 12
UNIX domain socket.   Source Edit
DT_WHT = 14
  Source Edit
StatHasNanoseconds = false
Boolean flag that indicates if the system supports nanosecond time resolution in the fields of Stat. Note that the nanosecond based fields (Stat.st_atim, Stat.st_mtim and Stat.st_ctim) can be accessed without checking this flag, because this module defines fallback procs when they are not available.   Source Edit
Sockaddr_un_path_length = 92
  Source Edit
SO_REUSEPORT = 512'i32
Multiple binding: load balancing on incoming TCP connections or UDP packets. (Requires Linux kernel > 3.9)   Source Edit
MSG_NOSIGNAL = 0'i32
  Source Edit
POSIX_SPAWN_USEVFORK = 0'i32
  Source Edit
RUSAGE_SELF = 0'i32
  Source Edit
RUSAGE_CHILDREN = -1'i32
  Source Edit
RUSAGE_THREAD = 1'i32
  Source Edit
INVALID_SOCKET = -1'i32
  Source Edit

Procs

proc WEXITSTATUS(s: cint): cint {...}{.importc, header: "<sys/wait.h>".}
Exit code, iff WIFEXITED(s)   Source Edit
proc WTERMSIG(s: cint): cint {...}{.importc, header: "<sys/wait.h>".}
Termination signal, iff WIFSIGNALED(s)   Source Edit
proc WSTOPSIG(s: cint): cint {...}{.importc, header: "<sys/wait.h>".}
Stop signal, iff WIFSTOPPED(s)   Source Edit
proc WIFEXITED(s: cint): bool {...}{.importc, header: "<sys/wait.h>".}
True if child exited normally.   Source Edit
proc WIFSIGNALED(s: cint): bool {...}{.importc, header: "<sys/wait.h>".}
True if child exited due to uncaught signal.   Source Edit
proc WIFSTOPPED(s: cint): bool {...}{.importc, header: "<sys/wait.h>".}
True if child is currently stopped.   Source Edit
proc WIFCONTINUED(s: cint): bool {...}{.importc, header: "<sys/wait.h>".}
True if child has been continued.   Source Edit
proc st_atim(s: Stat): Timespec {...}{.inline, raises: [], tags: [].}
Nanosecond-granularity time of last access.   Source Edit
proc st_mtim(s: Stat): Timespec {...}{.inline, raises: [], tags: [].}
Nanosecond-granularity time of last data modification.   Source Edit
proc st_ctim(s: Stat): Timespec {...}{.inline, raises: [], tags: [].}
Nanosecond-granularity time of last data modification.   Source Edit
proc htonl(a1: uint32): uint32 {...}{.importc, header: "<arpa/inet.h>".}
  Source Edit
proc htons(a1: uint16): uint16 {...}{.importc, header: "<arpa/inet.h>".}
  Source Edit
proc ntohl(a1: uint32): uint32 {...}{.importc, header: "<arpa/inet.h>".}
  Source Edit
proc ntohs(a1: uint16): uint16 {...}{.importc, header: "<arpa/inet.h>".}
  Source Edit
proc inet_addr(a1: cstring): InAddrT {...}{.importc, header: "<arpa/inet.h>".}
  Source Edit
proc inet_ntoa(a1: InAddr): cstring {...}{.importc, header: "<arpa/inet.h>".}
  Source Edit
proc inet_ntop(a1: cint; a2: pointer; a3: cstring; a4: int32): cstring {...}{.
    importc: "(char *)$1", header: "<arpa/inet.h>".}
  Source Edit
proc inet_pton(a1: cint; a2: cstring; a3: pointer): cint {...}{.importc,
    header: "<arpa/inet.h>".}
  Source Edit
proc IN6ADDR_ANY_INIT(): In6Addr {...}{.importc, header: "<netinet/in.h>".}
  Source Edit
proc IN6ADDR_LOOPBACK_INIT(): In6Addr {...}{.importc, header: "<netinet/in.h>".}
  Source Edit
proc closedir(a1: ptr DIR): cint {...}{.importc, header: "<dirent.h>".}
  Source Edit
proc opendir(a1: cstring): ptr DIR {...}{.importc, header: "<dirent.h>".}
  Source Edit
proc readdir(a1: ptr DIR): ptr Dirent {...}{.importc, header: "<dirent.h>".}
  Source Edit
proc readdir_r(a1: ptr DIR; a2: ptr Dirent; a3: ptr ptr Dirent): cint {...}{.importc,
    header: "<dirent.h>".}
  Source Edit
proc rewinddir(a1: ptr DIR) {...}{.importc, header: "<dirent.h>".}
  Source Edit
proc seekdir(a1: ptr DIR; a2: int) {...}{.importc, header: "<dirent.h>".}
  Source Edit
proc telldir(a1: ptr DIR): int {...}{.importc, header: "<dirent.h>".}
  Source Edit
proc dlclose(a1: pointer): cint {...}{.importc, header: "<dlfcn.h>".}
  Source Edit
proc dlerror(): cstring {...}{.importc, header: "<dlfcn.h>".}
  Source Edit
proc dlopen(a1: cstring; a2: cint): pointer {...}{.importc, header: "<dlfcn.h>".}
  Source Edit
proc dlsym(a1: pointer; a2: cstring): pointer {...}{.importc, header: "<dlfcn.h>".}
  Source Edit
proc creat(a1: cstring; a2: Mode): cint {...}{.importc, header: "<fcntl.h>".}
  Source Edit
proc fcntl(a1: cint | SocketHandle; a2: cint): cint {...}{.varargs, importc,
    header: "<fcntl.h>".}
  Source Edit
proc open(a1: cstring; a2: cint): cint {...}{.varargs, importc, header: "<fcntl.h>".}
  Source Edit
proc posix_fadvise(a1: cint; a2, a3: Off; a4: cint): cint {...}{.importc, header: "<fcntl.h>".}
  Source Edit
proc posix_fallocate(a1: cint; a2, a3: Off): cint {...}{.importc, header: "<fcntl.h>".}
  Source Edit
proc fmtmsg(a1: int; a2: cstring; a3: cint; a4, a5, a6: cstring): cint {...}{.importc,
    header: "<fmtmsg.h>".}
  Source Edit
proc fnmatch(a1, a2: cstring; a3: cint): cint {...}{.importc, header: "<fnmatch.h>".}
  Source Edit
proc ftw(a1: cstring;
        a2: proc (x1: cstring; x2: ptr Stat; x3: cint): cint {...}{.noconv.}; a3: cint): cint {...}{.
    importc, header: "<ftw.h>".}
  Source Edit
proc nftw(a1: cstring; a2: proc (x1: cstring; x2: ptr Stat; x3: cint; x4: ptr FTW): cint {...}{.
    noconv.}; a3: cint; a4: cint): cint {...}{.importc, header: "<ftw.h>".}
  Source Edit
proc glob(a1: cstring; a2: cint; a3: proc (x1: cstring; x2: cint): cint {...}{.noconv.};
         a4: ptr Glob): cint {...}{.importc, header: "<glob.h>".}
Filename globbing. Use os.walkPattern() and similar.   Source Edit
proc globfree(a1: ptr Glob) {...}{.importc, header: "<glob.h>".}
  Source Edit
proc getgrgid(a1: Gid): ptr Group {...}{.importc, header: "<grp.h>".}
  Source Edit
proc getgrnam(a1: cstring): ptr Group {...}{.importc, header: "<grp.h>".}
  Source Edit
proc getgrgid_r(a1: Gid; a2: ptr Group; a3: cstring; a4: int; a5: ptr ptr Group): cint {...}{.
    importc, header: "<grp.h>".}
  Source Edit
proc getgrnam_r(a1: cstring; a2: ptr Group; a3: cstring; a4: int; a5: ptr ptr Group): cint {...}{.
    importc, header: "<grp.h>".}
  Source Edit
proc getgrent(): ptr Group {...}{.importc, header: "<grp.h>".}
  Source Edit
proc endgrent() {...}{.importc, header: "<grp.h>".}
  Source Edit
proc setgrent() {...}{.importc, header: "<grp.h>".}
  Source Edit
proc iconv_open(a1, a2: cstring): Iconv {...}{.importc, header: "<iconv.h>".}
  Source Edit
proc iconv(a1: Iconv; a2: var cstring; a3: var int; a4: var cstring; a5: var int): int {...}{.
    importc, header: "<iconv.h>".}
  Source Edit
proc iconv_close(a1: Iconv): cint {...}{.importc, header: "<iconv.h>".}
  Source Edit
proc nl_langinfo(a1: Nl_item): cstring {...}{.importc, header: "<langinfo.h>".}
  Source Edit
proc basename(a1: cstring): cstring {...}{.importc, header: "<libgen.h>".}
  Source Edit
proc dirname(a1: cstring): cstring {...}{.importc, header: "<libgen.h>".}
  Source Edit
proc localeconv(): ptr Lconv {...}{.importc, header: "<locale.h>".}
  Source Edit
proc setlocale(a1: cint; a2: cstring): cstring {...}{.importc, header: "<locale.h>".}
  Source Edit
proc strfmon(a1: cstring; a2: int; a3: cstring): int {...}{.varargs, importc,
    header: "<monetary.h>".}
  Source Edit
proc mq_close(a1: Mqd): cint {...}{.importc, header: "<mqueue.h>".}
  Source Edit
proc mq_getattr(a1: Mqd; a2: ptr MqAttr): cint {...}{.importc, header: "<mqueue.h>".}
  Source Edit
proc mq_notify(a1: Mqd; a2: ptr SigEvent): cint {...}{.importc, header: "<mqueue.h>".}
  Source Edit
proc mq_open(a1: cstring; a2: cint): Mqd {...}{.varargs, importc, header: "<mqueue.h>".}
  Source Edit
proc mq_receive(a1: Mqd; a2: cstring; a3: int; a4: var int): int {...}{.importc,
    header: "<mqueue.h>".}
  Source Edit
proc mq_send(a1: Mqd; a2: cstring; a3: int; a4: int): cint {...}{.importc, header: "<mqueue.h>".}
  Source Edit
proc mq_setattr(a1: Mqd; a2, a3: ptr MqAttr): cint {...}{.importc, header: "<mqueue.h>".}
  Source Edit
proc mq_timedreceive(a1: Mqd; a2: cstring; a3: int; a4: int; a5: ptr Timespec): int {...}{.
    importc, header: "<mqueue.h>".}
  Source Edit
proc mq_timedsend(a1: Mqd; a2: cstring; a3: int; a4: int; a5: ptr Timespec): cint {...}{.importc,
    header: "<mqueue.h>".}
  Source Edit
proc mq_unlink(a1: cstring): cint {...}{.importc, header: "<mqueue.h>".}
  Source Edit
proc getpwnam(a1: cstring): ptr Passwd {...}{.importc, header: "<pwd.h>".}
  Source Edit
proc getpwuid(a1: Uid): ptr Passwd {...}{.importc, header: "<pwd.h>".}
  Source Edit
proc getpwnam_r(a1: cstring; a2: ptr Passwd; a3: cstring; a4: int; a5: ptr ptr Passwd): cint {...}{.
    importc, header: "<pwd.h>".}
  Source Edit
proc getpwuid_r(a1: Uid; a2: ptr Passwd; a3: cstring; a4: int; a5: ptr ptr Passwd): cint {...}{.
    importc, header: "<pwd.h>".}
  Source Edit
proc endpwent() {...}{.importc, header: "<pwd.h>".}
  Source Edit
proc getpwent(): ptr Passwd {...}{.importc, header: "<pwd.h>".}
  Source Edit
proc setpwent() {...}{.importc, header: "<pwd.h>".}
  Source Edit
proc uname(a1: var Utsname): cint {...}{.importc, header: "<sys/utsname.h>".}
  Source Edit
proc strerror(errnum: cint): cstring {...}{.importc, header: "<string.h>".}
  Source Edit
proc pthread_atfork(a1, a2, a3: proc () {...}{.noconv.}): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_destroy(a1: ptr Pthread_attr): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_attr_getdetachstate(a1: ptr Pthread_attr; a2: cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_getguardsize(a1: ptr Pthread_attr; a2: var cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_getinheritsched(a1: ptr Pthread_attr; a2: var cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_getschedparam(a1: ptr Pthread_attr; a2: ptr Sched_param): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_attr_getschedpolicy(a1: ptr Pthread_attr; a2: var cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_getscope(a1: ptr Pthread_attr; a2: var cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_getstack(a1: ptr Pthread_attr; a2: var pointer; a3: var int): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_attr_getstackaddr(a1: ptr Pthread_attr; a2: var pointer): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_getstacksize(a1: ptr Pthread_attr; a2: var int): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_init(a1: ptr Pthread_attr): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_attr_setdetachstate(a1: ptr Pthread_attr; a2: cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_setguardsize(a1: ptr Pthread_attr; a2: int): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_setinheritsched(a1: ptr Pthread_attr; a2: cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_setschedparam(a1: ptr Pthread_attr; a2: ptr Sched_param): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_attr_setschedpolicy(a1: ptr Pthread_attr; a2: cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_setscope(a1: ptr Pthread_attr; a2: cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_setstack(a1: ptr Pthread_attr; a2: pointer; a3: int): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_setstackaddr(a1: ptr Pthread_attr; a2: pointer): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_attr_setstacksize(a1: ptr Pthread_attr; a2: int): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_barrier_destroy(a1: ptr Pthread_barrier): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_barrier_init(a1: ptr Pthread_barrier; a2: ptr Pthread_barrierattr;
                         a3: cint): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_barrier_wait(a1: ptr Pthread_barrier): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_barrierattr_destroy(a1: ptr Pthread_barrierattr): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_barrierattr_getpshared(a1: ptr Pthread_barrierattr; a2: var cint): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_barrierattr_init(a1: ptr Pthread_barrierattr): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_barrierattr_setpshared(a1: ptr Pthread_barrierattr; a2: cint): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_cancel(a1: Pthread): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_cleanup_push(a1: proc (x: pointer) {...}{.noconv.}; a2: pointer) {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_cleanup_pop(a1: cint) {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_cond_broadcast(a1: ptr Pthread_cond): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_cond_destroy(a1: ptr Pthread_cond): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_cond_init(a1: ptr Pthread_cond; a2: ptr Pthread_condattr): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_cond_signal(a1: ptr Pthread_cond): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_cond_timedwait(a1: ptr Pthread_cond; a2: ptr Pthread_mutex;
                           a3: ptr Timespec): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_cond_wait(a1: ptr Pthread_cond; a2: ptr Pthread_mutex): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_condattr_destroy(a1: ptr Pthread_condattr): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_condattr_getclock(a1: ptr Pthread_condattr; a2: var ClockId): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_condattr_getpshared(a1: ptr Pthread_condattr; a2: var cint): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_condattr_init(a1: ptr Pthread_condattr): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_condattr_setclock(a1: ptr Pthread_condattr; a2: ClockId): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_condattr_setpshared(a1: ptr Pthread_condattr; a2: cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_create(a1: ptr Pthread; a2: ptr Pthread_attr;
                   a3: proc (x: pointer): pointer {...}{.noconv.}; a4: pointer): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_detach(a1: Pthread): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_equal(a1, a2: Pthread): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_exit(a1: pointer) {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_getconcurrency(): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_getcpuclockid(a1: Pthread; a2: var ClockId): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_getschedparam(a1: Pthread; a2: var cint; a3: ptr Sched_param): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_getspecific(a1: Pthread_key): pointer {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_join(a1: Pthread; a2: ptr pointer): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_key_create(a1: ptr Pthread_key; a2: proc (x: pointer) {...}{.noconv.}): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_key_delete(a1: Pthread_key): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_mutex_destroy(a1: ptr Pthread_mutex): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_mutex_getprioceiling(a1: ptr Pthread_mutex; a2: var cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_mutex_init(a1: ptr Pthread_mutex; a2: ptr Pthread_mutexattr): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_mutex_lock(a1: ptr Pthread_mutex): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_mutex_setprioceiling(a1: ptr Pthread_mutex; a2: cint; a3: var cint): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_mutex_timedlock(a1: ptr Pthread_mutex; a2: ptr Timespec): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_mutex_trylock(a1: ptr Pthread_mutex): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_mutex_unlock(a1: ptr Pthread_mutex): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_mutexattr_destroy(a1: ptr Pthread_mutexattr): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_mutexattr_getprioceiling(a1: ptr Pthread_mutexattr; a2: var cint): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_mutexattr_getprotocol(a1: ptr Pthread_mutexattr; a2: var cint): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_mutexattr_getpshared(a1: ptr Pthread_mutexattr; a2: var cint): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_mutexattr_gettype(a1: ptr Pthread_mutexattr; a2: var cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_mutexattr_init(a1: ptr Pthread_mutexattr): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_mutexattr_setprioceiling(a1: ptr Pthread_mutexattr; a2: cint): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_mutexattr_setprotocol(a1: ptr Pthread_mutexattr; a2: cint): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_mutexattr_setpshared(a1: ptr Pthread_mutexattr; a2: cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_mutexattr_settype(a1: ptr Pthread_mutexattr; a2: cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_once(a1: ptr Pthread_once; a2: proc () {...}{.noconv.}): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_rwlock_destroy(a1: ptr Pthread_rwlock): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_rwlock_init(a1: ptr Pthread_rwlock; a2: ptr Pthread_rwlockattr): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_rwlock_rdlock(a1: ptr Pthread_rwlock): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_rwlock_timedrdlock(a1: ptr Pthread_rwlock; a2: ptr Timespec): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_rwlock_timedwrlock(a1: ptr Pthread_rwlock; a2: ptr Timespec): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_rwlock_tryrdlock(a1: ptr Pthread_rwlock): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_rwlock_trywrlock(a1: ptr Pthread_rwlock): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_rwlock_unlock(a1: ptr Pthread_rwlock): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_rwlock_wrlock(a1: ptr Pthread_rwlock): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_rwlockattr_destroy(a1: ptr Pthread_rwlockattr): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_rwlockattr_getpshared(a1: ptr Pthread_rwlockattr; a2: var cint): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_rwlockattr_init(a1: ptr Pthread_rwlockattr): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_rwlockattr_setpshared(a1: ptr Pthread_rwlockattr; a2: cint): cint {...}{.
    importc, header: "<pthread.h>".}
  Source Edit
proc pthread_self(): Pthread {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_setcancelstate(a1: cint; a2: var cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_setcanceltype(a1: cint; a2: var cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_setconcurrency(a1: cint): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_setschedparam(a1: Pthread; a2: cint; a3: ptr Sched_param): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_setschedprio(a1: Pthread; a2: cint): cint {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc pthread_setspecific(a1: Pthread_key; a2: pointer): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_spin_destroy(a1: ptr Pthread_spinlock): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_spin_init(a1: ptr Pthread_spinlock; a2: cint): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_spin_lock(a1: ptr Pthread_spinlock): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_spin_trylock(a1: ptr Pthread_spinlock): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_spin_unlock(a1: ptr Pthread_spinlock): cint {...}{.importc,
    header: "<pthread.h>".}
  Source Edit
proc pthread_testcancel() {...}{.importc, header: "<pthread.h>".}
  Source Edit
proc exitnow(code: int): void {...}{.importc: "_exit", header: "<unistd.h>".}
  Source Edit
proc access(a1: cstring; a2: cint): cint {...}{.importc, header: "<unistd.h>".}
  Source Edit
proc alarm(a1: cint): cint {...}{.importc, header: "<unistd.h>".}
  Source Edit
proc chdir(a1: cstring): cint {...}{.importc, header: "<unistd.h>".}
  Source Edit
proc chown(a1: cstring; a2: Uid; a3: Gid): cint {...}{.importc, header: "<unistd.h>".}
  Source Edit
proc close(a1: cint | SocketHandle): cint {...}{.importc, header: "<unistd.h>".}
  Source Edit
proc confstr(a1: cint; a2: cstring; a3: int): int {...}{.importc, header: "<unistd.h>".}
  Source Edit
proc crypt(a1, a2: cstring): cstring {...}{.importc, header: "<unistd.h>".}
  Source Edit
proc ctermid(a1: cstring): cstring {...}{.importc, header: "<unistd.h>".}
  Source Edit
proc dup(a1: cint): cint {...}{.importc, header: "<unistd.h>".}
  Source Edit
proc dup2(a1, a2: cint): cint {...}{.importc, header: "<unistd.h>".}
  Source Edit
proc encrypt(a1: array[0 .. 63, char]; a2: cint) {...}{.importc, header: "<unistd.h>".}
  Source Edit
proc execl(a1, a2: cstring): cint {...}{.varargs, importc, header: "<unistd.h>".}
  Source Edit
proc execle(a1, a2: cstring): cint {...}{.varargs, importc, header: "<unistd.h>".}
  Source Edit
proc execlp(a1, a2: cstring): cint {...}{.varargs,