src/sys/private/syscall/posix

Source   Edit  

This module provides additional declaration not available in stdlib posix module.

Most of these declarations are OS-specific. Use when declared() to check whether the symbol is available on the target operating system.

Types

In6Addr {.importc: "struct in6_addr", pure, final, header: "<netinet/in.h>".} = object
  s6_addr*: array[16, byte]
Source   Edit  
In6AddrOrig = std_posix.In6Addr
Source   Edit  
Sockaddr_in6 {.importc: "struct sockaddr_in6", pure, header: "<netinet/in.h>".} = object
  sin6_family*: TSa_Family
  sin6_port*: InPort
  sin6_flowinfo*: uint32
  sin6_addr*: In6Addr
  sin6_scope_id*: uint32
Source   Edit  

Lets

FIOCLEX {.importc, header: "<sys/ioctl.h>".}: culong
Source   Edit  
FIONCLEX {.importc, header: "<sys/ioctl.h>".}: culong
Source   Edit  
SOCK_NONBLOCK {.importc, header: "<sys/socket.h>".}: cint
Source   Edit  

Procs

proc dup3(oldfd, newfd, flags: cint): cint {.importc, header: "<unistd.h>",
    ...raises: [], tags: [], forbids: [].}
Source   Edit  
proc pipe2(pipefd: var array[2, cint]; flags: cint): cint {.importc,
    header: "<unistd.h>", ...raises: [], tags: [], forbids: [].}
Source   Edit  

Templates

template retryOnEIntr(op: untyped): untyped
Given a POSIX operation that returns -1 on error, automatically retry it if the error was EINTR. Source   Edit